Issue 119920

Summary: PPTX-Import: the text reverse in textbox after importing .pptx file
Product: Impress Reporter: liuping <doneyourself>
Component: open-importAssignee: Armin Le Grand <Armin.Le.Grand>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: Armin.Le.Grand, doudou1976, jingbaibetsy, louqingle, raivo.pats
Version: 3.4.0   
Target Milestone: 4.0.0   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 120823    
Attachments:
Description Flags
sample file
none
capture.png none

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