Bug 112005 - ODF: wrong place for draw:notify-on-update-of-ranges, is in loext:p, should be in draw:object
Summary: ODF: wrong place for draw:notify-on-update-of-ranges, is in loext:p, should b...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL: http://docs.oasis-open.org/office/v1....
Whiteboard: odf target:6.0.0 target:5.3.7 target:...
Keywords: regression
Depends on:
Blocks: ODF-export-invalid
  Show dependency treegraph
 
Reported: 2017-08-24 13:08 UTC by Regina Henschel
Modified: 2017-10-09 23:14 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet with simple colum chart for testing (13.47 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-08-24 13:08 UTC, Regina Henschel
Details
Paintbrush OLE (11.96 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2017-09-17 22:00 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-08-24 13:08:10 UTC
Created attachment 135763 [details]
Spreadsheet with simple colum chart for testing

Make a spreadsheet with a simple column chart or use the attached document.
Unpack the document and open content.xml
Find the attribute draw:notify-on-update-of-ranges
You will find it in table:shapes -> draw:frame -> loext:p
It should be in table:shapes -> draw:frame -> draw:object

LibreOffice must not invent own attributes, if ODF has already suitable ones.

Save the file in strict ODF 1.2. The resulting file is invalid.
Comment 1 Buovjaga 2017-09-08 15:15:41 UTC
Let's set to NEW.
Comment 2 Regina Henschel 2017-09-13 22:10:44 UTC
It was OK in

Version: 4.5.0.0.alpha0+
Build ID: 40b1e8266e47792d354cd457c652bfb0f0a21e69
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-02-11_00:13:43
Locale: de_DE

and fails since
Version: 5.0.0.0.alpha1
Build ID: 77a35997fa7cff387b5b135ff0c42155f80e9884
Locale: de_DE
Comment 3 Regina Henschel 2017-09-17 22:00:54 UTC
Created attachment 136323 [details]
Paintbrush OLE

A similar problem exists with OLE. There the CLSID value is written as
 <draw:frame><loext:p draw:class-id="..."><draw:object-ole ...>
But it should be
<draw:frame><draw:object-ole draw:class-id="..." ...>

With such wrong place of the class-id the file is not readable by other applications like Excel.

The test needs Windows 7 with Paint installed: Open attached document and double-click the image. It should open in Paint. In Paint open menu File and return back. Now save the document with a different name in LibreOffice. Open both versions in Excel. Excel will not find the image in the resaved version, because the class-id is at a wrong place. You need to activate the OLE, because otherwise LibreOffice does not consider the file as changed.
Comment 4 Michael Stahl (allotropia) 2017-09-20 15:33:10 UTC
bibsect blames this commit:

    commit 204d1093d4954596cc7d7578e0630648f1f678f5
    Author:     Markus Mohrhard <markus.mohrhard@googlemail.com>
    AuthorDate: Mon Apr 6 15:25:54 2015 +0200
    
        only try to export text:p for elements that really support it
Comment 5 Michael Stahl (allotropia) 2017-09-20 16:00:28 UTC
patch that puts the attributes on the right element at:

https://gerrit.libreoffice.org/#/c/42401/

i haven't checked the "strict ODF 1.2" part of it,
is it so that the loext:p is written even with that setting?

that would also be a bug...
Comment 6 Commit Notification 2017-09-20 21:13:53 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112005 xmloff: ODF export: export embedded object text *first*

It will be available in 6.0.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 Regina Henschel 2017-09-21 09:20:28 UTC
I have use Version: 6.0.0.0.alpha0+
Build ID: 86f256596c8566e80993e1cf6035bc3534b6f816
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Locale: de-DE (de_DE); Calc: group

I have tested MathOLE embedded in Draw, WriterOLE extern in Draw, foreignOLE in Draw, Presentation Chart in Impress, page anchored chart in Calc, cell anchored chart in Calc, Pivot Table chart in Calc. In all cases the written file is valid now. The text is in a loext: namespace and draw:notify-on-update-of-ranges and draw:class-id are at the correct place now.

There are remaining problems with that feature. I will write new reports for that.

I have changed Assignee to Michael Stahl, because he actually made the patch.
Comment 8 Regina Henschel 2017-09-21 10:13:46 UTC
Follow up reports are bug 112545 and bug 112547.
Comment 9 Commit Notification 2017-09-24 15:23:59 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=65c99825ceb08743a70b6e598f65491a67d9a884&h=libreoffice-5-3

tdf#112005 xmloff: ODF export: export embedded object text *first*

It will be available in 5.3.7.

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 2017-09-24 15:24:10 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

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

tdf#112005 xmloff: ODF export: export embedded object text *first*

It will be available in 5.4.3.

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 11 Commit Notification 2017-09-27 16:15:01 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e03ca0f635fd79dbac772a6abf8f2b2a7a36868f&h=libreoffice-5-4-2

tdf#112005 xmloff: ODF export: export embedded object text *first*

It will be available in 5.4.2.

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.