diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-05-30 10:44:51 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-05-30 14:04:08 +0200 |
commit | d2e0465d406b33139f3a97e1738020d6a7a6f6c3 (patch) | |
tree | 0265d8ada52bb6f77635948ffc941c9836ef924a | |
parent | e20876b37d203642b5aa81a2d6c93979600376ed (diff) |
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
-rw-r--r-- | xmloff/source/style/xmlnumi.cxx | 6 |
1 files 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; |