[Libreoffice-commits] core.git: 2 commits - include/editeng sd/source

David Tardon dtardon at redhat.com
Tue Dec 16 12:41:14 PST 2014


 include/editeng/numitem.hxx    |   11 +++++++----
 sd/source/ui/view/drviewsf.cxx |    2 --
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit d41656754027da587298f7373770a62b7e7b3f98
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Dec 15 16:46:00 2014 +0100

    protect against self-assignment
    
    Change-Id: Ic7b329fb0d2b5820dac73a9b92a857bb2edd49c8

diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 37c9f4a..664f4601 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -336,11 +336,14 @@ SvxNodeNum::SvxNodeNum( sal_uInt8 nLevel, sal_uInt16 nSetVal )
 
 inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy )
 {
-    nSetValue = rCpy.nSetValue;
-    nMyLevel = rCpy.nMyLevel;
-    bStartNum = rCpy.bStartNum;
+    if ( &rCpy != this)
+    {
+        nSetValue = rCpy.nSetValue;
+        nMyLevel = rCpy.nMyLevel;
+        bStartNum = rCpy.bStartNum;
 
-    memcpy( nLevelVal, rCpy.nLevelVal, sizeof( nLevelVal ) );
+        memcpy( nLevelVal, rCpy.nLevelVal, sizeof( nLevelVal ) );
+    }
     return *this;
 }
 
commit 2ceba7063c69ae8246efdbf1766002232cd8addf
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Dec 15 16:10:44 2014 +0100

    drop useless comment
    
    Change-Id: I51c942105fd7a00b06768154bc2c843d24196673

diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 6b46f06..1fe47f9 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -640,8 +640,6 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
                 }
             }
             break;
-            //End
-            // Added by Li Hui for story 179.
             case FN_NUM_BULLET_ON:
             case FN_NUM_NUMBERING_ON:
             {


More information about the Libreoffice-commits mailing list