Issue 119703 - Save .xls in OO3.4, the rotation setting of grahpic in grouped object will be lost.
Summary: Save .xls in OO3.4, the rotation setting of grahpic in grouped object will be...
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: save-export (show other issues)
Version: 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 120823
  Show dependency tree
 
Reported: 2012-06-04 06:40 UTC by Shan Zhu
Modified: 2013-07-11 15:20 UTC (History)
3 users (show)

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


Attachments
Grouped object with a rotated graphic in (27.50 KB, application/vnd.ms-excel)
2012-06-04 06:40 UTC, Shan Zhu
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Shan Zhu 2012-06-04 06:40:18 UTC
Created attachment 77913 [details]
Grouped object with a rotated graphic in

Build info: AOO3.4_r1327774

Reproduce steps:
1. Open the sample file attached in OO3.4, which has a grouped object(one freeline and one graphic) in.
2. Save it as .xls file.
3. Reopen it in OO.
4. Ungroup the object. 
5. Check the rotation setting of the two object.

Issue found:
The rotation setting of Freeline can be saved (345 degrees),
the rotation setting of graphic will be changed into 0 degree(it should be 45 degrees).
And in step 3, you can find the grouped object has a slight deformation.
Comment 1 binguo 2012-06-12 05:39:38 UTC
This bug can repros on AOO3.4.O Rev. 1327774,
and I change the status from Unconfirmed to confirmed.
Comment 2 Armin Le Grand 2012-09-06 14:02:16 UTC
ALG: The graphic object is still rotated 45 degrees, but somehow gets deformed (relayouted in pixels) which may have to do with an old fix for PPT2003.

Interestingly, Excel loads the newly changed file and shows the object correct, but the group size has extended. It seems to scale the relayouted image correctly.

It does not happen when the graphic object is not grouped. Checking deeper...
Comment 3 Armin Le Grand 2012-09-06 14:08:39 UTC
ALG: Can be reproduced by creating a new calc, adding one shape and one graphic shape and grouping them. Graphic has not to be linked.
Comment 4 Armin Le Grand 2012-09-06 14:14:14 UTC
ALG: Also reproducable with new presentation, rectangle, rotated graphic and grouping these.
Comment 5 Armin Le Grand 2012-09-06 14:16:25 UTC
ALG: Same effect with Symphony. Looking further...
Comment 6 Armin Le Grand 2012-09-06 14:55:09 UTC
ALG: It even happens with two rectangles, one roated and both grouped. Seems to be an old bug with grouping.
Comment 7 Armin Le Grand 2012-09-06 15:54:41 UTC
ALG: I can load the newly created file correctly when *not* executing the scaling applied at msdffimp.cxx ln 4370. Exactly that scaling needs to be executed when loading the original test file. It is some kind of 'embedding' of object dimensions to group dimensions. The logic result is that the group dimension for export is calculated (and exported) wrong. This may have to do with bound rects of rotated objects, AFAIR MS format does use unrotated geometries. Maybe the group dimension is calculated for export using the rotated ones, checking...
Comment 8 Armin Le Grand 2012-09-07 13:12:51 UTC
ALG: Taking over...
Comment 9 Armin Le Grand 2012-09-07 13:19:51 UTC
ALG: Indeed at export the unrotated (and unsheared, that's another story, MS does not support this) is needed. I have now adapted ImplEESdrObject::Init which fills the BoundRect for the to-be-exported shape to use a helper method (getUnrotatedGroupBoundRange) when it's a group object to be exported. That method uses UNO API to recursively iterate over all contained shapes and calculates their unrotated, unsheared range (using the object transformation directly).
Doing this works well, the bound ranges after export are also better now in MS programs.
The MS graphic filter im/export stuff is not too well organized (grown) and may be reorganized/cleaned up and redefined more systematically...
Testing with shear, too...
Comment 10 SVN Robot 2012-09-07 13:22:36 UTC
"alg" committed SVN revision 1382015 into trunk:
#119703# Corercted bound rect for ms graphic object export for grouped object...
Comment 11 Armin Le Grand 2012-09-07 13:23:49 UTC
ALG: Comitted, done.
This was a long-existing, systematical error/not supported functionality in ms graphic export format.
Comment 12 binguo 2012-11-13 07:31:09 UTC
Verified on Aoo_Trunk_20121109.1800 rev 1407366, rotation setting of graphic is saved correctly, the bug is fixed.
Comment 13 binguo 2012-11-13 07:31:39 UTC
Close it.