[Upstream] Impress mis-rotates text saving to .pptx

Bug #505188 reported by pmartino on 2010-01-09
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LibreOffice
Fix Released
Medium
libreoffice (Ubuntu)
Medium
Unassigned
openoffice.org (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: openoffice.org

Ubuntu-Karmic Openoffice version (3.1.1 = 310m19) 64bits & 32bits

Binary package hint: libreoffice

1) lsb_release -rd
Description: Ubuntu natty (development branch)
Release: 11.04

2) apt-cache policy libreoffice-impress
libreoffice-impress:
  Installed: 1:3.3.1-1ubuntu4
  Candidate: 1:3.3.1-1ubuntu4
  Version table:
 *** 1:3.3.1-1ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages 100 /var/lib/dpkg/status

3) What is expected to happen is when one performs at the Terminal:

cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/505188/+attachment/1868399/+files/rotations.odp && loimpress -nologo rotations.odp

click File -> Save as -> File type: Microsoft PowerPoint 2007 XML (.pptx) -> Save button -> Keep format button -> close file -> reopen via the Terminal:

loimpress -nologo rotations.pptx

the text is displayed as it was in rotations.odp.

4) What happens instead is that the text in rotations.pptx have been rotated erroneously.

Unconfirmed OOo WORKAROUND: OOo from openoffice.org (version 3.1 and 3.2)

ProblemType: Bug
Architecture: i386
Date: Sat Jan 9 17:21:15 2010
DistroRelease: Ubuntu 9.10
Package: openoffice.org-impress 1:3.1.1-5ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
SourcePackage: openoffice.org
Uname: Linux 2.6.31-15-generic i686
XsessionErrors: (polkit-gnome-authentication-agent-1:1489): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

pmartino (p-martineau) wrote :
Chris Cheney (ccheney) on 2010-05-13
tags: added: karmic
Chris Cheney (ccheney) wrote :

[This is an automatic notification.]

This bug was reported against an earlier version of Ubuntu, can you test if it still occurs on Ubuntu 10.04 LTS (Lucid Lynx)?

Please note we also provide technical support for older versions of Ubuntu, but not in the bug tracker. Instead, to raise the issue through normal support channels, please see:

    http://www.ubuntu.com/support

If you are the original reporter and can still reproduce the issue on Lucid, please run the following command to refresh the report:

  apport-collect 505188

Bear in mind that you may need to install the python-launchpadlib package from the universe repository. Additionally, when prompted to give apport-collect permissions for Launchpad you will need to give it at least the ability to "Change Non-Private" data as it will be adding information to your bug report.

If you are not the original reporter, please file a new bug report, so we can work with you as the original reporter instead (you can reference bug 505188 in your report if you think it may be related):

  ubuntu-bug openoffice.org

If by chance you can no longer reproduce the issue on Lucid or if you feel it is no longer relevant, please mark the bug report 'Fix Released' or 'Invalid' as appropriate, at the following URL:

  https://bugs.launchpad.net/ubuntu/+bug/505188

Changed in openoffice.org (Ubuntu):
status: New → Incomplete
pmartino (p-martineau) wrote :

The bug is still present in Lucid.
I tested all the rotations from 0 to 360° by 10° increment and only the 90° and 180° are wrong.

Chris Cheney (ccheney) on 2010-05-20
Changed in openoffice.org (Ubuntu):
status: Incomplete → Confirmed

pmartino, thank you for reporting this bug and helping make Ubuntu better. Could you please attach an Impress file that demonstrates this problem? Does this issue occur for you in LibreOffice Impress?

sudo add-apt-repository ppa:libreoffice/ppa && sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y install libreoffice-impress

Changed in openoffice.org (Ubuntu):
status: Confirmed → Incomplete
pmartino (p-martineau) wrote :

Yes, the bug is still present.
90° rotated text is converted to 270°
180° text to 90°

Other rotations are ok

The result is worst in pptx

I attached a very simple odp file

1) open rotations.odp in Libreoffice
2) save in ppt
3) re-open

Thanks you very much for making LibreOffice and Ubuntu better

Pierre

Changed in openoffice.org (Ubuntu):
status: Incomplete → Confirmed

pmartino, this bug is confirmed in Ubuntu 10.10 LibreOffice Impress at the Terminal:

cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/505188/+attachment/1868399/+files/rotations.odp && loimpress -nologo rotations.odp

click File -> Save as -> File type: Microsoft PowerPoint 2007 XML (.pptx) -> Save button -> Keep format button -> close file -> reopen and notice text has been rotated erroneously.

