summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-05-30 10:44:51 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-06-02 08:50:57 +0200
commit29162832feafca9259dc1589d10f3cfd43ea8126 (patch)
tree7cba5ca55ddfeaf2f7dd36e04c36929f8750e796
parent996d5f81d049bde7148a3afc776f8cdaa6b0101e (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 (cherry picked from commit d2e0465d406b33139f3a97e1738020d6a7a6f6c3)
-rw-r--r--xmloff/source/style/xmlnumi.cxx6
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;