summaryrefslogtreecommitdiff
path: root/xmloff/source/style/GradientStyle.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-02-27 13:59:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-27 18:54:30 +0100
commit913ed8398667dfd0d6f03923507e14c8e2642c90 (patch)
treefca4fbdecd19516e3a417e97b671e49126ae00ae /xmloff/source/style/GradientStyle.cxx
parent53a8e2f75da778c953b509efadca890ff0936c2f (diff)
remove duplicate tokens from xmloff
Which causes trouble when converting stuff to use FastParser APIs. I see we used to use dummy entries to avoid perfhash complaining, which is fine for exporting, but doesn't work when we use these constants for fast-parser importing, because the imported element/attribute ends up mapped to what looks like the "wrong" constant. So let's just make the constants match their textual representation. Change-Id: I173d4b1e5fedede18375a6f7c15b1f36a48e4063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89627 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/style/GradientStyle.cxx')
-rw-r--r--xmloff/source/style/GradientStyle.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx
index 9d5316e5de91..97721db74ea3 100644
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -61,7 +61,7 @@ enum SvXMLTokenMapAttrs
SvXMLEnumMapEntry<awt::GradientStyle> const pXML_GradientStyle_Enum[] =
{
- { XML_GRADIENTSTYLE_LINEAR, awt::GradientStyle_LINEAR },
+ { XML_LINEAR, awt::GradientStyle_LINEAR },
{ XML_GRADIENTSTYLE_AXIAL, awt::GradientStyle_AXIAL },
{ XML_GRADIENTSTYLE_RADIAL, awt::GradientStyle_RADIAL },
{ XML_GRADIENTSTYLE_ELLIPSOID, awt::GradientStyle_ELLIPTICAL },
@@ -98,9 +98,7 @@ void XMLGradientStyleImport::importXML(
{ XML_NAMESPACE_DRAW, XML_START_INTENSITY, XML_TOK_GRADIENT_STARTINT },
{ 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,
- XML_ELEMENT( DRAW, XML_BORDER ) },
- // XML_GRADIENT_BORDER is a duplicate of XML_BORDER
+ { XML_NAMESPACE_DRAW, XML_BORDER, XML_TOK_GRADIENT_BORDER, },
XML_TOKEN_MAP_END
};
@@ -270,7 +268,7 @@ void XMLGradientStyleExport::exportXML(
// Border
::sax::Converter::convertPercent( aOut, aGradient.Border );
aStrValue = aOut.makeStringAndClear();
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_GRADIENT_BORDER, aStrValue );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_BORDER, aStrValue );
// Do Write
SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_GRADIENT,