Bug 77451 - Import ODG from AOO >=4.0 does not support fix position after z
Summary: Import ODG from AOO >=4.0 does not support fix position after z
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: Other All
: medium normal
Assignee: Laurent Balland
URL:
Whiteboard: target:4.3.0 target:4.2.5
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-14 21:14 UTC by Laurent Balland
Modified: 2014-05-24 09:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Drawing saved with LibO 3.4.6 correctly open in LibO (12.35 KB, application/vnd.oasis.opendocument.graphics)
2014-04-14 21:14 UTC, Laurent Balland
Details
Drawing saved with AOO 3.4.0 correctly open in LibO (12.06 KB, application/vnd.oasis.opendocument.graphics)
2014-04-14 21:16 UTC, Laurent Balland
Details
Drawing saved with AOO 4.0.0 NOT correctly open in LibO (12.30 KB, application/vnd.oasis.opendocument.graphics)
2014-04-14 21:17 UTC, Laurent Balland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2014-04-14 21:14:58 UTC
Created attachment 97365 [details]
Drawing saved with LibO 3.4.6 correctly open in LibO

Problem description:
svg:d path were wrongly interpreted before LibO 3.5. To keep compatibility with previous versions, if an old version is detected, then path is interpreted as it was. It also works well with files save with AOO, till version 4.0. Files save with AOO 4.0.x as interpreted with valid path and give ugly drawings.

Steps to reproduce:
1. create a drawing with LibO <3.5 or OOo or AOO <4.0 which contains a custom shape like a skull in Clipart Gallery http://extensions.libreoffice.org/extension-center/gallery-of-danger-signs
2. Save it
3. Open file in LibO >= 3.5
=> drawing is ok: wrong formated svg:d paths are correctly restored
4. Open same file with AOO >= 4.0 and save it
5. Open file in LibO >= 3.5

Current behavior:
Drawing looks ugly

Expected behavior
Drawing should look the same

Version is detected here:
http://opengrok.libreoffice.org/xref/core/xmloff/source/draw/ximpshap.cxx#1851
But only version number is tested. Generator name should also be tested.
Comment 1 Laurent Balland 2014-04-14 21:16:05 UTC
Created attachment 97366 [details]
Drawing saved with AOO 3.4.0 correctly open in LibO
Comment 2 Laurent Balland 2014-04-14 21:17:51 UTC
Created attachment 97367 [details]
Drawing saved with AOO 4.0.0 NOT correctly open in LibO
Comment 3 Laurent Balland 2014-04-14 21:29:06 UTC
Hint: how to test generator:
http://opengrok.libreoffice.org/xref/core/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx#129
Comment 4 Laurent Balland 2014-04-15 12:49:57 UTC
Proposed commit:
https://gerrit.libreoffice.org/#/c/9012/
Comment 5 Commit Notification 2014-05-08 19:55:08 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3d2a17fd2e9cde29f12268ddfccc3f5b51455722

fdo#77451 Detect AOO 4.x for SvXMLImport::needFixPositionAfterZ



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 6 Commit Notification 2014-05-08 20:31:13 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

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

fdo#77451 Detect AOO 4.x for SvXMLImport::needFixPositionAfterZ


It will be available in LibreOffice 4.2.5.

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 Jorendc 2014-05-17 09:36:21 UTC
Hi Laurent,

Thanks for reporting and working on this issue. What is the current state of this bug?

Thanks for your time.
Kind regards,
Joren
Comment 8 Laurent Balland 2014-05-17 13:51:22 UTC
Hi Joren,

The commit that I've proposed and has been accepted, solve this issue for AOO 4.0. Not yet tested with AOO 4.1
Comment 9 Laurent Balland 2014-05-24 09:57:49 UTC
Documents produce with AOO 4.0 and AOO 4.1 are correctly open in LibO 4.2.5.0 and LibO 4.3.0.0 beta1