lsb_release -rd
Description: Ubuntu 10.10
Release: 10.10

apt-cache policy libreoffice-impress
libreoffice-impress:
  Installed: 1:3.3.0-1maverick1
  Candidate: 1:3.3.0-1maverick1
  Version table:
 *** 1:3.3.0-1maverick1 0
        500 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ maverick/main i386 Packages
        100 /var/lib/dpkg/status

Changed in libreoffice (Ubuntu):
status: New → Confirmed
tags: added: lo33
summary: - rotated text in Impress
+ Impress mis-rotates text saving to .pptx
description: updated

Created attachment 44000
rotations.odp

Downstream bug may be found at:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/505188

1) lsb_release -rd
Description: Ubuntu natty (development branch)
Release: 11.04

2) apt-cache policy libreoffice-impress
libreoffice-impress:
  Installed: 1:3.3.1-1ubuntu4
  Candidate: 1:3.3.1-1ubuntu4
  Version table:
 *** 1:3.3.1-1ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages 100 /var/lib/dpkg/status

3) What is expected to happen is when one performs at the Terminal:

cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/505188/+attachment/1868399/+files/rotations.odp && loimpress -nologo rotations.odp

click File -> Save as -> File type: Microsoft PowerPoint 2007 XML (.pptx) -> Save button -> Keep format button -> close file -> reopen via the Terminal:

loimpress -nologo rotations.pptx

the text is displayed as it was in rotations.odp.

4) What happens instead is that the text in rotations.pptx have been rotated erroneously.

Changed in df-libreoffice:
importance: Unknown → Low
status: Unknown → Confirmed

Radek, one for you? Or can you give some pointers to transform it into an easy hack if possible?

Triaged status because it's an upstream bug. Thanks for the work, Christopher.

