summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-02-04 10:14:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-04 10:09:04 +0100
commitd543d4d5388f79eee92a97b7bf4cd490d9ed29ea (patch)
tree416c7e3c33f947d9899431aa180cbe1a33d4a78e /svx
parent213d6390a2cc59d174173f4359c161625a9c4bdc (diff)
std::set<T*> -> o3tl::sorted_vector
Change-Id: I562f8a8dc27f4aeebec6f6643b95460315edc9c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/inc/svdoutlinercache.hxx4
-rw-r--r--svx/source/svdraw/svdotxat.cxx2
-rw-r--r--svx/source/svdraw/svdouno.cxx14
3 files changed, 7 insertions, 13 deletions
diff --git a/svx/source/inc/svdoutlinercache.hxx b/svx/source/inc/svdoutlinercache.hxx
index 0dc4994cc29d..01679f6b9391 100644
--- a/svx/source/inc/svdoutlinercache.hxx
+++ b/svx/source/inc/svdoutlinercache.hxx
@@ -22,7 +22,7 @@
#include <memory>
#include <vector>
-#include <set>
+#include <o3tl/sorted_vector.hxx>
class SdrModel;
class SdrOutliner;
@@ -34,7 +34,7 @@ private:
SdrModel* mpModel;
std::vector< std::unique_ptr<SdrOutliner> > maModeOutline;
std::vector< std::unique_ptr<SdrOutliner> > maModeText;
- std::set< SdrOutliner* > maActiveOutliners;
+ o3tl::sorted_vector< SdrOutliner* > maActiveOutliners;
public:
SdrOutlinerCache( SdrModel* pModel );
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index ad4c9f6965c1..04b8de638f65 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -351,7 +351,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
}
// now convert the strings in the vector from names to StyleSheet*
- std::set<SfxStyleSheet*> aStyleSheets;
+ o3tl::sorted_vector<SfxStyleSheet*> aStyleSheets;
while (!aStyleNames.empty()) {
OUString aName = aStyleNames.back();
aStyleNames.pop_back();
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index 7e5e6e571d6e..111aa5ed0cd5 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -50,6 +50,7 @@
#include <tools/diagnose_ex.h>
#include <svx/svdograf.hxx>
#include <tools/debug.hxx>
+#include <o3tl/sorted_vector.hxx>
using namespace ::com::sun::star;
using namespace sdr::contact;
@@ -349,7 +350,7 @@ void SdrUnoObj::NbcSetLayer( SdrLayerID _nLayer )
// same time)
// collect all views in which our old layer is visible
- ::std::set< SdrView* > aPreviouslyVisible;
+ o3tl::sorted_vector< SdrView* > aPreviouslyVisible;
{
SdrViewIter aIter( this );
@@ -360,20 +361,13 @@ void SdrUnoObj::NbcSetLayer( SdrLayerID _nLayer )
SdrRectObj::NbcSetLayer( _nLayer );
// collect all views in which our new layer is visible
- ::std::set< SdrView* > aNewlyVisible;
+ o3tl::sorted_vector< SdrView* > aNewlyVisible;
{
SdrViewIter aIter( this );
for ( SdrView* pView = aIter.FirstView(); pView; pView = aIter.NextView() )
{
- ::std::set< SdrView* >::const_iterator aPrevPos = aPreviouslyVisible.find( pView );
- if ( aPreviouslyVisible.end() != aPrevPos )
- { // in pView, we were visible _before_ the layer change, and are
- // visible _after_ the layer change, too
- // -> we're not interested in this view at all
- aPreviouslyVisible.erase( aPrevPos );
- }
- else
+ if ( aPreviouslyVisible.erase(pView) == 0 )
{
// in pView, we were visible _before_ the layer change, and are
// _not_ visible after the layer change