From d2e0465d406b33139f3a97e1738020d6a7a6f6c3 Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Fri, 30 May 2014 10:44:51 +0200 Subject: fdo#76324: Use one static SvXMLTokenMap object, it's faster. For me it saves ~10% of load time for calc document with 2000 comments. Thanks to Michael for noticing this oddity. Change-Id: Id44f44c02df2ae9360d02c28081601f5f7a8ea27 --- xmloff/source/style/xmlnumi.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 6649b29a9ca0..917b6f4312eb 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -291,7 +291,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( else if( IsXMLToken( rLName, XML_LIST_LEVEL_STYLE_IMAGE ) ) bImage = true; - SvXMLTokenMap aTokenMap( lcl_getLevelAttrTokenMap() ); + static const SvXMLTokenMap aTokenMap( lcl_getLevelAttrTokenMap() ); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -666,7 +666,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl( SvXMLImportContext( rImport, nPrfx, rLName ), rListLevel( rLLevel ) { - SvXMLTokenMap aTokenMap( lcl_getStyleAttributesAttrTokenMap() ); + static const SvXMLTokenMap aTokenMap( lcl_getStyleAttributesAttrTokenMap() ); SvXMLUnitConverter& rUnitConv = GetImport().GetMM100UnitConverter(); OUString sFontName, sFontFamily, sFontStyleName, sFontFamilyGeneric, @@ -960,7 +960,7 @@ SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl::SvxXMLListLevelStyleLabelAli SvXMLImportContext( rImport, nPrfx, rLName ), rListLevel( rLLevel ) { - SvXMLTokenMap aTokenMap( lcl_getStyleAlignmentAttributesAttrTokenMap() ); + static const SvXMLTokenMap aTokenMap( lcl_getStyleAlignmentAttributesAttrTokenMap() ); SvXMLUnitConverter& rUnitConv = GetImport().GetMM100UnitConverter(); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; -- cgit v1.2.3