Bug 101242 - ODF draw:display and draw:protected attributes of <draw:layer> not supported
Summary: ODF draw:display and draw:protected attributes of <draw:layer> not supported
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: odf target:6.2.0
Keywords:
Depends on:
Blocks: ODF-import Layers
  Show dependency treegraph
 
Reported: 2016-08-01 03:16 UTC by Yousuf Philips (jay) (retired)
Modified: 2020-04-13 05:31 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (10.68 KB, application/vnd.oasis.opendocument.graphics)
2016-08-01 03:16 UTC, Yousuf Philips (jay) (retired)
Details
Eight combinations (12.91 KB, application/vnd.oasis.opendocument.graphics)
2016-08-01 08:38 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2016-08-01 03:16:00 UTC
Created attachment 126506 [details]
sample

Steps:
1) Open attached doc
2) Notice all 4 shapes are visible and appear when you print them (print to file if you dont have a printer ;D)

Version: 5.3.0.0.alpha0+
Build ID: d2e4753c3f511cfc6b2932ce60d0bc2e09296f9f
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-07-26_17:32:37
Locale: en-US (en_US.UTF-8); Calc: group

So ODF specifies that the <draw:layer> tag can have a draw:display attribute with values that change how it appears on screen or outputted to the printer and these values are being ignored on import. We do support the functionality for the 'none' value, which is equivalent to making the layer invisible, but not sure about the 'printer' (only show it when printed) and 'screen' (only show it on the screen) values.

http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#attribute-draw_display
Comment 1 Regina Henschel 2016-08-01 08:38:20 UTC
Created attachment 126509 [details]
Eight combinations
Comment 2 Regina Henschel 2016-08-01 08:44:42 UTC
Indeed, the attributes draw:display and draw:protected have never been implemented. Instead the settings config:name="VisibleLayers" and config:name="PrintableLayers" and config:name="LockedLayers" are used with binary data.
Comment 3 Heiko Tietze 2016-08-01 09:36:03 UTC
Bug 53864 "Export ignores layer options 'printable' and 'visible'" could be solved by another flag leading to 2^4 combinations, or the export is bind to one of the existing states. In this case I suggest to use printable.
Comment 4 Regina Henschel 2017-04-26 13:46:10 UTC
We need no additional flag but only an export to the ODF attributes instead of writing it to binary(!) private config items.

The UI has checkboxes for visible, printable and locked. Checkbox 'visible' together with checkbox 'printable' results in the four attribute values 'always', 'none', 'printer' and 'screen' of attribute draw:display. And UI checkbox 'locked' corresponds directly to the values 'false' and 'true' of attribute draw:protected.
Comment 5 Regina Henschel 2017-11-27 00:12:22 UTC
I'll try to find a solution.
Comment 6 Xisco Faulí 2018-02-26 11:46:39 UTC Comment hidden (obsolete)
Comment 7 Regina Henschel 2018-02-26 13:01:46 UTC
I have suggested it as topic for the Hackfest in Hamburg 7./8. Apr. 2018.
Comment 8 Xisco Faulí 2018-02-26 13:02:37 UTC
Ok, assigning it back to you then...
Comment 9 Xisco Faulí 2018-07-09 10:18:59 UTC
Dear Regina Henschel,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 10 Regina Henschel 2018-07-09 11:09:28 UTC
Yes, I'm still working on it. Armin reviews my work, but he is currently very busy with all the regressions, therefore progress is slow.

The solution for this issue needs large changes in core.
Comment 11 Commit Notification 2018-08-27 14:28:11 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

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

tdf#101242 Support draw:display and draw:protect attributes of ODF

It will be available in 6.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 12 Regina Henschel 2018-10-09 09:26:18 UTC
Fixed in current master