Changed in libreoffice (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
summary: - Impress mis-rotates text saving to .pptx
+ [Upstream] Impress mis-rotates text saving to .pptx

I can confirm the effect with "LibreOffice 3.4.1 RC1 - WIN7 Home Premium (64bit) German UI [OOO340m1 (Build:201)]", 90° text and 180° text will be misrotated (0°) after document has been saved as .pptx and reopened in LibO.

Unfortunately my Powerpoint Viewer will not open that document, and also my pptx to ppt batch converter fails.

OOo-dev 3.4 also showed exported document with rotation 0°

Modified Status due to facts

Changed in df-libreoffice:
status: Confirmed → In Progress
Changed in openoffice.org (Ubuntu):
status: Confirmed → Won't Fix

[This is an automated message.]
There are no new official OpenOffice.org releases in Ubuntu packaging anymore => Won't Fix

If the problem persists, please mark this bug as "also affects project Libreoffice" or "also affects distribution Libreoffice (Ubuntu)" if that has not happened already.

Please leave references to upstream OpenOffice.org bugs in place to allow cross pollination.

Since all new unconfirmed bugs start in state UNCONFIRMED now and old unconfirmed bugs were moved to NEEDINFO with a explanatory comment, all bugs promoted above those bug states to NEW and later are automatically confirmed making the CONFIRMED whiteboard status redundant. Thus it will be removed.

Ran test on 3.5.0b2 on Windows XP SP3.

The result of exporting to .pptx is that the rotations are lost. Moreover, Powerpoint 2003 (with the 2007 filters installed) could not open the file.

The result of export to .ppt is complex. When viewed in LOImpress 3.5.0b2
the ppt file looks like:

"Text rotated 90" is at -90
"Text rotated 180" is at 90

when viewed in Powerpoint 2003

"Text rotated 90" is at -90
"Text rotated 180" is at 0

Created attachment 55697
example of saved .ppt viewed in PowerPoint 2003.

Created attachment 55702
Example ODP, text about every 45 degrees

3.5.0b2 all tests on Windows XP SP3

1. made an example rotations2.odp with text close to every 45 degrees (manual rotation, so not exactly at that multiple).
2. save as rotations2.ppt
3. open a fresh copy of rotations2.odp, save as rotations2.ppt2

Results:

4. rotations2.ppt text orientation incorrect for 90 and 180 degrees, all others OK. (Could be a coincidence it is right for one of the multiples of 90). File opens OK in MS PowerPoint 2003 and has the same text orientations as in LOImpress.

5. rotations2.pptx file will not open with either PowerPoint 2003 (with 2007 extensions) or PowerPoint 2010.

6. rotations2.pptx opens with 3.5.0b2 LOImpress with all text orientations at 0 degrees. (All text rotation information has been lost).

Attempted to change importance to medium/normal from lowest/trivial. Not sure if that will take or not. This is not a trivial problem - it offers the possibility for LOImpress to corrupt otherwise valid .ppt/.pptx files by just opening and saving them.

Changed in df-libreoffice:
importance: Low → Medium

Created attachment 55744
Screen shot, only example at 90 degrees is incorrect.

Two more observations.

1.

With LOImpress 3.5.0b2 made an odp with text at 89,90, and 91 degrees.
Saved as .ppt
Opened in PowerPoint 2003.

Result: Only the text at 90 degrees is flipped, +/- one degree away is good enough to avoid the problem. (See the screen snap). Previous result showed that +/- 45 degrees also not a problem. Suggests that problem is most likely restricted to multiples of 90 degrees.

2. OpenOffice DEV300m106 does not have this problem when it saves to .ppt, rotated text stays at the angle it was set to in OOImpress.

Created attachment 55747
Test .ppt and mangled result

1. mangle.ppt is the original drawing created in PPT 2003
2. open mangle.ppt in LOImpress 3.5.0b2
3. add one word to the slide, outside the diagram
4. save as mangle2.ppt
5. exit LOImpress
6. Open mangle2.ppt in LOImpress or PPT 2003

Result: some of the text which was originally horizontal has rotated to vertical.

3.4.4 release does exactly the same thing.

I just went through a .ppt file I had been using to import .pdf (as a way of converting SVG drawings) which had been repeatedly opened in LOImpress 3.4.4. There were numerous examples of mangled diagrams, mostly text originally rotated by 90 degrees now at -90 degrees, and a few cases where the rotation was completely lost (not shown). Some of them were really awful, with text drawn mirrored, possibly the result of multiple cycles of .ppt open/save in LOImpress. (I have not yet reproduced that problem.)

Conclusion: it is unsafe to open a .ppt drawing in LOImpress and save it again in that same format. The only safe way to convert (from PDF) through LO is to create a fresh .ppt for each diagram imported and then later move the contents of that .ppt into the main .ppt within Microsoft PowerPoint. The "easy" method, doing that conversion in the complete .ppt opened in LOImpress, results in earlier slides being mangled by later .ppt saves.

OS ALL Due to Comment 2

Since the first file doing bad stuff due to bug 45495 (bad pptx export), the remark with pptx does not longer apply.
However, the problems Later filed here still remain:
The ppt bug is still there (master 3.7.0, 10.11.2012). and - perhaps - the flipped stuff issue.

Its in filter/source/msfilter/escherex.cxx:692

There, something is wrong with the numbering of the rectangular text orientations.
perhaps should be 2's potences?

patch coming soon.

cedric: that line 692 comes from commit 24dd42f3 which is from
"n#569266 sw-rtf-num-fix.diff:Fixes for RTF numbering export" with comment n#404221. Do we have the original documents behind that commit to see if https://gerrit.libreoffice.org/#/c/1165/ would break them ?

(In reply to comment #13)
> cedric: that line 692 comes from commit 24dd42f3 which is from
> "n#569266 sw-rtf-num-fix.diff:Fixes for RTF numbering export" with comment
> n#404221. Do we have the original documents behind that commit to see if
> https://gerrit.libreoffice.org/#/c/1165/ would break them ?

We have the documents, but they can't be made public (customer ones). I checked the two bugs and everything is fine. I pushed the fix in gerrit.

Lennard committed a patch related to this issue.
It has been pushed to "master":

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

fdo#34897 numbers were wrong, code unnecessary

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.

Will it still be necessary to add:

if (nAngle==1800) {
- AddOpt( ESCHER_Prop_txflTextFlow, <some_half_way_reasonable_txfl_here> );
- }

for perfectly upside-down text?

Or doesn't that make a problem?
by the way, I had to change the ,,magical'' numbers. (the constants had different numbers than the former numbers.) Does RTF need different ones?

just without that bSuppressRotation=true;

Lennard committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ccbb67d653cb6769fdea7b8170840ace3f8b82c&g=libreoffice-3-6

fdo#34897 numbers were wrong, code unnecessary

It will be available in LibreOffice 3.6.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.

Changed in df-libreoffice:
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libreoffice - 1:4.0.0~beta2-0ubuntu2

---------------
libreoffice (1:4.0.0~beta2-0ubuntu2) raring; urgency=low

  * Build using the internal libmspub for a first build.
 -- Matthias Klose <email address hidden> Tue, 19 Feb 2013 00:05:26 +0100

Changed in libreoffice (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.