summaryrefslogtreecommitdiff
path: root/xmloff/source/chart
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-12-07 22:04:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-08 07:50:58 +0100
commit7896173f7ff017e338721b8079f00634a8879dab (patch)
treef465f88267d01b469bfe5b727b620b96abaadb31 /xmloff/source/chart
parent491992d0229afedba29b14778c918f6f9d2d7a07 (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/chart')
-rw-r--r--xmloff/source/chart/XMLChartStyleContext.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx
index b000a36b2f03..1f8fa14eee27 100644
--- a/xmloff/source/chart/XMLChartStyleContext.cxx
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -42,21 +42,19 @@ using ::xmloff::token::XML_CHART_PROPERTIES;
void XMLChartStyleContext::SetAttribute(
- sal_uInt16 nPrefixKey,
- const OUString& rLocalName,
+ sal_Int32 nElement,
const OUString& rValue )
{
- if( IsXMLToken( rLocalName, XML_DATA_STYLE_NAME ) )
- {
- msDataStyleName =rValue;
- }
- else if( IsXMLToken( rLocalName, XML_PERCENTAGE_DATA_STYLE_NAME ) )
- {
- msPercentageDataStyleName =rValue;
- }
- else
+ switch (nElement & TOKEN_MASK)
{
- XMLShapeStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
+ case XML_DATA_STYLE_NAME:
+ msDataStyleName = rValue;
+ break;
+ case XML_PERCENTAGE_DATA_STYLE_NAME:
+ msPercentageDataStyleName = rValue;
+ break;
+ default:
+ XMLShapeStyleContext::SetAttribute( nElement, rValue );
}
}