summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorJoren De Cuyper <jorendc@libreoffice.org>2014-07-22 13:19:42 +0200
committerTomaž Vajngerl <quikee@gmail.com>2014-07-22 11:38:56 +0000
commit3d3401a6397e893808309ec374f5d8f890144906 (patch)
treef497560a921db9bacd1b008cfb05a253bc72cf8f /svgio
parent9c7a7d85aa6de5d4c384608dce157c420bc7c74f (diff)
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@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svgio')
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index cc9d40cfb16e..9c247532125b 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;
}