Bug 115429 - libvisio generates svg:fill-rule attribute which is round-tripped to a non-well-formed XML document by LO
Summary: libvisio generates svg:fill-rule attribute which is round-tripped to a non-we...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: odf odf_validation target:6.1.0 targe...
Keywords: bibisected, bisected, regression
: 115455 115644 115882 116405 116556 116728 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-02-03 18:27 UTC by Juergen
Modified: 2018-04-01 08:31 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
*.vsd file and according *.odg file (52.62 KB, application/x-zip-compressed)
2018-02-03 18:27 UTC, Juergen
Details
Error message (24.66 KB, image/png)
2018-02-14 12:52 UTC, Pietro Torrente
Details
File generated (13.40 KB, application/vnd.oasis.opendocument.graphics)
2018-02-24 17:14 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen 2018-02-03 18:27:05 UTC
Created attachment 139558 [details]
*.vsd file and according *.odg file

when opening a visio (*.vsd) file with LibreOffice Draw you can save this file to the Draw Format (*.odg). When I close this new file and open it again, then the following message will appear:

Lesefehler.
Formatfehler in Teildokument content.xml an Position 2,3473(Zeile,Spalte) in der Datei entdeckt.

This error will not appear when I do the same procedure as discribed above with LibreOfficeDraw 5.3.7.

All versions  from 5.4.x to 6.0.x will create the above error message.
Comment 1 MM 2018-02-03 21:58:36 UTC
Confirmed under ubuntu 16.04 x64 with Version: 5.5.0.0.alpha0+
Build ID: 59c9d0653cc42560af48269bb8dee2c2b0b20f68
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-06-06_23:50:05
Locale: en-US (en_US.UTF-8); Calc: single

Unconfirmed with Version: 5.3.7.2
Build ID: 6b8ed514a9f8b44d37a1b96673cbbdd077e24059
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; VCL: gtk2; Layout Engine: new; 
Locale: en-US (en_US.UTF-8); Calc: single
Comment 2 Julien Nabet 2018-02-04 12:36:07 UTC
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.

Here are the corrupted blocks generated :
<style:graphic-properties ="evenodd" draw:stroke="none" draw:fill="solid" draw:fill-color="#ffffcc" draw:shadow="hidden"/>
<style:graphic-properties ="evenodd" draw:stroke="none" draw:fill="gradient" draw:fill-gradient-name="Gradient_5f_0" draw:shadow="hidden"/>
Comment 3 Xisco Faulí 2018-02-05 11:42:02 UTC
Regression introduced by:

author	Mohammed Abdul Azeem <azeemmysore@gmail.com>	2017-03-15 10:20:06 +0530
committer	David Tardon <dtardon@redhat.com>	2017-03-21 09:24:32 +0000
commit	9f9e861c6d168e8318b9cdc761a387b0d650e5c0 (patch)
tree	02bdb8da78c2b899a5ed9d4132ec02632490c3c2
parent	d7470bab57640a4499500e3c06ace4fb8ab9c4af (diff)
Old-to-new mapping of attributes is moved into a Module:
This should make it easy to reuse the mapping code wherever
necessary and restores the loading of writerperfect documents.

Bisected with: bibisect-linux-64-5.4

Adding Cc: to Mohammed Abdul Azeem
Comment 4 Julien Nabet 2018-02-05 13:13:32 UTC
I submitted a patch here:
https://gerrit.libreoffice.org/#/c/49242/

It allows to open the odg file without error but I noticed "evenodd" parts quoted in my previous comment were lacking in the odg generated from vsd.
Perhaps "svg:fill-rule" should be declared in other files like:
- include/xmloff/xmltoken.hxx
- xmloff/source/core/xmltoken.cxx
- dtd/drawing.mod
- other?
?

David: I put you in cc. Indeed, since you were the reviewer of the patch quoted by Xisco, thought you might have some idea too.
Comment 5 MM 2018-02-05 20:46:14 UTC
Notice that when saving to otg, you'll get the same error as when saving to odg. And when saving to fodg, you'll get a "General Error. General input/output error.". All formats still worked when saving with v5.3.7.2.
Comment 6 Julien Nabet 2018-02-12 20:31:29 UTC
*** Bug 115644 has been marked as a duplicate of this bug. ***
Comment 7 Julien Nabet 2018-02-14 08:52:38 UTC
*** Bug 115455 has been marked as a duplicate of this bug. ***
Comment 8 Pietro Torrente 2018-02-14 12:44:50 UTC
The problem persiste in version 6.0.1.1.
Comment 9 Pietro Torrente 2018-02-14 12:52:04 UTC
Created attachment 139905 [details]
Error message
Comment 10 Julien Nabet 2018-02-20 13:45:58 UTC
*** Bug 115882 has been marked as a duplicate of this bug. ***
Comment 11 Julien Nabet 2018-02-24 17:14:05 UTC
Created attachment 140115 [details]
File generated

File generated on LO built locally with the patch proposed in https://gerrit.libreoffice.org/#/c/49242/3
Comment 12 Commit Notification 2018-02-28 00:42:39 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#115429: declare fill-rule

It will be available in 6.1.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 13 Julien Nabet 2018-02-28 06:34:18 UTC
Patch for 6.0 on gerrit review here:
https://gerrit.libreoffice.org/#/c/50480/
Comment 14 Michael Stahl (CIB) 2018-02-28 13:23:03 UTC
i'll try to add some asserts for that sort of thing...
Comment 15 Commit Notification 2018-02-28 22:28:03 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4b29ee6a6a5620610de816b27dccd9c0121e49be&h=libreoffice-6-0

tdf#115429: declare fill-rule

It will be available in 6.0.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 16 Commit Notification 2018-03-01 19:58:56 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#115429 xmloff: ODF import: fix handling of unknown attributes

It will be available in 6.1.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 17 Commit Notification 2018-03-01 19:59:04 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#115429 sax: assert if exporting an invalid XML attribute/element

It will be available in 6.1.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 18 Commit Notification 2018-03-02 08:52:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#115429 sax,xmloff: assert on empty attribute names & namespaces

It will be available in 6.1.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 19 Michael Stahl (CIB) 2018-03-02 11:59:12 UTC
okay so Julien's patch works around the problem for the particular attribute that is generated by libvisio for this document, but the same thing could potentially happen for any other attribute that the ODF filter doesn't know yet.

so i've added a more general fix to handle unknown attributes properly.
Comment 20 Commit Notification 2018-03-07 12:18:08 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=316501e04218e86c1e97a0fa606727d0fa989eaa&h=libreoffice-6-0

tdf#115429 xmloff: ODF import: fix handling of unknown attributes

It will be available in 6.0.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 21 Commit Notification 2018-03-14 08:04:27 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=dab0220f91bcd2dab85309c14bcd10c27639544d&h=libreoffice-5-4

tdf#115429 xmloff: ODF import: fix handling of unknown attributes

It will be available in 5.4.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 22 Commit Notification 2018-03-14 17:21:58 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4-6":

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

tdf#115429 xmloff: ODF import: fix handling of unknown attributes

It will be available in 5.4.6.

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 23 Julien Nabet 2018-03-14 18:37:04 UTC
Let's simplify a bit targets.
Comment 24 Julien Nabet 2018-03-14 19:50:04 UTC
*** Bug 116405 has been marked as a duplicate of this bug. ***
Comment 25 Julien Nabet 2018-03-22 08:06:04 UTC
*** Bug 116556 has been marked as a duplicate of this bug. ***
Comment 26 Mike Kaganski 2018-04-01 08:31:18 UTC
*** Bug 116728 has been marked as a duplicate of this bug. ***