summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-24 19:40:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-24 21:20:52 +0200
commit2771a7929158cbeed9df6b51f4684da471c9cb04 (patch)
tree9d2134df17b5189f0e14addd0cfce340994e96dc /xmloff
parentde01c0c1d0f80ffec3882625d77c02ab806f6c7a (diff)
fix some fastparser related bugs
in my previous commits, which interacted in entertaining ways to prevent any unit test from finding them Change-Id: Ifc3a5e7bbf83549d9f56eac70d9e6a064a6fb103 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101286 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/ximpstyl.cxx9
-rw-r--r--xmloff/source/draw/ximpstyl.hxx2
-rw-r--r--xmloff/source/style/DashStyle.cxx8
3 files changed, 14 insertions, 5 deletions
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 611c70f85e05..82846738b3ab 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -673,20 +673,24 @@ SdXMLPresentationPlaceholderContext::SdXMLPresentationPlaceholderContext(
break;
}
case XML_ELEMENT(SVG, XML_X):
+ case XML_ELEMENT(SVG_COMPAT, XML_X):
{
GetSdImport().GetMM100UnitConverter().convertMeasureToCore(
mnX, sValue);
break;
}
case XML_ELEMENT(SVG, XML_Y):
+ case XML_ELEMENT(SVG_COMPAT, XML_Y):
{
break;
}
case XML_ELEMENT(SVG, XML_WIDTH):
+ case XML_ELEMENT(SVG_COMPAT, XML_WIDTH):
{
break;
}
case XML_ELEMENT(SVG, XML_HEIGHT):
+ case XML_ELEMENT(SVG_COMPAT, XML_HEIGHT):
{
break;
}
@@ -885,10 +889,9 @@ SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext(
sal_Int32 nElement,
const uno::Reference< xml::sax::XFastAttributeList >& xAttrList)
{
- SvXMLStyleContext* pContext = nullptr;
if( nElement == XML_ELEMENT(TABLE, XML_TABLE_TEMPLATE) )
{
- pContext = GetImport().GetShapeImport()->GetShapeTableImport()->CreateTableTemplateContext(nElement, xAttrList );
+ auto pContext = GetImport().GetShapeImport()->GetShapeTableImport()->CreateTableTemplateContext(nElement, xAttrList );
if (pContext)
return pContext;
}
@@ -900,7 +903,7 @@ SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext(
else if (nElement == XML_ELEMENT(STYLE, XML_PRESENTATION_PAGE_LAYOUT))
{
// style:presentation-page-layout inside office:styles context
- pContext = new SdXMLPresentationPageLayoutContext(GetSdImport(), nElement, xAttrList);
+ return new SdXMLPresentationPageLayoutContext(GetSdImport(), nElement, xAttrList);
}
// call base class
diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx
index 843182809d60..818a9e043594 100644
--- a/xmloff/source/draw/ximpstyl.hxx
+++ b/xmloff/source/draw/ximpstyl.hxx
@@ -159,8 +159,6 @@ public:
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
- virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
- const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {}
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
sal_uInt16 GetTypeId() const { return mnTypeId; }
diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx
index 2fb258492cb4..3c83c23d1b89 100644
--- a/xmloff/source/style/DashStyle.cxx
+++ b/xmloff/source/style/DashStyle.cxx
@@ -113,25 +113,30 @@ void XMLDashStyleImport::importXML(
switch( aIter.getToken() )
{
case XML_ELEMENT(DRAW, XML_NAME):
+ case XML_ELEMENT(DRAW_OOO, XML_NAME):
{
rStrName = aStrValue;
}
break;
case XML_ELEMENT(DRAW, XML_DISPLAY_NAME):
+ case XML_ELEMENT(DRAW_OOO, XML_DISPLAY_NAME):
{
aDisplayName = aStrValue;
}
break;
case XML_ELEMENT(DRAW, XML_STYLE):
+ case XML_ELEMENT(DRAW_OOO, XML_STYLE):
{
SvXMLUnitConverter::convertEnum( aLineDash.Style, aStrValue, pXML_DashStyle_Enum );
}
break;
case XML_ELEMENT(DRAW, XML_DOTS1):
+ case XML_ELEMENT(DRAW_OOO, XML_DOTS1):
aLineDash.Dots = static_cast<sal_Int16>(aStrValue.toInt32());
break;
case XML_ELEMENT(DRAW, XML_DOTS1_LENGTH):
+ case XML_ELEMENT(DRAW_OOO, XML_DOTS1_LENGTH):
{
if( aStrValue.indexOf( '%' ) != -1 ) // it's a percentage
{
@@ -147,10 +152,12 @@ void XMLDashStyleImport::importXML(
break;
case XML_ELEMENT(DRAW, XML_DOTS2):
+ case XML_ELEMENT(DRAW_OOO, XML_DOTS2):
aLineDash.Dashes = static_cast<sal_Int16>(aStrValue.toInt32());
break;
case XML_ELEMENT(DRAW, XML_DOTS2_LENGTH):
+ case XML_ELEMENT(DRAW_OOO, XML_DOTS2_LENGTH):
{
if( aStrValue.indexOf( '%' ) != -1 ) // it's a percentage
{
@@ -166,6 +173,7 @@ void XMLDashStyleImport::importXML(
break;
case XML_ELEMENT(DRAW, XML_DISTANCE):
+ case XML_ELEMENT(DRAW_OOO, XML_DISTANCE):
{
if( aStrValue.indexOf( '%' ) != -1 ) // it's a percentage
{