Blob Blame History Raw
From 763e3855caacbfc4818e70464bca348de10fbc3d Mon Sep 17 00:00:00 2001
From: Joren De Cuyper <jorendc@libreoffice.org>
Date: Mon, 14 Jul 2014 17:57:06 +0200
Subject: [PATCH 020/137] fdo#78554 - SVG: Text from SVG no longer displayed in
 LibreOffice
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

regression of 3b7472b284131c09d91b69f26d5d26d54648f939

Change-Id: I95a30acbf4b2684dda9684f5b51b887356a940e1
Reviewed-on: https://gerrit.libreoffice.org/10304
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
---
 svgio/source/svgreader/svgsvgnode.cxx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index cde5387..f85318b 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -60,8 +60,13 @@ namespace svgio
 
         const SvgStyleAttributes* SvgSvgNode::getSvgStyleAttributes() const
         {
-            checkForCssStyle(OUString("svg"), maSvgStyleAttributes);
-            return maSvgStyleAttributes.getCssStyleParent();
+            const SvgStyleAttributes* aCheckCssStyle = checkForCssStyle(OUString("svg"), maSvgStyleAttributes);
+            const SvgStyleAttributes* aGetCssStyleParent = maSvgStyleAttributes.getCssStyleParent();
+
+            if (aGetCssStyleParent == NULL)
+                return aCheckCssStyle;
+
+            return aGetCssStyleParent;
         }
 
         void SvgSvgNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
-- 
1.9.3