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 -#include +#include 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 {