Commits

Anonymous committed 97a8fce

sb135: #i116121# framework::UIElement::operator= does not check for self-assignment

Comments (0)

Files changed (1)

framework/source/layoutmanager/uielement.cxx

 
 UIElement& UIElement::operator= ( const UIElement& rUIElement )
 {
-    m_aType             = rUIElement.m_aType;
-    m_aName             = rUIElement.m_aName;
-    m_aUIName           = rUIElement.m_aUIName;
-    m_xUIElement        = rUIElement.m_xUIElement;
-    m_bFloating         = rUIElement.m_bFloating;
-    m_bVisible          = rUIElement.m_bVisible;
-    m_bUserActive       = rUIElement.m_bUserActive;
-    m_bCreateNewRowCol0 = rUIElement.m_bCreateNewRowCol0;
-    m_bDeactiveHide     = rUIElement.m_bDeactiveHide;
-    m_bMasterHide       = rUIElement.m_bMasterHide;
-    m_bContextSensitive = rUIElement.m_bContextSensitive;
-    m_bContextActive    = rUIElement.m_bContextActive;
-    m_bNoClose          = rUIElement.m_bNoClose;
-    m_bSoftClose        = rUIElement.m_bSoftClose;
-    m_bStateRead        = rUIElement.m_bStateRead;
-    m_nStyle            = rUIElement.m_nStyle;
-    m_aDockedData       = rUIElement.m_aDockedData;
-    m_aFloatingData     = rUIElement.m_aFloatingData;
+    if (&rUIElement != this)
+    {
+        m_aType             = rUIElement.m_aType;
+        m_aName             = rUIElement.m_aName;
+        m_aUIName           = rUIElement.m_aUIName;
+        m_xUIElement        = rUIElement.m_xUIElement;
+        m_bFloating         = rUIElement.m_bFloating;
+        m_bVisible          = rUIElement.m_bVisible;
+        m_bUserActive       = rUIElement.m_bUserActive;
+        m_bCreateNewRowCol0 = rUIElement.m_bCreateNewRowCol0;
+        m_bDeactiveHide     = rUIElement.m_bDeactiveHide;
+        m_bMasterHide       = rUIElement.m_bMasterHide;
+        m_bContextSensitive = rUIElement.m_bContextSensitive;
+        m_bContextActive    = rUIElement.m_bContextActive;
+        m_bNoClose          = rUIElement.m_bNoClose;
+        m_bSoftClose        = rUIElement.m_bSoftClose;
+        m_bStateRead        = rUIElement.m_bStateRead;
+        m_nStyle            = rUIElement.m_nStyle;
+        m_aDockedData       = rUIElement.m_aDockedData;
+        m_aFloatingData     = rUIElement.m_aFloatingData;
+    }
     return *this;
 }
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.