From f6df52aa3aad9c7650b6ca051d9a28c4ccb6a060 Mon Sep 17 00:00:00 2001 From: Joren De Cuyper Date: Mon, 14 Jul 2014 17:57:06 +0200 Subject: 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/10302 Reviewed-by: Tomaž Vajngerl Tested-by: Tomaž Vajngerl --- 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 50dbef752131..73a5efbdda9e 100644 --- a/svgio/source/svgreader/svgsvgnode.cxx +++ b/svgio/source/svgreader/svgsvgnode.cxx @@ -58,8 +58,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) -- cgit v1.2.3