Issue 124479 - XLSX (MSO2007): custom shape has wrong size and text in custom shape has wrong rotation
Summary: XLSX (MSO2007): custom shape has wrong size and text in custom shape has wron...
Alias: None
Product: Calc
Classification: Application
Component: open-import (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Minor (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2014-03-21 15:19 UTC by Regina Henschel
Modified: 2014-04-24 01:32 UTC (History)
3 users (show)

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

custom shape rotated, text rotated (26.72 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2014-03-21 15:19 UTC, Regina Henschel
no flags Details
How the attached .xlsx document looks in build from trunk r1587823 (108.84 KB, image/png)
2014-04-21 15:46 UTC, Regina Henschel
no flags Details
HOw the attached .xlsx document looks in build from aw080 r1586329 (109.00 KB, image/png)
2014-04-21 15:48 UTC, Regina Henschel
no flags Details
Only the case 270° is wrong, case 90° is OK (25.20 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2014-04-24 00:59 UTC, Regina Henschel
no flags Details
Same shapes in PowerPoint (49.47 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2014-04-24 01:32 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2014-03-21 15:19:32 UTC
Created attachment 82942 [details]
custom shape rotated, text rotated

The attached document contains three custom shapes. The left example has the default settings. The middle example is rotated by 90°, the text remains in the default orientation. The right example is rotated by 90° and in addition the whole text is rotated by 270°, which is one of the settings in Excel. All angle values are those from the UI. I have not looked, whether they are different in file format.
The file contains in addition a screenshot from the view in Excel 2010.

Open the file. Notice, that the rotated shapes have wrong size and that the 270° rotated text is upside down. 

For a draw:custom-shape the draw:enhanced-geometry has an attribute draw:text-rotate-angle, which would be responsible for the text rotation. I have not tested yet, whether a similar file in ODF file format would render correctly.

LO has problems too, see
Comment 1 Edwin Sharp 2014-03-23 07:40:33 UTC
Right hand side shape differs from given screenshot.
AOO410m14(Build:9760)  -  Rev. 1573062
2014-03-01_04:11:01 - Rev. 1573123
Comment 2 Rainer Bielefeld 2014-03-23 08:47:44 UTC
Still Reproducible with server installation of "AOO 4.1.0-Beta – English UI / German locale - [AOO410m14(Build:9760)  -  Rev. 1577236 2014-03-15]" on German WIN7 Home Premium (64bit)", own separate user profile.

Already Reproducible with sever installation of "OOo 3.3.0 English UI / German locale [OOO330m20 (Build 9567)]" on WIN7 Home Premium (64bit) DE

Any other spreadsheet software has problems here.

I tried to find rotation info in the document source, but I failed

I think that roots of wrong shape size and wrong text rotations are different, but I don't know.

The rotation angles mentioned in your example above the shapes do not match with common use "counter clockwise = positive values". Did you cite the angles from Excel UI?
Comment 3 Regina Henschel 2014-03-23 11:22:00 UTC
@Rainer: Yes, the angle values are those given in Excel 2010 UI.
Comment 4 Armin Le Grand 2014-03-24 10:04:50 UTC
@Regina: If you have a built version of aw080, maybe you culd take a look; I already corrected some stuff there for which having full transformations really makes thins easier...
Comment 5 Regina Henschel 2014-04-21 15:44:02 UTC
@Armin: I've got a aw080 build now :). It worse there. The text area is not rotated. I'll attach sreenshots from trunk revision 1587823 and from aw080 revision 1586329.
Comment 6 Regina Henschel 2014-04-21 15:46:10 UTC
Created attachment 83236 [details]
How the attached .xlsx document looks in build from trunk r1587823
Comment 7 Regina Henschel 2014-04-21 15:48:03 UTC
Created attachment 83237 [details]
HOw the attached .xlsx document looks in build from aw080 r1586329
Comment 8 Armin Le Grand 2014-04-22 16:23:44 UTC
Thanks Regina (and good that you have an aw080 build), I will have a look as soon as possible
Comment 9 Regina Henschel 2014-04-22 21:20:49 UTC
The position problem in aw080 is now issue 124728.
Comment 10 Regina Henschel 2014-04-24 00:59:43 UTC
Created attachment 83264 [details]
Only the case 270° is wrong, case 90° is OK
Comment 11 Regina Henschel 2014-04-24 01:32:53 UTC
Created attachment 83265 [details]
Same shapes in PowerPoint

The shape shows the same wrong text rotation in PowerPoint, but the shape size is correct for the .pptx file.

Text rotation has already been handled in issue 119920 (commit 1389432). It seems to me, that the error is not the question, whether to use * -1  in oox/source/drawingml/shape.cxx#487.

Where is OOXML 'a:bodyPr rot="vert270"' translated to an angle?