summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-06-27 00:46:25 +0530
committerMichael Meeks <michael.meeks@collabora.com>2017-06-27 17:51:33 +0200
commitc44d9f9e627eb074367cc47ae4742aedea44c370 (patch)
tree140d8cbef8335d416e2d6cb2a836ee60c56ceeef /xmloff
parentd109948f0dd4190d7aca1e0fa7e2706ef3f40a6c (diff)
Using fast tokens directly:
Replacing integer-to-integer mapped tokens with fast Tokens direcly for branching. Adding a macro XML_ELEMENT that combines namespace and element tokens. Change-Id: I8701c8af9607392843460fe726bffb6556cf9b33 Reviewed-on: https://gerrit.libreoffice.org/39275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlimp.cxx4
-rw-r--r--xmloff/source/style/GradientStyle.cxx2
-rw-r--r--xmloff/source/style/HatchStyle.cxx2
-rw-r--r--xmloff/source/style/TransGradientStyle.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index efaa9bb3e5a8..b4e5698832ad 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -789,9 +789,9 @@ void SAL_CALL SvXMLImport::setDocumentLocator( const uno::Reference< xml::sax::X
void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
{
- if ( Attribs.is() && Attribs->hasAttribute( NAMESPACE_TOKEN( XML_NAMESPACE_OFFICE ) | XML_VERSION ) )
+ if ( Attribs.is() && Attribs->hasAttribute( XML_ELEMENT( OFFICE, XML_VERSION ) ) )
{
- mpImpl->aODFVersion = Attribs->getValue( NAMESPACE_TOKEN( XML_NAMESPACE_OFFICE ) | XML_VERSION );
+ mpImpl->aODFVersion = Attribs->getValue( XML_ELEMENT( OFFICE, XML_VERSION ) );
// the ODF version in content.xml and manifest.xml must be the same starting from ODF1.2
if ( mpImpl->mStreamName == "content.xml" && !IsODFVersionConsistent( mpImpl->aODFVersion ) )
diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx
index e11c4b1c6112..53ec6158763c 100644
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -94,7 +94,7 @@ void XMLGradientStyleImport::importXML(
{ XML_NAMESPACE_DRAW, XML_END_INTENSITY, XML_TOK_GRADIENT_ENDINT },
{ XML_NAMESPACE_DRAW, XML_GRADIENT_ANGLE, XML_TOK_GRADIENT_ANGLE },
{ XML_NAMESPACE_DRAW, XML_GRADIENT_BORDER, XML_TOK_GRADIENT_BORDER,
- NAMESPACE_TOKEN( XML_NAMESPACE_DRAW ) | XML_BORDER },
+ XML_ELEMENT( DRAW, XML_BORDER ) },
// XML_GRADIENT_BORDER is a duplicate of XML_BORDER
XML_TOKEN_MAP_END
};
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx
index 1c8915eacff9..99111dcdd359 100644
--- a/xmloff/source/style/HatchStyle.cxx
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -79,7 +79,7 @@ void XMLHatchStyleImport::importXML(
{ XML_NAMESPACE_DRAW, XML_STYLE, XML_TOK_HATCH_STYLE },
{ XML_NAMESPACE_DRAW, XML_COLOR, XML_TOK_HATCH_COLOR },
{ XML_NAMESPACE_DRAW, XML_HATCH_DISTANCE, XML_TOK_HATCH_DISTANCE,
- NAMESPACE_TOKEN( XML_NAMESPACE_DRAW ) | XML_DISTANCE },
+ XML_ELEMENT( DRAW, XML_DISTANCE ) },
// XML_HATCH_DISTANCE is a duplicate of XML_DISTANCE
{ XML_NAMESPACE_DRAW, XML_ROTATION, XML_TOK_HATCH_ROTATION },
XML_TOKEN_MAP_END
diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx
index 5d574d98c8d7..3c222d8f2a85 100644
--- a/xmloff/source/style/TransGradientStyle.cxx
+++ b/xmloff/source/style/TransGradientStyle.cxx
@@ -99,7 +99,7 @@ void XMLTransGradientStyleImport::importXML(
{ XML_NAMESPACE_DRAW, XML_END, XML_TOK_GRADIENT_END },
{ XML_NAMESPACE_DRAW, XML_GRADIENT_ANGLE, XML_TOK_GRADIENT_ANGLE },
{ XML_NAMESPACE_DRAW, XML_GRADIENT_BORDER, XML_TOK_GRADIENT_BORDER,
- NAMESPACE_TOKEN( XML_NAMESPACE_DRAW ) | XML_BORDER },
+ XML_ELEMENT( DRAW, XML_BORDER ) },
// XML_GRADIENT_BORDER is a duplicate of XML_BORDER
XML_TOKEN_MAP_END
};