summaryrefslogtreecommitdiff
path: root/include/xmloff/xmltkmap.hxx
diff options
context:
space:
mode:
authorDaniel Sikeler <d.sikeler94@gmail.com>2016-08-25 02:19:48 +0530
committerNoel Grandin <noelgrandin@gmail.com>2016-08-26 07:40:39 +0000
commite3b3c3fe41fde28b01ab1b2d8408d92dfa837dc5 (patch)
tree4b72dc0a9df89bbd53ca86de8dee34bf8329f974 /include/xmloff/xmltkmap.hxx
parent674e0f0b43392a7e7fa515dad8427ccc901f7a01 (diff)
Make SvXMLTokenMap compatible with FastTokens:
Added new methods for the fasttokens and a lot of entries must be updated in later commits. Change-Id: I37de9c8d4bdeb75f678902a422a5961670480562 Reviewed-on: https://gerrit.libreoffice.org/28355 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/xmloff/xmltkmap.hxx')
-rw-r--r--include/xmloff/xmltkmap.hxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/xmloff/xmltkmap.hxx b/include/xmloff/xmltkmap.hxx
index 4cf640393660..c54d8012c682 100644
--- a/include/xmloff/xmltkmap.hxx
+++ b/include/xmloff/xmltkmap.hxx
@@ -28,20 +28,32 @@
class SvXMLTokenMap_Impl;
+class SvXMLTokenMapEntry_Impl;
#define XML_TOK_UNKNOWN 0xffffU
-#define XML_TOKEN_MAP_END { 0xffffU, ::xmloff::token::XML_TOKEN_INVALID, 0U }
+#define XML_TOKEN_MAP_END { 0xffffU, xmloff::token::XML_TOKEN_INVALID, 0U, 0 }
struct SvXMLTokenMapEntry
{
sal_uInt16 nPrefixKey;
- enum ::xmloff::token::XMLTokenEnum eLocalName;
+ enum xmloff::token::XMLTokenEnum eLocalName;
sal_uInt16 nToken;
+ sal_Int32 nFastToken;
+
+ SvXMLTokenMapEntry( sal_uInt16 nPrefix, xmloff::token::XMLTokenEnum eName,
+ sal_uInt16 nTok = XML_TOK_UNKNOWN, sal_Int32 nFastTok = 0 ) :
+ nPrefixKey( nPrefix ),
+ eLocalName( eName ),
+ nToken( nTok ),
+ nFastToken( nFastTok )
+ {}
};
class XMLOFF_DLLPUBLIC SvXMLTokenMap
{
+private:
std::unique_ptr<SvXMLTokenMap_Impl> m_pImpl;
+ sal_uInt16 Get( const SvXMLTokenMapEntry_Impl& rEntry ) const;
public:
@@ -49,6 +61,7 @@ public:
~SvXMLTokenMap();
sal_uInt16 Get( sal_uInt16 nPrefix, const OUString& rLName ) const;
+ sal_uInt16 Get( sal_Int32 nFastTok ) const;
};
#endif // INCLUDED_XMLOFF_XMLTKMAP_HXX