diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-10-27 21:23:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-28 07:22:35 +0100 |
commit | 917401207eed9e3c70a01260f1ea770779620e9d (patch) | |
tree | 9c087ba4cdf7be4e9f012e1a42224d9ea9d3e5fa /xmloff | |
parent | 4b6ebf3b4f2992a8b796443fe666ee32e2e47c1d (diff) |
std::set->o3tl::sorted_vector in xmloff
Change-Id: Iba07a9905f37c2fb00d59ac00703744e5f81b1c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104906
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp_impl.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/elementexport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/elementexport.hxx | 4 |
4 files changed, 12 insertions, 9 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 723c07fe15c4..4c526f9b8236 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -44,6 +44,7 @@ #include <xmloff/xmluconv.hxx> #include <xmloff/SchXMLSeriesHelper.hxx> #include <rtl/math.hxx> +#include <o3tl/sorted_vector.hxx> #include <vector> #include <algorithm> @@ -3363,9 +3364,11 @@ void SchXMLExportHelper_Impl::exportDataPoints( // collect elements if( bVaryColorsByPoint && xColorScheme.is() ) { - ::std::set< sal_Int32 > aAttrPointSet; - aAttrPointSet.insert( pPoints, pPoints + aDataPointSeq.getLength() ); - const ::std::set< sal_Int32 >::const_iterator aEndIt( aAttrPointSet.end()); + o3tl::sorted_vector< sal_Int32 > aAttrPointSet; + aAttrPointSet.reserve(aDataPointSeq.getLength()); + for (auto p = pPoints; p < pPoints + aDataPointSeq.getLength(); ++p) + aAttrPointSet.insert( *p ); + const auto aEndIt = aAttrPointSet.end(); for( nElement = 0; nElement < nSeriesLength; ++nElement ) { aPropertyStates.clear(); diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx index aacacba93b07..c2c3f7a16c14 100644 --- a/xmloff/source/draw/sdxmlexp_impl.hxx +++ b/xmloff/source/draw/sdxmlexp_impl.hxx @@ -25,7 +25,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> -#include <set> +#include <o3tl/sorted_vector.hxx> #include <vector> namespace tools { class Rectangle; } @@ -54,7 +54,7 @@ enum XmlPlaceholder XmlPlaceholderVerticalOutline }; -typedef std::set<sal_Int32> SdXMLFormatMap; +typedef o3tl::sorted_vector<sal_Int32> SdXMLFormatMap; struct HeaderFooterPageSettingsImpl { diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 1006fc19a152..4fdad0a36ee2 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -1293,7 +1293,7 @@ namespace xmloff ++pValues; } - Int16Set::iterator aSelectedPos = aSelection.find(i); + Int16Set::const_iterator aSelectedPos = aSelection.find(i); if (aSelection.end() != aSelectedPos) { // the item at this position is selected AddAttribute( @@ -1304,7 +1304,7 @@ namespace xmloff aSelection.erase(aSelectedPos); } - Int16Set::iterator aDefaultSelectedPos = aDefaultSelection.find(i); + Int16Set::const_iterator aDefaultSelectedPos = aDefaultSelection.find(i); if (aDefaultSelection.end() != aDefaultSelectedPos) { // the item at this position is selected as default AddAttribute( diff --git a/xmloff/source/forms/elementexport.hxx b/xmloff/source/forms/elementexport.hxx index 13e1b52d2260..92c5a70f61e5 100644 --- a/xmloff/source/forms/elementexport.hxx +++ b/xmloff/source/forms/elementexport.hxx @@ -23,7 +23,7 @@ #include <sal/config.h> #include <memory> -#include <set> +#include <o3tl/sorted_vector.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/script/ScriptEventDescriptor.hpp> @@ -88,7 +88,7 @@ namespace xmloff ,public OElementExport { protected: - typedef std::set<sal_Int16> Int16Set; + typedef o3tl::sorted_vector<sal_Int16> Int16Set; // used below OUString m_sControlId; // the control id to use when exporting |