Bug 906386 - impress conversion from pptx to odp breaks some shapes
Summary: impress conversion from pptx to odp breaks some shapes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libreoffice
Version: 18
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: David Tardon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-31 14:52 UTC by Matt Hirsch
Modified: 2013-03-14 02:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-14 02:57:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Screenshot of a rounded rectangle created in impress (97.04 KB, image/png)
2013-01-31 14:53 UTC, Matt Hirsch
no flags Details
Screenshot of rounded rectangle after opening as a pptx and saving to an odp file (97.45 KB, image/png)
2013-01-31 14:54 UTC, Matt Hirsch
no flags Details
File created in powerpoint 2010 containing a rounded rectangle (32.03 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2013-01-31 14:55 UTC, Matt Hirsch
no flags Details
Powerpoint file after being corrupted by saving as odp in impress (10.91 KB, application/vnd.oasis.opendocument.presentation)
2013-01-31 14:56 UTC, Matt Hirsch
no flags Details
pptx file created in impress containing a rounded rectangle (17.65 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2013-01-31 14:57 UTC, Matt Hirsch
no flags Details
corrupted shape in odp file after saving impress created pptx file as odp (10.20 KB, application/vnd.oasis.opendocument.presentation)
2013-01-31 14:58 UTC, Matt Hirsch
no flags Details
Script to fix broken .odp files (1.23 KB, text/x-python)
2013-02-02 10:45 UTC, Matt Hirsch
no flags Details

Description Matt Hirsch 2013-01-31 14:52:16 UTC
Description of problem: Shapes such as rounded rectangles are not correctly converted from pptx files to odp files. For example, a rounded rectangle ends up as a narrow, squiggly triangle after conversion.


Version-Release number of selected component (if applicable):
libreoffice-impress-3.6.3.2-8.fc18.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Open impress
2. Draw a rounded rectangle
3. Save as pptx
4. Close document
5. Open pptx
6. Save as an odp file
7. Close document
8. Open odp file
  
Actual results:
Corrupted shapes

Expected results:
Normal shapes

Additional info:
This also fails when converting from a pptx made by powerpoint. It also fails when converting from an "Open Office pptx".

I'm attaching various affected documents.

Comment 1 Matt Hirsch 2013-01-31 14:53:39 UTC
Created attachment 690978 [details]
Screenshot of a rounded rectangle created in impress

Comment 2 Matt Hirsch 2013-01-31 14:54:41 UTC
Created attachment 690979 [details]
Screenshot of rounded rectangle after opening as a pptx and saving to an odp file

Comment 3 Matt Hirsch 2013-01-31 14:55:29 UTC
Created attachment 690982 [details]
File created in powerpoint 2010 containing a rounded rectangle

Comment 4 Matt Hirsch 2013-01-31 14:56:32 UTC
Created attachment 690984 [details]
Powerpoint file after being corrupted by saving as odp in impress

Comment 5 Matt Hirsch 2013-01-31 14:57:32 UTC
Created attachment 690987 [details]
pptx file created in impress containing a rounded rectangle

Comment 6 Matt Hirsch 2013-01-31 14:58:44 UTC
Created attachment 690996 [details]
corrupted shape in odp file after saving impress created pptx file as odp

Comment 7 David Tardon 2013-01-31 15:25:31 UTC
works in master

Comment 8 Matt Hirsch 2013-02-02 10:45:13 UTC
Created attachment 691923 [details]
Script to fix broken .odp files

Is there a koji build I can test?

In the meantime I kluged together a script to fix a presentation affected by this, at least for "rounded rectangle" from powerpoint. Maybe this basic template would be useful for anyone else who has a giant presentation affected by this, so I'm attaching it.

Other shapes that seem affected from Powerpoint pptx -> odp: Oval and Arc. My script doesn't help these, but the below process could be adapted.

It seems that the latest fedora packaged libreoffice isn't interpreting the "enhanced-geometry" fields in content.xml correctly. The idea behind the script is to replace the broken enhanced-geometry field with an equivalent one that libreoffice reads correctly.

Instructions for use:

1) Put your broken odp file (let's call it broken.odp) in a temp directory
2) Create a new presentation containing nothing but the shape that you want to fix (e.g. a rounded rectangle)
3) Save it as an odp file (let's call it ok.odp) in the same temp directory
4) Create a subdirectory (let's call it "ok" here)
5) cd ok; unzip ../ok.odp; cd ..
6) cp ok/content.xml enhanced-geometry.xml
7) Create a subdirectory (let's call it "broken" here)
8) cd broken; unzip ../broken.odp; cd ..
9) ./fix.py broken/content.xml
10) Check that content-fixed.xml has the new enhanced-geometry fields that you want
11) mv content-fixed.xml broken/content.xml
12) cd broken
13) zip -r ../broken.odp content.xml

Now broken.odp should be fixed. You can delete broken. ok.odp, and ok

The script looks for shapes named "Rounded Rectangle*" to replace the enhanced-geometry field. If your shape is something else you should modify the script to look for a different name.

Comment 9 Matt Hirsch 2013-02-19 22:09:30 UTC
Any update on this?

Comment 10 Caolan McNamara 2013-02-20 23:46:10 UTC
dtardon reports that its fixed in the latest upstream stable, but I guess we don't happen to know the commit that fixed it in order to backport. If you have the time to dig through the upstream bugs that look similar or to use bibisect (https://wiki.documentfoundation.org/QA/HowToBibisect) to help identify the range where it "started to work right", that'd help us help you

Comment 11 David Tardon 2013-02-21 05:37:05 UTC
The upstream commit that fixes this is d8720d4e390143279ccae8eed05decf54240e8fa .

Comment 12 David Tardon 2013-02-28 14:40:22 UTC
will be fixed in libreoffice-3.6.5.2-6.fc18

Comment 13 Fedora Update System 2013-03-07 20:58:11 UTC
libreoffice-3.6.5.2-6.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/libreoffice-3.6.5.2-6.fc18

Comment 14 Fedora Update System 2013-03-08 23:57:01 UTC
Package libreoffice-3.6.5.2-6.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libreoffice-3.6.5.2-6.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3597/libreoffice-3.6.5.2-6.fc18
then log in and leave karma (feedback).

Comment 15 Fedora Update System 2013-03-14 02:57:43 UTC
libreoffice-3.6.5.2-6.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.