configmgr/source/components.hxx | 3 ++- include/sfx2/linkmgr.hxx | 4 ++-- svx/source/inc/svdoutlinercache.hxx | 4 ++-- svx/source/svdraw/svdotxat.cxx | 2 +- svx/source/svdraw/svdouno.cxx | 14 ++++---------- 5 files changed, 11 insertions(+), 16 deletions(-)
New commits: commit d543d4d5388f79eee92a97b7bf4cd490d9ed29ea Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Feb 4 10:14:27 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Feb 4 10:09:04 2020 +0100 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.gran...@collabora.co.uk> diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx index bd4aeb5a78ac..6aec76bd1aad 100644 --- a/configmgr/source/components.hxx +++ b/configmgr/source/components.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/beans/Optional.hpp> #include <com/sun/star/uno/Reference.hxx> #include <rtl/ref.hxx> +#include <o3tl/sorted_vector.hxx> #include "additions.hxx" #include "data.hxx" @@ -139,7 +140,7 @@ private: int getExtensionLayer(bool shared) const; - typedef std::set< RootAccess * > WeakRootSet; + typedef o3tl::sorted_vector< RootAccess * > WeakRootSet; typedef config_map< diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx index 7f3bf021eeed..c12b453f56c5 100644 --- a/include/sfx2/linkmgr.hxx +++ b/include/sfx2/linkmgr.hxx @@ -24,7 +24,7 @@ #include <sfx2/dllapi.h> #include <sfx2/linksrc.hxx> #include <sfx2/lnkbase.hxx> -#include <set> +#include <o3tl/sorted_vector.hxx> #include <vector> class SfxObjectShell; @@ -47,7 +47,7 @@ namespace sfx2 typedef std::vector<tools::SvRef<SvBaseLink> > SvBaseLinks; -typedef std::set<SvLinkSource*> SvLinkSources; +typedef o3tl::sorted_vector<SvLinkSource*> SvLinkSources; class SFX2_DLLPUBLIC LinkManager { 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits