Apache OpenOffice (AOO) Bugzilla – Issue 119920
PPTX-Import: the text reverse in textbox after importing .pptx file
Last modified: 2013-07-12 16:17:52 UTC
Created attachment 78193 [details] sample file build: AOO3.4 rev 1327774 Description: 1. open the attached sample file in AOO and MS 2. check the direction of text in AOO and compare it with the one in Microsoft powerpoint Defect: the text reverse in textbox after importing .pptx file pls refer the capture.png
Created attachment 78194 [details] capture.png
Setup: OpenOffice.org 3.4.0 Build: 9590 Rev: 1325599 PowerPoint 2007 Description: I could reproduce the error with attached files. I couldn't reproduce the error by creating a new text box and importing the same file again. It seems that the text box in the attached file is formatted some-how differently than it is by default. Text in the text box seems to be 180 degrees turned and this causes the error during import. All text boxes I made where imported correctly.
I confirmed this problem on Windows XP platform against AOO 3.4 publish build.
ALG: Taking a look.
ALG: Saving as *.ppt binary (in ppt) and loading makes it look correct. The shape *is* rotated 180 degree in ppt, so this is correct. Whe n importing as *.ppt binary file the "TextRotateAngle" gets set to -180 and thus the text seems not rotated. The shape has a "TextRotateAngle" set (a property containing an additional rotation of the text additional to the object). Conclusion: Import of "TextRotateAngle" is missing in ooxml import.
ALG: Looking directly into the xml file gives proove: There is a rot="10800000" inside the p:txBody (the text body). This needs to be interpreted.
ALG: Workaround: Convert to *.ppt and import. TextBodyPropertiesContext does read the text rotation to moRotation, but it is not used (except in chart). Need to find out how to get it to the customshape. Maybe best to look at MirrorX/MirrorY and add TextRotation there. Taking a look...
ALG: Remembering in CustomShapeProperties (like mirror, too), setting there in Shape::createAndInsert if angle is not zero. Using it in CustomShapeProperties::pushToPropSet; added using mirrorX/Y and TextRotation (if used). Works as expected. Now, shape is imported rotated 180 degrees, containing text rotated 180 degrees, thus text is rotated 360 degrees (or zero).
ALG: Comitted, done.
verified on Win7, Mac 10.7, suse 11 sp1 against build 1404513, fixed