Bug 92000 - FILESAVE: Shapes Disappear When Saved as PPTX
Summary: FILESAVE: Shapes Disappear When Saved as PPTX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Andras Timar
URL:
Whiteboard: target:5.1.0 target:5.0.0.0.beta4
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2015-06-11 06:23 UTC by Luke
Modified: 2016-10-25 19:17 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Missing Rectangle in both Impress and PowerPoint (32.44 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2015-06-11 06:23 UTC, Luke
Details
Same file created in Impress 4.3 works as expected (31.50 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2015-06-11 06:23 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2015-06-11 06:23:11 UTC
Created attachment 116460 [details]
Missing Rectangle in both Impress and PowerPoint

Steps to reproduce:
1. In Impress 5.1 draw a rectangle
2. Save as PPTX
3. Open the file

In Impress 4.3 works as expected
Comment 1 Luke 2015-06-11 06:23:42 UTC
Created attachment 116461 [details]
Same file created in Impress 4.3 works as expected
Comment 2 Buovjaga 2015-06-12 10:08:04 UTC
Reproduced.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 5fc0cbbc1254223fedf0f78c5e7539219b228697
TinderBox: Win-x86@39, Branch:master, Time: 2015-06-11_04:30:51
Locale: fi-FI (fi_FI)
Comment 3 Terrence Enger 2015-06-12 15:16:03 UTC
Working in the daily dbgutil bibisect repository, I see from `git
bisect good` ...

    7b138bcf32b52eccf484bd66d9ab5c70a7970805 is the first bad commit
    commit 7b138bcf32b52eccf484bd66d9ab5c70a7970805
    Author: Miklos Vajna <vmiklos@collabora.co.uk>
    Date:   Thu May 28 04:44:11 2015 +0200

        2015-05-28: source-hash-be01d68420086fc36ecf26b5f597ba7c6b29b369

    :100644 100644 7d9c275fa2c8d951163e39104fc46f213160e6e8 c816a24004e59d739843383dedb46e65b13a82c2 M	build-info.txt
    :040000 040000 2b0ba46bf8620f068bc68e0120cc167d9f0fb857 84957e08feb88a232086157a14a30b8c4cd50fce M	opt

and from `git bisect log` ...

    # bad: [d3328123e5e86a74111ff9f1fcdd742973bd3c80] 2015-06-12: source-hash-bb9dad2ef23829b2500c9f99154bca6a8ba7d49a
    # good: [2b392af9c8f54629e3a3a98a8c92fa5af1c6722f] 2015-05-20: source-hash-90e2dabb8d0bb5382234be776c2ad0e2d5d9e224
    git bisect start 'd332812' 'oldest'
    # bad: [f66b13d237da5d0a5ec7b5856a2c3b8224c30aa6] 2015-05-31: source-hash-4618d15cb73d0f0c15e0f4d2a6ce9cdbe6eeef24
    git bisect bad f66b13d237da5d0a5ec7b5856a2c3b8224c30aa6
    # good: [a63d7336fa8ea346b4deb2d4076cbe8a1cd75d65] 2015-05-25: source-hash-b9630867d17c01ec41f6461b1e96288f3932248c
    git bisect good a63d7336fa8ea346b4deb2d4076cbe8a1cd75d65
    # bad: [7b138bcf32b52eccf484bd66d9ab5c70a7970805] 2015-05-28: source-hash-be01d68420086fc36ecf26b5f597ba7c6b29b369
    git bisect bad 7b138bcf32b52eccf484bd66d9ab5c70a7970805
    # good: [0c21dcaa08976385a72c7cd698a4474bcae7117a] 2015-05-27: source-hash-d56c1f7a20d8a95c88ea31c7f9000b8e270ab1ee
    git bisect good 0c21dcaa08976385a72c7cd698a4474bcae7117a
    # first bad commit: [7b138bcf32b52eccf484bd66d9ab5c70a7970805] 2015-05-28: source-hash-be01d68420086fc36ecf26b5f597ba7c6b29b369
Comment 4 Luke 2015-06-13 03:37:16 UTC
The range is:
http://cgit.freedesktop.org/libreoffice/core/log/?id=d56c1f7a20d8a95c88ea31c7f9000b8e270ab1ee&qt=range&q=d56c1f7a20d8a95c88ea31c7f9000b8e270ab1ee..be01d68420086fc36ecf26b5f597ba7c6b29b369

Andras,
It looks like your DrawingML round-trip fixes caused a minor regression with native generated files. Could you kindly take a look at this?
Comment 5 Andras Timar 2015-06-13 08:45:27 UTC
This rectangle tool is very interesting. I always experimented with shapes that were previously saved in OpenDocument Format. When you create a rectangle in Impress, save it as .odp, reload, and then save as .pptx, reload, you'll find that the rectangle does not disappear. However, with a newly created rectangle, save as .pptx causes data loss. 

I examined the rectangle shape with the XRay tool. Interestingly, the newly created rectangle did not have Segments in Path property. It had only Coordinates, and their interpretation was not in the document model. Of course we can easily guess that the first coordinate pair belongs to MoveTo command, and the next 4 belong to LineTo commands. Saved and reloaded rectangle had the Segments.

I tried some other preset shapes, including square. None of them had this behaviour. It seems that rectangle is special. The solution will be adding rectangle to the blacklist, and export it as a preset shape (by the way, this is what we did in older LibreOffice versions).
Comment 6 Commit Notification 2015-06-13 08:55:36 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=113adfe37326f132de2ab1c6220dfd95fec4c6ba

tdf#92000 save rectangle to DrawingML as a preset shape

It will be available in 5.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 7 Commit Notification 2015-06-13 09:05:22 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

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

tdf#92000 save rectangle to DrawingML as a preset shape

It will be available in 5.0.0.0.beta4.

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 8 Robinson Tryon (qubit) 2015-12-17 09:13:31 UTC Comment hidden (obsolete)
Comment 9 Jean-Baptiste Faure 2016-04-24 16:15:40 UTC
Version set from description.

Best regards. JBF