[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - svgio/source

Xisco Fauli anistenis at gmail.com
Thu Sep 1 10:19:51 UTC 2016


 svgio/source/svgreader/svgstyleattributes.cxx |   24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

New commits:
commit 5811f80ca2b7a34acd43137b649fd7b362dc0048
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Tue Aug 30 16:21:52 2016 +0200

    tdf#101237 SVGIO: Use black as default when parents' fill...
    
    ...attributes are empty or none and there's a reference
    to a clip-path present.
    
    Change-Id: I4dc4e3bcaac43a007fbdb8a1d006cbd39c737396
    Reviewed-on: https://gerrit.libreoffice.org/28514
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 1e8810b..8e569d5 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1986,14 +1986,26 @@ namespace svgio
 
                 if(pSvgStyleAttributes)
                 {
-                    return pSvgStyleAttributes->getFill();
+                    const basegfx::BColor* pFill = pSvgStyleAttributes->getFill();
+
+                    if(mbIsClipPathContent)
+                    {
+                        if (pFill)
+                        {
+                            return pFill;
+                        }
+                        else
+                        {
+                            static basegfx::BColor aBlack(0.0, 0.0, 0.0);
+                            return &aBlack;
+                        }
+                    }
+                    else
+                    {
+                        return pFill;
+                    }
                 }
             }
-            else if(mbIsClipPathContent)
-            {
-                static basegfx::BColor aBlack(0.0, 0.0, 0.0);
-                return &aBlack;
-            }
 
             return nullptr;
         }


More information about the Libreoffice-commits mailing list