diff options
author | Ashod Nakashian <ashodnakashian@yahoo.com> | 2015-01-18 17:35:55 -0500 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-01-20 21:23:42 +0100 |
commit | 16d841a24a4cb112e160615d874a1bc29c8cf51d (patch) | |
tree | 8fb46ff3946bd6ec476758fa7ddfd9ddab49979c /sw | |
parent | 9cebcb0d49f92c08d5a8b9eb9c02959b86d6aefb (diff) |
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@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 5c363cf3f1d75e37835a6663a96b4e22c754c4cb)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 5ec497a734d7..a03b391a7440 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; } |