Bug 98599 - SVG: attributes of defs are not considered, but childs may inherit them
Summary: SVG: attributes of defs are not considered, but childs may inherit them
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.3.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0
Keywords: filter:svg
Depends on:
Blocks:
 
Reported: 2016-03-11 10:40 UTC by Regina Henschel
Modified: 2016-10-25 19:09 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
inheritance from a attribute of defs (1.93 KB, image/svg+xml)
2016-03-11 10:40 UTC, Regina Henschel
Details
inheritance from a style attribute of defs (1.94 KB, image/svg+xml)
2016-03-11 10:41 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2016-03-11 10:40:30 UTC
Created attachment 123493 [details]
inheritance from a attribute of defs

The defs element acts same as the g element in regard to inheritance. Therefore its attributes have to be considered.

In the attached file (see also bug 47446) the middle marker has no own fill attribute but inherits it from the defs element and therefore it should be filled yellow.
Comment 1 Regina Henschel 2016-03-11 10:41:04 UTC
Created attachment 123494 [details]
inheritance from a style attribute of defs
Comment 2 Regina Henschel 2016-03-14 23:47:22 UTC
It seems, that it is in the case distinction

     if (SVGTokenDefs == getType())

in SvgGNode::getSvgStyleAttributes()

If I use

   return checkForCssStyle("defs", maSvgStyleAttributes);

in case SVGTokenDefs, then I get the yellow fill inherit from the defs element to the marker.

@XISCO: Do you see any problems with this solution?
Comment 3 Commit Notification 2016-03-17 07:45:58 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f5d4a688346a939a58b1df69d771dede177b3370

tdf#98599 SVG: consider attributes of 'defs' element

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2016-04-12 22:03:31 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=de32fe50299a8891102528379e291919d2b66f56

SVG: Add unittest for tdf#47446 and tdf#98599

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.