[Libreoffice-commits] core.git: xmloff/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 24 19:21:30 UTC 2020


 xmloff/source/draw/ximpstyl.cxx   |    9 ++++++---
 xmloff/source/draw/ximpstyl.hxx   |    2 --
 xmloff/source/style/DashStyle.cxx |    8 ++++++++
 3 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 2771a7929158cbeed9df6b51f4684da471c9cb04
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 24 19:40:14 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 24 21:20:52 2020 +0200

    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 at collabora.co.uk>

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
                 {


More information about the Libreoffice-commits mailing list