diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-31 14:06:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-31 18:54:45 +0100 |
commit | 885ae558d34dd76955c727b90eb9ae52ce85df7f (patch) | |
tree | 3dfe7a3f9ba268b3ec1affff1795dc23018fe260 /include/xmloff/xmlimp.hxx | |
parent | 09758c0e717a9ff31b004532906f902763300a93 (diff) |
tdf#125688, cache token names as OUString
to avoid construction cost, shaves 2% off load time
Change-Id: I37a70a6e989f53d67911a6cb217d07e2db55cb44
Reviewed-on: https://gerrit.libreoffice.org/81841
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/xmloff/xmlimp.hxx')
-rw-r--r-- | include/xmloff/xmlimp.hxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 78bc26a7c234..0007f6dd5086 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -90,6 +90,9 @@ enum class SvXMLErrorFlags; namespace xmloff { class RDFaImportHelper; } +namespace xmloff::token { + class FastTokenHandler; +} enum class SvXMLImportFlags { NONE = 0x0000, @@ -219,7 +222,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper< rtl::Reference < comphelper::AttributeList > maAttrList; rtl::Reference < comphelper::AttributeList > maNamespaceAttrList; css::uno::Reference< css::xml::sax::XFastDocumentHandler > mxFastDocumentHandler; - static css::uno::Reference< css::xml::sax::XFastTokenHandler > xTokenHandler; + static rtl::Reference< xmloff::token::FastTokenHandler > xTokenHandler; static std::unordered_map< sal_Int32, std::pair< OUString, OUString > > aNamespaceMap; static std::unordered_map< OUString, OUString > aNamespaceURIPrefixMap; static bool bIsNSMapsInitialized; @@ -377,7 +380,7 @@ public: // get import helper for events XMLEventImportHelper& GetEventImport(); - static OUString getNameFromToken( sal_Int32 nToken ); + static const OUString & getNameFromToken( sal_Int32 nToken ); static OUString getNamespacePrefixFromToken(sal_Int32 nToken, const SvXMLNamespaceMap* pMap); static OUString getNamespaceURIFromToken( sal_Int32 nToken ); static OUString getNamespacePrefixFromURI( const OUString& rURI ); |