Kaydet (Commit) 2dbd2cb9 authored tarafından Joren De Cuyper's avatar Joren De Cuyper Kaydeden (comit) Tomaž Vajngerl

Avoid infinite loop when gathering "g" element styles

Same way of how fdo#74743 is fixed 3b7472b2

Change-Id: If6cc8eb6ff89b0081f27ff75a9b60a3e81cff1bd
Reviewed-on: https://gerrit.libreoffice.org/10326Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
Tested-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst f634ec52
...@@ -82,6 +82,9 @@ void Test::testStyles() ...@@ -82,6 +82,9 @@ void Test::testStyles()
Primitive2DSequence maSequenceRectWithParentStyle = parseSvg("/svgio/qa/cppunit/data/RectWithParentStyles.svg"); Primitive2DSequence maSequenceRectWithParentStyle = parseSvg("/svgio/qa/cppunit/data/RectWithParentStyles.svg");
CPPUNIT_ASSERT_EQUAL(1, (int) maSequenceRectWithParentStyle.getLength()); CPPUNIT_ASSERT_EQUAL(1, (int) maSequenceRectWithParentStyle.getLength());
Primitive2DSequence maSequenceRectWithStylesByGroup = parseSvg("/svgio/qa/cppunit/data/RectWithStylesByGroup.svg");
CPPUNIT_ASSERT_EQUAL(1, (int) maSequenceRectWithStylesByGroup.getLength());
// TODO: Test if the 3 sequences are equal.. // TODO: Test if the 3 sequences are equal..
//const Primitive2DReference xReference(maSequenceRect[0]); //const Primitive2DReference xReference(maSequenceRect[0]);
} }
......
This diff was suppressed by a .gitattributes entry.
...@@ -43,7 +43,13 @@ namespace svgio ...@@ -43,7 +43,13 @@ namespace svgio
const SvgStyleAttributes* SvgGNode::getSvgStyleAttributes() const const SvgStyleAttributes* SvgGNode::getSvgStyleAttributes() const
{ {
return checkForCssStyle(OUString("g"), maSvgStyleAttributes); const SvgStyleAttributes* aCheckCssStyle = checkForCssStyle(OUString("g"), maSvgStyleAttributes);
const SvgStyleAttributes* aGetCssStyleParent = maSvgStyleAttributes.getCssStyleParent();
if (aGetCssStyleParent == NULL)
return aCheckCssStyle;
return aGetCssStyleParent;
} }
void SvgGNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) void SvgGNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment