[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - filter/source sd/qa

Gülşah Köse (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 18 10:36:29 UTC 2019


 filter/source/svg/svgexport.cxx |   20 +++++++++++---------
 sd/qa/unit/SVGExportTests.cxx   |    2 +-
 2 files changed, 12 insertions(+), 10 deletions(-)

New commits:
commit 78d1f37b09eb94b8bb59bc5ccc6c237a440d4d69
Author:     Gülşah Köse <gulsah.kose at collabora.com>
AuthorDate: Thu Jan 31 16:48:22 2019 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Sep 18 12:35:41 2019 +0200

    tdf#115549 Enable handling background object.
    
    Change-Id: Ibb9c01d83572259b812981aa6229e9aa9b7c60f3
    Signed-off-by: Gülşah Köse <gulsah.kose at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/67215
    Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
    Tested-by: Marco Cecchetti <mrcekets at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/78382
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 9f09e984733a..d27125a26ae4 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -2037,7 +2037,6 @@ bool SVGFilter::implCreateObjects()
 
         if( xDrawPage.is() )
         {
-#ifdef ENABLE_EXPORT_CUSTOM_SLIDE_BACKGROUND
             // TODO complete the implementation for exporting custom background for each slide
             // implementation status:
             // - hatch stroke color is set to 'none' so the hatch is not visible, why?
@@ -2047,18 +2046,21 @@ bool SVGFilter::implCreateObjects()
             // - tiled bitmap: an image element is exported for each tile,
             //   this is really too expensive!
             Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY );
-            Reference< XPropertySet > xBackground;
-            xPropSet->getPropertyValue( "Background" ) >>= xBackground;
-            if( xBackground.is() )
+            if( xPropSet.is() )
             {
-                drawing::FillStyle aFillStyle;
-                sal_Bool assigned = ( xBackground->getPropertyValue( "FillStyle" ) >>= aFillStyle );
-                if( assigned && aFillStyle != drawing::FillStyle_NONE )
+                Reference< XPropertySet > xBackground;
+                xPropSet->getPropertyValue( "Background" ) >>= xBackground;
+                if( xBackground.is() )
                 {
-                    implCreateObjectsFromBackground( xDrawPage );
+                    drawing::FillStyle aFillStyle;
+                    bool assigned = ( xBackground->getPropertyValue( "FillStyle" ) >>= aFillStyle );
+                    if( assigned && aFillStyle != drawing::FillStyle_NONE
+                                 && aFillStyle != drawing::FillStyle_BITMAP )
+                    {
+                        implCreateObjectsFromBackground( xDrawPage );
+                    }
                 }
             }
-#endif
             implCreateObjectsFromShapes( xDrawPage, xDrawPage );
         }
     }
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index 8c55bf45d48b..400d604e786c 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -120,7 +120,7 @@ public:
         // There should be only one child (no link to javascript url)
         assertXPathChildren(svgDoc,
                             MAKE_PATH_STRING(/ SVG_SVG / SVG_G[2] / SVG_G / SVG_G / SVG_G / SVG_G
-                                             / SVG_G[3] / SVG_G),
+                                             / SVG_G[4] / SVG_G),
                             1);
     }
 


More information about the Libreoffice-commits mailing list