[Libreoffice-commits] core.git: sw/source

Ashod Nakashian ashodnakashian at yahoo.com
Tue Jan 20 08:54:13 PST 2015


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

New commits:
commit 5c363cf3f1d75e37835a6663a96b4e22c754c4cb
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>

diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 4ab8955..9f11e58 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2869,6 +2869,11 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
                 NoteInHistory( p1, true );
                 bRet = true;
             }
+
+            if (bRet)
+            {
+                SwpHintsArray::Resort();
+            }
         }
         else
         {
@@ -2906,11 +2911,6 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
         }
     }
 
-    if ( bRet )
-    {
-        SwpHintsArray::Resort();
-    }
-
     return bRet;
 }
 


More information about the Libreoffice-commits mailing list