summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-10-28 17:27:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-28 20:32:11 +0100
commit27ae083f7e5fce97c73498698d855cdcaac7737d (patch)
tree9ac47c013979cae754df95430df9de6add054d3d /editeng
parent1503f3a25bc185a0f7afafad40db57325f778c21 (diff)
std::set->o3tl::sorted_vector in ImpEditEngine
Change-Id: Ia78b986c28e2d8e3655d5c8f56d3cb5cd7a5ee1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104944 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 4ffaeec6afaa..2925183e9cf7 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -67,6 +67,7 @@
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <o3tl/safeint.hxx>
+#include <o3tl/sorted_vector.hxx>
#include <osl/diagnose.h>
#include <comphelper/string.hxx>
#include <comphelper/lok.hxx>
@@ -2390,7 +2391,7 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_Int32& rS
ContentNode* pNode = pParaPortion->GetNode();
DBG_ASSERT( pNode->Len(), "CreateTextPortions should not be used for empty paragraphs!" );
- std::set< sal_Int32 > aPositions;
+ o3tl::sorted_vector< sal_Int32 > aPositions;
aPositions.insert( 0 );
sal_uInt16 nAttr = 0;
@@ -2463,10 +2464,10 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_Int32& rS
// A portion may also have been formed by a line break:
aPositions.insert( nPortionStart );
- std::set< sal_Int32 >::iterator nInvPos = aPositions.find( nPortionStart );
+ auto nInvPos = aPositions.find( nPortionStart );
DBG_ASSERT( (nInvPos != aPositions.end()), "InvPos ?!" );
- std::set< sal_Int32 >::iterator i = nInvPos;
+ auto i = nInvPos;
++i;
while ( i != aPositions.end() )
{