diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-28 12:38:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-29 08:31:21 +0200 |
commit | b1e36f4d264f1d8d8df4558ba0c781ccb93a4244 (patch) | |
tree | 39b8e40a58c9d9d78c455ead6d0aef6c2aa7a0ea /xmloff/source/xforms | |
parent | 560a0f2fbe452d25fe78d6756919c11ec67f630f (diff) |
tdf#63640 FILEOPEN/FILESAVE: particular .odt loads/saves very slow, part4
cache the XMLTokenMap data in static const vars, so we only need to
initialise them once
Change-Id: Ib63bedc5af5d5927fed189a6b1a86a5db6865c72
Reviewed-on: https://gerrit.libreoffice.org/71466
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/xforms')
-rw-r--r-- | xmloff/source/xforms/xformsapi.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index 7a5f9aacc0d9..f52aac6272b6 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.cxx @@ -195,7 +195,7 @@ sal_uInt16 xforms_getTypeClass( // translate name into token for local name OUString sLocalName; sal_uInt16 nPrefix = rNamespaceMap.GetKeyByAttrName(rXMLName, &sLocalName); - SvXMLTokenMap aMap( aTypes ); + static const SvXMLTokenMap aMap( aTypes ); sal_uInt16 nToken = aMap.Get( nPrefix, sLocalName ); sal_uInt16 nTypeClass = css::xsd::DataTypeClass::STRING; @@ -265,7 +265,7 @@ OUString xforms_getTypeName( { OUString sLocalName; sal_uInt16 nPrefix = rNamespaceMap.GetKeyByAttrName(rXMLName, &sLocalName); - SvXMLTokenMap aMap( aTypes ); + static const SvXMLTokenMap aMap( aTypes ); sal_uInt16 nToken = aMap.Get( nPrefix, sLocalName ); return ( nToken == XML_TOK_UNKNOWN ) ? rXMLName |