Issue 127721 - Rotated Draw rectangle gets wrong rotation when exported as .doc
Summary: Rotated Draw rectangle gets wrong rotation when exported as .doc
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: 4.1.5
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-01 18:11 UTC by John
Modified: 2018-03-18 12:18 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
ODT file. Rectangle is rotated at 180 degrees, text is inverted (8.95 KB, application/vnd.oasis.opendocument.text)
2018-03-01 18:11 UTC, John
no flags Details
DOC file (97/200/XP). Rectangle is rotated at 1 degree only. (9.50 KB, application/msword)
2018-03-01 18:14 UTC, John
no flags Details
Reproduction of bug using triangle and different angle (1 degree) ODT file (270.14 KB, image/png)
2018-03-17 04:45 UTC, knguye15
no flags Details
Reproduction of bug using triangle and different angle (358.99 degrees) DOC file (230.21 KB, image/png)
2018-03-17 04:47 UTC, knguye15
no flags Details
successfully replicated the bug on Windows and MacOS (555.46 KB, image/png)
2018-03-18 06:41 UTC, James Podobea
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description John 2018-03-01 18:11:58 UTC
Created attachment 86358 [details]
ODT file.  Rectangle is rotated at 180 degrees, text is inverted

1. Add a Draw rectangle to an empty text document.  Add some text to the rectangle
2. Rotate the rectangle by 180 degrees.  Text is now inverted on screen.
3. File > Save As ..., and save as a .odt file.  All is OK.
4. File > Save As .., and save as a .doc file (97/2000/XP).
5. Open the .doc file.

Expected result:  Rectangle will be rotated to 180 degrees and text will be inverted.

Actual result:  Rectangle is only rotated anti-clockwise by 1 degree. 

This problem does not occur in AOO 4.0.1 but occures in 4.1.0 and later versions.

See Direction of Rotated character can't save in DOC format at https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=92618&p=440130#p440130.
Comment 1 John 2018-03-01 18:14:40 UTC
Created attachment 86359 [details]
DOC file (97/200/XP).  Rectangle is rotated at 1 degree only.

See attached .ODT file; and .DOC file created from .ODT file.
Comment 2 knguye15 2018-03-17 04:45:35 UTC
Created attachment 86366 [details]
Reproduction of bug using triangle and different angle (1 degree) ODT file

The following is a reproduction of the rectangle bug that include angles at 180 degrees and using a different shape with 1 degree.

User is trying to rotate the rectangle to 180 degrees which includes rotating the text within the shape. 

Steps to reproduce the bug:
1. Opened new empty text file and adding a rectangle into the empty file, then adding text into the shape drawn.
2. Rotate the shape 180 degrees and confirm that the shape and the text have indeed rotated 180 degrees.
3. Saved the file as ODT and then as a DOC file (97/2000/XP).
4. View result, the angle in the ODT file remained 180 and as described. However, in the DOC file, the angle was displayed as 1 degree.

Steps to further debug and reproduce the error with different angle and shape.
1. Created an empty text file and adding an isosceles triangle into an empty text file along with text within the shape.
2. Rotated the shape 1 degrees.
3. Saved the file as ODT and saved file as DOC (97/2000/XP).
4. ODT file kept the 1 degree rotation, however the DOC rotation showed as 358.99  degrees. 

Attachments:
Triangledoc.png
Triangleodt.png

Using: Windows snapshot build: 8 languages, built every Friday from branch; EXE format. (http://www.openoffice.org/download/devbuilds.html)

This is important, because users who do not have Office and have older versions of Word Document would not be able to fully see the correct angle rotation and desired result from Office format in comparison to Word format.
Comment 3 knguye15 2018-03-17 04:47:11 UTC
Created attachment 86367 [details]
Reproduction of bug using triangle and different angle (358.99 degrees) DOC file

Attached both Triangleodt.png and Triangledoc.png using triangle shape and 1 degree shown in odt format and 358.99 degree in doc format.
Comment 4 James Podobea 2018-03-18 06:41:57 UTC
Created attachment 86369 [details]
successfully replicated the bug on Windows and MacOS

I was successfully able to replicate the bug on two different OS's and two different OpenOffice builds.

Platforms:
Windows 10 Pro 64-Bit, i7-4870HQ, 4GB RAM
OpenOffice: Apache 4.2.0, Build 9800, Revision 1826903

MacOS High Sierra, MacBook Pro 2015 15 inch, i7 (2.5gHz), 16GB RAM
OpenOffice: Apache 4.1.5, Build 9789, Revision 1817496

I created a new .odt file with 3 basic shapes and 1 symbol shape.
I flipped them to 180 degrees and saved the .odt. When I reopen the .odt file, they successfully remain flipped over at 180 degrees.
I saved the .odt file as a .doc file, but when I open the .doc file all of the shapes only have 1 degree of rotation. The symbol shape also loses its blue color fill.

This bug occurs on both Windows and MacOS.
Comment 5 Laljbour 2018-03-18 11:36:47 UTC
Windows 10 Home Version 1709
OpenOffice Version 4.1.5
 
Confirmed replication of the bug with other shapes and fontwork gallery. Because tests were only given on rectangle and triangle, it is possible that the bug affects other objects that use rotate.

The steps given already is enough to replicate the rectangle rotation bug.

Follow up steps:
1. Create empty text document.
2. Draw a star, an ellipse and one fontwork.
3. Add text to the objects.
4. Rotate all objects to 180 degrees.
5. Saved file as .odt then as a .doc file (97/2000/XP).
6. Open the .doc file

Results: In the exported .doc file, they were not 180 degrees.

Additional comments: I also tested an image but only the image stayed rotated in the export .doc. The bug doesn't only affect shapes but also fontwork.
Comment 6 Peter 2018-03-18 11:59:48 UTC
3 reports for multiple systems.
I set this on confirmed
Comment 7 John 2018-03-18 12:04:39 UTC
Note that it should be reasonably simple to find as the Forum report says "I tried to downgraded Open Office 4.1.5 to 4.1.4, 4.1.3, 4.1.2, 4.1.1, 4.1.0, but it was same results. But 4.0.1 can save rotated shapes as Microsoft Word 97/2000/Xp(.Doc) file."

If correct (I did not check) it suggests a regression on going from 4.0.1 to 4.1.0.
Comment 8 Peter 2018-03-18 12:18:01 UTC
I had a quick look on the changes did not find anything obvious.

I checked via:
https://github.com/apache/openoffice/compare/AOO401...apache:AOO410