diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-04 10:14:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-04 10:09:04 +0100 |
commit | d543d4d5388f79eee92a97b7bf4cd490d9ed29ea (patch) | |
tree | 416c7e3c33f947d9899431aa180cbe1a33d4a78e /svx/source/svdraw | |
parent | 213d6390a2cc59d174173f4359c161625a9c4bdc (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/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdotxat.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdouno.cxx | 14 |
2 files changed, 5 insertions, 11 deletions
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 |