[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/source

Ashod Nakashian ashodnakashian at yahoo.com
Tue Jan 20 12:30:51 PST 2015


 sw/source/core/txtnode/thints.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 16d841a24a4cb112e160615d874a1bc29c8cf51d
Author: Ashod Nakashian <ashodnakashian at yahoo.com>
Date:   Sun Jan 18 17:35:55 2015 -0500

    Maintain the sorting in sorted_vector after modifying the elements.
    
    Resort immediately after modifying the data to prevent invalid lookups.
    
    Change-Id: If132af401d8164fd5973d81a8327c1fa726c908c
    Reviewed-on: https://gerrit.libreoffice.org/13984
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 5c363cf3f1d75e37835a6663a96b4e22c754c4cb)
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 5ec497a..a03b391 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2866,6 +2866,11 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
                 NoteInHistory( p1, true );
                 bRet = true;
             }
+
+            if (bRet)
+            {
+                SwpHintsArray::Resort();
+            }
         }
         else
         {
@@ -2903,11 +2908,6 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
         }
     }
 
-    if ( bRet )
-    {
-        SwpHintsArray::Resort();
-    }
-
     return bRet;
 }
 


More information about the Libreoffice-commits mailing list