summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-24 15:42:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-25 19:00:26 +0200
commita0731f14d1b9c86a626e8560053d87dcaaef8ad6 (patch)
tree90fa6819a390f5b05ee8add037265fa4b976c8f7 /starmath/source
parent1bfbef9ad2092106c8f1f6c3e5942940173c2d15 (diff)
std::set->o3tl::sorted_vector in MathTypeFontSet
Change-Id: I8b664f10bee232355eeb431de6b1445d9c797f6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/mathtype.cxx3
-rw-r--r--starmath/source/mathtype.hxx4
2 files changed, 4 insertions, 3 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 4df34fa1714e..518f29fc5b40 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -45,6 +45,7 @@ void MathType::Init()
stored in the document
*/
MathTypeFont aFont;
+ aUserStyles.reserve(11);
for(sal_uInt8 i=1;i<=11;i++)
{
aFont.nTface = i+128;
@@ -540,7 +541,7 @@ void MathTypeFont::AppendStyleToText(OUString &rRet)
void MathType::TypeFaceToString(OUString &rTxt,sal_uInt8 nFace)
{
MathTypeFont aFont(nFace);
- MathTypeFontSet::iterator aItr = aUserStyles.find(aFont);
+ auto aItr = aUserStyles.find(aFont);
if (aItr != aUserStyles.end())
aFont.nStyle = aItr->nStyle;
aFont.AppendStyleToText(rTxt);
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index 4293b1e0608f..cd06cfcddf87 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -21,7 +21,7 @@
#include <node.hxx>
-#include <set>
+#include <o3tl/sorted_vector.hxx>
class SfxMedium;
class SotStorage;
@@ -46,7 +46,7 @@ struct LessMathTypeFont
}
};
-typedef ::std::set< MathTypeFont, LessMathTypeFont > MathTypeFontSet;
+typedef o3tl::sorted_vector< MathTypeFont, LessMathTypeFont > MathTypeFontSet;
class MathType
{