Bug 101218 - ODF <draw:layer-set> as a child element of <draw:page> not supported
Summary: ODF <draw:layer-set> as a child element of <draw:page> not supported
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard: filter:odg target:6.3.0
Keywords:
Depends on:
Blocks: ODF-import Layers
  Show dependency treegraph
 
Reported: 2016-07-30 06:24 UTC by Yousuf Philips (jay) (retired)
Modified: 2019-01-20 09:56 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (8.76 KB, application/vnd.oasis.opendocument.graphics)
2016-07-30 06:24 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2016-07-30 06:24:27 UTC
Created attachment 126481 [details]
sample

Steps:
1) Open attached document created in Calligra Flow
2) Notice that in the layer tab bar the default Layout, Controls, Dimension Lines layer are shown rather than the actual ones - Layer 1, Layer 2, Layer 3.

The relevant xml code is

        <draw:layer-set>
          <draw:layer draw:name="Layer 1" />
          <draw:layer draw:name="Layer 2" />
          <draw:layer draw:name="Layer 3" />
        </draw:layer-set>

and

<draw:ellipse ... draw:layer="Layer 1" ... >
<draw:path ... draw:layer="Layer 2" ... >
<draw:path ... draw:layer="Layer 3" ... >

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
Comment 1 Heiko Tietze 2016-07-30 07:59:13 UTC
/confirmed
Comment 2 V Stuart Foote 2016-07-31 14:59:11 UTC
Yes, the import filter parses the multiple draw:layer into our default single draw:layer=Layout and loses the names of the source layers, as well as the draw:id

Probably not ideal handling for the import filter to be changing attributes.

And certainly disrupts things for interoperability on round trip for these ODF Drawings.
Comment 3 Yousuf Philips (jay) (retired) 2016-08-01 02:56:23 UTC
So i did some more digging and see that LO isnt importing the <draw:layer-set> because its a child element of <draw:page>, which according to the ODF spec is valid.

http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415796_253892949

"The <draw:layer-set> element defines a set of layers. If placed inside a <style:master-page> or <draw:page> element it defines a set of layers for that page. If placed inside the <office:master-styles> element it defines a set of layers for all pages that do not have their own set of layers."
Comment 4 QA Administrators 2017-09-01 11:18:14 UTC Comment hidden (obsolete)
Comment 5 Regina Henschel 2017-09-01 14:58:37 UTC
The problem still exists in Version: 6.0.0.0.alpha0+
Build ID: 4c99b8a9de59f3c5280ff2944d9f828822897f4a
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Locale: de-DE (de_DE); Calc: group
Comment 6 Regina Henschel 2018-04-08 08:17:20 UTC
On Hackfest Hamburg, April 2018, we decided to solve this as part of a larger project to improve the handling and internal structure of layers. I guess the fix will need at least a half year to be done.
Comment 7 Xisco Faulí 2018-07-09 10:18:02 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 8 Regina Henschel 2018-07-09 11:08:43 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 9 Regina Henschel 2019-01-16 23:35:11 UTC
As far as I know, Calligra Karbon is yet the only application, which produces such documents. Karbon can only handle documents with one page. So I will propose a solution, which imports the Karbon layers as global layers in LibreOffice. That is no interoperability problem, because Karbon can import all global layers and makes them to page layers.
That is a small solution, more a "workaround". When there will be a solution that implements full page and master page layer-set support, this part can be easily reverted. But until then it will provide a use-able document exchange with Karbon.
Comment 10 Commit Notification 2019-01-18 23:42:05 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/16fffbe869785dffeda9ae0d9f7c18a6559a2093%5E%21

tdf#101218 Import layer-set from page

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 11 Regina Henschel 2019-01-20 09:56:49 UTC
This commit fixes the reported import problem with files created by Karbon.

General support for layer-sets for pages and master-pages has no benefit in the moment. The development effort would be high. Such support would be a new feature. Therefor I set the bug to enhancement on low priority. I'm not going work on such feature.