diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-12-07 22:04:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-08 07:50:58 +0100 |
commit | 7896173f7ff017e338721b8079f00634a8879dab (patch) | |
tree | f465f88267d01b469bfe5b727b620b96abaadb31 /xmloff/source/draw/XMLShapeStyleContext.cxx | |
parent | 491992d0229afedba29b14778c918f6f9d2d7a07 (diff) |
fastparser in styles
Change-Id: I39d285f1dd7dd18c396db96863f77f511741951c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107364
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/draw/XMLShapeStyleContext.cxx')
-rw-r--r-- | xmloff/source/draw/XMLShapeStyleContext.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx index 5dd1da864f05..1da9e11cf074 100644 --- a/xmloff/source/draw/XMLShapeStyleContext.cxx +++ b/xmloff/source/draw/XMLShapeStyleContext.cxx @@ -42,10 +42,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::drawing; -using ::xmloff::token::IsXMLToken; -using ::xmloff::token::XML_TEXT_PROPERTIES; -using ::xmloff::token::XML_GRAPHIC_PROPERTIES; -using ::xmloff::token::XML_PARAGRAPH_PROPERTIES; +using namespace ::xmloff::token; XMLShapeStyleContext::XMLShapeStyleContext( @@ -61,22 +58,21 @@ XMLShapeStyleContext::~XMLShapeStyleContext() { } -void XMLShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName, const OUString& rValue ) +void XMLShapeStyleContext::SetAttribute( sal_Int32 nElement, const OUString& rValue ) { - if (m_sControlDataStyleName.isEmpty() && (::xmloff::token::GetXMLToken(::xmloff::token::XML_DATA_STYLE_NAME) == rLocalName)) + if (m_sControlDataStyleName.isEmpty() && (nElement & TOKEN_MASK) == XML_DATA_STYLE_NAME) { m_sControlDataStyleName = rValue; } - else if( (XML_NAMESPACE_STYLE == nPrefixKey) && IsXMLToken( rLocalName, ::xmloff::token::XML_LIST_STYLE_NAME ) ) + else if( nElement == XML_ELEMENT(STYLE, XML_LIST_STYLE_NAME) ) { m_sListStyleName = rValue; } else { - XMLPropStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue ); + XMLPropStyleContext::SetAttribute( nElement, rValue ); - if( (XML_NAMESPACE_STYLE == nPrefixKey) && - ( IsXMLToken( rLocalName, ::xmloff::token::XML_NAME ) || IsXMLToken( rLocalName, ::xmloff::token::XML_DISPLAY_NAME ) ) ) + if( nElement == XML_ELEMENT(STYLE, XML_NAME) || nElement == XML_ELEMENT(STYLE, XML_DISPLAY_NAME) ) { if( !GetName().isEmpty() && !GetDisplayName().isEmpty() && GetName() != GetDisplayName() ) { |