diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-10-27 21:17:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-28 07:21:42 +0100 |
commit | 35f16614ee7ddf518d4c01de6b1d800f5ff1ba7e (patch) | |
tree | e888a2b191379d90d460fc4a4aa82959c5441da2 | |
parent | a4d4ed86991e2901ac86189e95966d4e99be4944 (diff) |
std::set->o3tl::sorted_vector in vcl
Change-Id: Ie486b629b4074da5121b55c76965aeb8ea057f31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104904
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | vcl/inc/PhysicalFontFamily.hxx | 4 | ||||
-rw-r--r-- | vcl/source/edit/texteng.cxx | 8 | ||||
-rw-r--r-- | vcl/source/font/PhysicalFontCollection.cxx | 4 | ||||
-rw-r--r-- | vcl/source/font/PhysicalFontFamily.cxx | 2 | ||||
-rw-r--r-- | vcl/source/font/fontcharmap.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk3/a11y/gtk3atkutil.cxx | 2 |
7 files changed, 15 insertions, 13 deletions
diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx index b8468a6e4580..cd9f3f08e8d1 100644 --- a/vcl/inc/PhysicalFontFamily.hxx +++ b/vcl/inc/PhysicalFontFamily.hxx @@ -23,7 +23,7 @@ #include <vcl/dllapi.h> #include <vcl/outdev.hxx> -#include <set> +#include <o3tl/sorted_vector.hxx> #include <unotools/fontcfg.hxx> @@ -60,7 +60,7 @@ public: const OUString& GetAliasNames() const { return maMapNames; } int GetMinQuality() const { return mnMinQuality; } FontTypeFaces GetTypeFaces() const { return mnTypeFaces; } - void GetFontHeights( std::set<int>& rHeights ) const; + void GetFontHeights( o3tl::sorted_vector<int>& rHeights ) const; const OUString& GetMatchFamilyName() const { return maMatchFamilyName; } ImplFontAttrs GetMatchType() const { return mnMatchType ; } diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index d05aeb892df3..e03a203ddb60 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -58,7 +58,7 @@ #include <cstddef> #include <cstdlib> #include <memory> -#include <set> +#include <o3tl/sorted_vector.hxx> #include <string_view> #include <vector> @@ -1700,8 +1700,8 @@ void TextEngine::CreateTextPortions( sal_uInt32 nPara, sal_Int32 nStartPos ) TextNode* pNode = pTEParaPortion->GetNode(); SAL_WARN_IF( pNode->GetText().isEmpty(), "vcl", "CreateTextPortions: should not be used for empty paragraphs!" ); - std::set<sal_Int32> aPositions; - std::set<sal_Int32>::iterator aPositionsIt; + o3tl::sorted_vector<sal_Int32> aPositions; + o3tl::sorted_vector<sal_Int32>::const_iterator aPositionsIt; aPositions.insert(0); const sal_uInt16 nAttribs = pNode->GetCharAttribs().Count(); @@ -1777,7 +1777,7 @@ void TextEngine::CreateTextPortions( sal_uInt32 nPara, sal_Int32 nStartPos ) if ( aPositionsIt != aPositions.end() ) { - std::set<sal_Int32>::iterator nextIt = aPositionsIt; + o3tl::sorted_vector<sal_Int32>::const_iterator nextIt = aPositionsIt; for ( ++nextIt; nextIt != aPositions.end(); ++aPositionsIt, ++nextIt ) { std::unique_ptr<TETextPortion> pNew( new TETextPortion( *nextIt - *aPositionsIt ) ); diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index 8ea23f0b8659..6741f79faae2 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -23,7 +23,7 @@ #include <i18nlangtag/mslangid.hxx> #include <unotools/configmgr.hxx> #include <unotools/fontdefs.hxx> - +#include <o3tl/sorted_vector.hxx> #include <outdev.h> #include <PhysicalFontCollection.hxx> @@ -905,7 +905,7 @@ std::unique_ptr<ImplDeviceFontSizeList> PhysicalFontCollection::GetDeviceFontSiz PhysicalFontFamily* pFontFamily = FindFontFamily( rFontName ); if( pFontFamily != nullptr ) { - std::set<int> rHeights; + o3tl::sorted_vector<int> rHeights; pFontFamily->GetFontHeights( rHeights ); for( const auto& rHeight : rHeights ) diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx index b8c630b6a7b3..d5ab2415b338 100644 --- a/vcl/source/font/PhysicalFontFamily.cxx +++ b/vcl/source/font/PhysicalFontFamily.cxx @@ -242,7 +242,7 @@ void PhysicalFontFamily::UpdateDevFontList( ImplDeviceFontList& rDevFontList ) c } } -void PhysicalFontFamily::GetFontHeights( std::set<int>& rHeights ) const +void PhysicalFontFamily::GetFontHeights( o3tl::sorted_vector<int>& rHeights ) const { // add all available font heights for (auto const& font : maFontFaces) diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx index 545707cc0906..e68939d3885e 100644 --- a/vcl/source/font/fontcharmap.cxx +++ b/vcl/source/font/fontcharmap.cxx @@ -23,7 +23,7 @@ #include <algorithm> #include <vector> -#include <set> +#include <o3tl/sorted_vector.hxx> CmapResult::CmapResult( bool bSymbolic, const sal_UCS4* pRangeCodes, int nRangeCount ) @@ -330,7 +330,8 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult ) if( aConverter && aCvtContext ) { // determine the set of supported code points from encoded ranges - std::set<sal_UCS4> aSupportedCodePoints; + o3tl::sorted_vector<sal_UCS4> aSupportedCodePoints; + aSupportedCodePoints.reserve(256); static const int NINSIZE = 64; static const int NOUTSIZE = 64; diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 592638222b2c..1e7d8db238e1 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -78,6 +78,7 @@ #include <impglyphitem.hxx> #include <pdf/XmpMetadata.hxx> #include <pdf/objectcopier.hxx> +#include <o3tl/sorted_vector.hxx> #include "pdfwriter_impl.hxx" @@ -5437,7 +5438,7 @@ struct AnnotationSortEntry struct AnnotSortContainer { - std::set< sal_Int32 > aObjects; + o3tl::sorted_vector< sal_Int32 > aObjects; std::vector< AnnotationSortEntry > aSortedAnnots; }; diff --git a/vcl/unx/gtk3/a11y/gtk3atkutil.cxx b/vcl/unx/gtk3/a11y/gtk3atkutil.cxx index 978c28e47df0..f253eef8254f 100644 --- a/vcl/unx/gtk3/a11y/gtk3atkutil.cxx +++ b/vcl/unx/gtk3/a11y/gtk3atkutil.cxx @@ -135,7 +135,7 @@ class DocumentFocusListener : public ::cppu::WeakImplHelper< accessibility::XAccessibleEventListener > { - std::set< uno::Reference< uno::XInterface > > m_aRefList; + o3tl::sorted_vector< uno::Reference< uno::XInterface > > m_aRefList; public: /// @throws lang::IndexOutOfBoundsException |