Issue 119920 - PPTX-Import: the text reverse in textbox after importing .pptx file
PPTX-Import: the text reverse in textbox after importing .pptx file
Status: CLOSED FIXED
Product: Impress
Classification: Application
Component: open-import
3.4.0
PC All
: P3 normal (vote)
: 4.0.0
Assigned To: Armin Le Grand
:
Depends on:
Blocks: 120823
  Show dependency treegraph
 
Reported: 2012-06-08 08:22 UTC by liuping
Modified: 2013-07-12 16:17 UTC (History)
5 users (show)

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


Attachments
sample file (32.12 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2012-06-08 08:22 UTC, liuping
no flags Details
capture.png (156.13 KB, image/png)
2012-06-08 08:22 UTC, liuping
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description liuping 2012-06-08 08:22:28 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
Comment 1 liuping 2012-06-08 08:22:55 UTC
Created attachment 78194 [details]
capture.png
Comment 2 raivo.pats 2012-06-09 20:24:06 UTC
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.
Comment 3 zhao xia 2012-06-12 05:48:57 UTC
I confirmed this problem on Windows XP platform against AOO 3.4 publish build.
Comment 4 Armin Le Grand 2012-09-18 05:23:57 UTC
ALG: Taking a look.
Comment 5 Armin Le Grand 2012-09-24 12:48:24 UTC
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.
Comment 6 Armin Le Grand 2012-09-24 13:17:44 UTC
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.
Comment 7 Armin Le Grand 2012-09-24 14:49:23 UTC
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...
Comment 8 Armin Le Grand 2012-09-24 15:24:04 UTC
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).
Comment 9 Armin Le Grand 2012-09-24 15:58:12 UTC
ALG: Comitted, done.
Comment 10 louqle 2012-11-08 01:56:25 UTC
verified on Win7, Mac 10.7, suse 11 sp1 against build 1404513, fixed