Bug 33241

Summary: [SVG Export] Order of shadows is incorrect (A shadow of text overlaps a shape)
Product: LibreOffice Reporter: Kurosawa Takeshi <taken.spc>
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: taken.spc
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: Original file with the order of shadows issues
Exported SVG with the order of shadows issue
Patch for rendering order issue
Exported SVG with patch

Description Kurosawa Takeshi 2011-01-18 05:26:02 UTC
Created attachment 42158 [details]
Original file with the order of shadows issues

In git master, I wrote small patches to export text color in the SVG Export filter.
http://cgit.freedesktop.org/libreoffice/filters/commit/?id=24e68935fb621eb6d30e30407f7b62deaede28a3

However these patches reveal some issues in text handling of the filter.

1. In Draw or Impress, if an object which contains texts and shapes has a shadow ("Area" -> "Shadow", not "Characters" -> "Font Effects"), the order of shadows in exported SVG is incorrect.

In screen, the rendering order is following:
* Text
* Shape
* Shadow of text
* Shadow of shape

However in exported SVG:

* Text
* Shadow of text (incorrect!)
* Shape
* Shadow of shape

See attached file for detail.

2. In Impress, the placeholder texts of slide master are exported which shouldn't.
Comment 1 Kurosawa Takeshi 2011-01-18 05:28:07 UTC
Created attachment 42159 [details]
Exported SVG with the order of shadows issue
Comment 2 Kurosawa Takeshi 2011-01-18 05:51:24 UTC
Created attachment 42161 [details]
Patch for rendering order issue

For rendering order issue, The filter exports shapes (and their shadow) at first, then exports texts (and their shadow). This causes the inverted order of shadows.

Although, the filter exports shapes and texts separately from the initial revision.
http://cgit.freedesktop.org/libreoffice/filters/diff/filter/source/svg/svgexport.cxx?id=d70fe3aea5ab065ab938cbd50366846f449fa7fa

I can't find any reason to do so. Make the filter export all contents at once.
# Please inform me if they were.
Comment 3 Kurosawa Takeshi 2011-01-18 05:53:21 UTC
Created attachment 42162 [details]
Exported SVG with patch
Comment 4 Kurosawa Takeshi 2011-01-18 05:57:30 UTC
Oops! I forgot setting the title of this bug!
# For the placeholder texts issue, I'll file a separate bug.
Comment 5 Don't use this account, use tml@iki.fi 2011-01-20 02:05:22 UTC
Thanks for the patch, pushed to master. Resolving this bug then, reopen if necessary.