Bug Hunting Session
Bug 102256 - ODF filter: <table:table> as child of <draw:custom-shape> is written in case of strict ODF1.2, but invalid
Summary: ODF filter: <table:table> as child of <draw:custom-shape> is written in case ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:odf
Depends on:
Blocks: ODF-export-invalid Shapes-Custom
  Show dependency treegraph
 
Reported: 2016-09-18 15:34 UTC by Regina Henschel
Modified: 2019-10-14 23:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Table in custom-shape (29.32 KB, application/vnd.oasis.opendocument.text)
2016-09-18 15:34 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-09-18 15:34:20 UTC
Created attachment 127406 [details]
Table in custom-shape

The <table:table> element is not allowed as child of a <draw:custom-shape>. For saving in extended ODF1.2 this was fixed in bug 84714 by using a <loext:table> in case of the <table:table> element.

But in case of strict ODF1.2 this invalid element is still written.

In addition this invalid table will be removed when the document is load. That is a bad user experience, because users do not know internals like ODF file format. They only notice, that their table is lost.

How to reproduce: Load the attached document. Set your LibreOffice to save in strict ODF 1.2. Save a copy of the document. Look at the file source to see the invalid table. Reload the "strict ODF1.2"-document to see that the table is lost.

[I'm not sure about the component.]
Comment 1 Buovjaga 2016-10-05 12:09:09 UTC
Repro.

Used Tools - Options - Load/Save - General - ODF Format version: 1.2.

Win 7 Pro 64-bit Version: 5.3.0.0.alpha0+
Build ID: 7da2f3ce9f7b049c177a735a146dae84a764d3f7
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-10-04_03:49:06
Locale: fi-FI (fi_FI); Calc: CL
Comment 2 QA Administrators 2018-05-29 02:36:49 UTC Comment hidden (obsolete)
Comment 3 Regina Henschel 2018-11-06 13:53:55 UTC
The error still exists in Version: 6.2.0.0.alpha1+ (x64)
Build ID: f825e6d4082c0d0beb1c95b881f6a2ee9bfc9161
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-05_00:20:26
Locale: de-DE (en_US); Calc: CL

The enhancement request to allow table in custom-shapes is in https://issues.oasis-open.org/browse/OFFICE-3761
Comment 4 Julien Nabet 2018-12-30 20:19:23 UTC
Reading this one, I wonder if we shouldn't add a dialog indicating that since we use ODF 1.2 strict, some parts of the documents won't be exported so a backup should be made.
Finally, block lines 1099 to 1139 from sw/source/filter/xml/xmltble.cxx should be executed only if we use odf version > 1.2
Any thoughts?
Comment 5 Regina Henschel 2018-12-31 02:12:00 UTC
(In reply to Julien Nabet from comment #4)
> Reading this one, I wonder if we shouldn't add a dialog indicating that
> since we use ODF 1.2 strict, some parts of the documents won't be exported
> so a backup should be made.

The export to ODF 1.2 strict is only available via Tools > Options. So I assume, that users who switch to strict are advanced users. I think, that an additional dialog is not necessary. There is already the text "! Not using ODF 1.2 Extended may cause information to be lost." This could be extended by a hint to make a backup in 'extended' format. And perhaps a link to detailed information about 'strict' and 'extended'.

There exists the page https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes/List_of_LibreOffice_ODF_Extensions. But that page is currently in such a bad state, that it is not helpful for users and not even helpful for developers. And the help [https://help.libreoffice.org/Common/General_7] has only one example about a feature, which does not exist in 'strict'. Improvement in that area would be a different issue.


> Finally, block lines 1099 to 1139 from sw/source/filter/xml/xmltble.cxx
> should be executed only if we use odf version > 1.2
> Any thoughts?

Why do you think so? The <office:dde-source> element exists already in ODF 1.1.
Comment 6 Julien Nabet 2018-12-31 13:59:03 UTC
(In reply to Regina Henschel from comment #5)
> ...
> 
> Why do you think so? The <office:dde-source> element exists already in ODF
> 1.1.
You're right, forget my last comment.
Comment 7 Regina Henschel 2019-10-14 23:25:32 UTC
The error still exists in Version: 6.4.0.0.alpha0+ (x86)
Build ID: 2ef2c031ce9ec730b13fca8bca808f382aab5fe4
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: CL

It would be possible to use in ODF 1.2 strict a construction like this:
Write a <draw:frame> as child of a <text:p> element and then the <table:table> element as child of the frame.