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

Joren De Cuyper jorendc at libreoffice.org
Tue Jul 22 04:39:27 PDT 2014


 svgio/source/svgreader/svgstyleattributes.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 3d3401a6397e893808309ec374f5d8f890144906
Author: Joren De Cuyper <jorendc at libreoffice.org>
Date:   Tue Jul 22 13:19:42 2014 +0200

    Revert "fdo#74743 avoid infinite loop when gathering "svg" element styles"
    
    This reverts commit 3b7472b284131c09d91b69f26d5d26d54648f939.
    Commit 0879a639bc7c734f0847f74b965809f9107b3195 didn't
    revert all changes, so we ran into problems getting the
    css style correctly.
    
    Conflicts:
    	svgio/source/svgreader/svgstyleattributes.cxx
    	svgio/source/svgreader/svgsvgnode.cxx
    
    Change-Id: I4d17c6d599482de005c009638d03ca851491f700
    Reviewed-on: https://gerrit.libreoffice.org/10455
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index cc9d40c..9c24753 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -203,15 +203,16 @@ namespace svgio
 
         const SvgStyleAttributes* SvgStyleAttributes::getParentStyle() const
         {
-            const SvgStyleAttributes* pParentStyle = getCssStyleParent();
+            if(getCssStyleParent())
+            {
+                return getCssStyleParent();
+            }
 
-            if(mrOwner.supportsParentStyle() && mrOwner.getParent())
+            if(mrOwner.getParent())
             {
                 return mrOwner.getParent()->getSvgStyleAttributes();
             }
 
-            if (pParentStyle != this) // to prevent infinite loop
-                return pParentStyle;
             return NULL;
         }
 


More information about the Libreoffice-commits mailing list