Bug 85770 - In svg image, visibility does not work for tspan
Summary: In svg image, visibility does not work for tspan
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha1
Hardware: x86 (IA32) Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.1.1
Keywords: filter:svg
Depends on:
Blocks:
 
Reported: 2014-11-02 19:07 UTC by Regina Henschel
Modified: 2016-10-25 19:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
attribute visibility on a tspan element (688 bytes, image/svg+xml)
2014-11-02 19:07 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2014-11-02 19:07:10 UTC
Created attachment 108806 [details]
attribute visibility on a tspan element

I have tested the new implementation for svg visibility in Version: 4.4.0.0.alpha1+ Build ID: b167d1127e1579468a74c4414e7f4f33d9d24122
TinderBox: Win-x86@51-TDF, Branch:MASTER, Time: 2014-11-02_03:04:44

The attribute visible="hidden" on a tspan-element is not handled at all. In addition the code provides no parts to solve keeping space as described in http://www.w3.org/TR/SVG/painting.html#VisibilityProperty
"Note that if the ‘visibility’ property is set to hidden on a ‘tspan’, ‘tref’ or ‘altGlyph’ element, then the text is invisible but still takes up space in text layout calculations."

Hi Christina, I've put you in CC because you have implemented it.
Comment 1 Julien Nabet 2014-11-02 21:20:25 UTC
Regina: did you use Insert image or just open the svg?
Indeed, there are svg is managed in 2 different ways (see http://nabble.documentfoundation.org/About-Svgreader-td4107050.html#a4107868)

So for example, Christina's commit, http://cgit.freedesktop.org/libreoffice/core/commit/?id=501f25e3291dd0ab38e3612de2fc160d953c1846, concerns "Insert image part.
Comment 2 Regina Henschel 2014-11-02 21:51:56 UTC
I insert the image via Insert > Media > Image.

The problem is, that for a SvgTspanNode the inherited method decomposeSvgNode is not called at all, but rendering is handled inside the parent SvgTextNode. And the SvgTextNode uses its own method decomposeSvgNode and the rendering of SvgTspanNode is done via method addTextPrimitives, which in turn calls SvgStyleAttributes::add_text and that does not consider visibility.
Comment 3 Buovjaga 2014-11-15 16:58:00 UTC
If I open it in draw, I see no words. If I insert, I see all words.

Win 7 64-bit Version: 4.4.0.0.alpha2+
Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08
Comment 4 Xisco Faulí 2015-12-01 11:35:45 UTC
Add whiteboard 'filter:svgInsert' as the issue is related to svgio filter ( Insert -> Image ).
The problem in svg filter ( File -> Open ) is another one. I'll create a different issue
Comment 5 Robinson Tryon (qubit) 2015-12-09 18:51:34 UTC Comment hidden (obsolete)
Comment 6 Commit Notification 2016-01-18 17:02:30 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#85770 SVG: Don't display text elements if parent's...

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 7 Commit Notification 2016-01-21 06:32:38 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#85770 reuse variable instead of getting it again

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 8 Commit Notification 2016-01-25 10:08:15 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c54e48d2bb7bf4aaf7a4ea933ba5a330df54453a&h=libreoffice-5-1

tdf#85770 SVG: Don't display text elements if parent's...

It will be available in 5.1.1.

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 9 Commit Notification 2016-02-02 12:16:25 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9c93720b5023ac57b5e5d5e63a748e6d953f0a17&h=libreoffice-5-1

tdf#85770 reuse variable instead of getting it again

It will be available in 5.1.1.

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 10 Commit Notification 2016-02-09 14:29:10 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

SVGIO: tdf#85770: Add import test

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.