Issue 121932 - wrong position of flipped custom shape vertically.
wrong position of flipped custom shape vertically.
Status: RESOLVED FIXED
Product: Draw
Classification: Application
Component: save-export
4.0.0-dev
PC Windows 7
: P3 normal (vote)
: 4.0.0
Assigned To: Armin Le Grand
Yurggent Alfredo Chable Torrez
: regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-21 23:06 UTC by Regina Henschel
Modified: 2013-07-12 16:35 UTC (History)
3 users (show)

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


Attachments
Rotated custom shape (13.09 KB, application/vnd.oasis.opendocument.graphics)
2013-03-21 23:06 UTC, Regina Henschel
no flags Details
Original position (27.42 KB, image/png)
2013-03-21 23:07 UTC, Regina Henschel
no flags Details
Reloaded Position (28.11 KB, image/png)
2013-03-21 23:08 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 2013-03-21 23:06:45 UTC
Created attachment 80448 [details]
Rotated custom shape

Open the attached document. It contains four lines to mark the position of the custom shape triangle. Drag the triangle into this line boundaries (see attachment 'Position original Screenshot.png)
Save the file and reopen it. Notice, that the triangle has the wrong position. I get it as shown in 'Position reloaded Screenshot.png).
The rotation is about 14,3deg counter clockwise to view on screen. The screenshot containes the status bar with the position and size of the bounding box.
Comment 1 Regina Henschel 2013-03-21 23:07:32 UTC
Created attachment 80449 [details]
Original position
Comment 2 Regina Henschel 2013-03-21 23:08:10 UTC
Created attachment 80450 [details]
Reloaded Position
Comment 3 Regina Henschel 2013-03-21 23:24:05 UTC
The error is not in OOo3.4.1.
I see the error for example in revision 1424563.
Comment 4 Regina Henschel 2013-03-24 12:51:24 UTC
I found, that not rotation is the problem, but the wrong position occurs when mirror (flip) the shape vertically. And the problem is only for custom shapes, not for polygons. Change subject therefore.
The error is also in the svg:x and svg:y, when there is no transformation 'translate'.
Comment 5 Regina Henschel 2013-03-24 14:23:24 UTC
A build with source from 19.11.2012 is OK, but a build with source from 22.11.2012 shows the error. I do not understand what was done in r1412119
 "For backward compatibility do take mirrorings in setTransformation into account. Also found an error in SdrObjCustomShape::TRGetBaseGeometry when MirrorY was used".

But that commit might be the reason. Armin, can you please have a look?
Comment 6 Yurggent Alfredo Chable Torrez 2013-03-25 19:59:49 UTC
You said that the error is not in OOo3.4.1.
Is in OOo 4.0.0?
Comment 7 Yurggent Alfredo Chable Torrez 2013-03-25 20:03:52 UTC
sorry, i saw the version.
Regars.

Yurggent Alfredo
Comment 8 Yurggent Alfredo Chable Torrez 2013-03-25 21:24:48 UTC
Hi,
I just checked this bug in AOO 4.0.0 with W7 and this error continues.
not save the new image position.

Regars.

Yurggent Alfredo.
Comment 9 Armin Le Grand 2013-03-26 16:33:21 UTC
ALG: Grepping...
Comment 10 Armin Le Grand 2013-04-08 13:01:58 UTC
ALG: Checked the XML files, the translate part of draw:transform is wrong when saving. Checking how this gets generated...
Comment 11 Armin Le Grand 2013-04-08 15:33:17 UTC
ALG: Checked with an old r1371068. The reloaded newly saved looks the same, but when looking into the files, even there is an error: the skewX of the draw:transform moves from skewX (0.00191986217719341) (original) to skewX (-0.00191986217719338) (new file), very strange. Indeed it jumps in the UI (pos and size, slant side) from -0.11 to 0.13. But a very small value, so nothing seems to be visible. Also the translate (6.876cm 6cm) moves to translate (6.876cm 5.998cm), thus the Y-Translate is slightly changed.
In the current version writing definitely produces wrong stuff. Taking a closer look...
Comment 12 SVN Robot 2013-04-08 18:04:42 UTC
"alg" committed SVN revision 1465696 into trunk:
i121932 fixed ODF CustomShape import/export
Comment 13 Armin Le Grand 2013-04-08 18:08:03 UTC
ALG: After tracing trough the whole system I found that the reordering of the old Rect2Poly/Poly2Rect mechanism transformed polygon was *not* wrong for Y-Mirror as I thought; the reordering looks as if it's strictly designed for X-Mirroring, but it works. Corrected and checked. There are still slight numerical problems due to the integer usages (will be solved with aw080). Oh will I be happy when that old stuff will be gone...
Also fixed the wrong shearX handling, so it's now more correct than ever (for integer stuff, at least).
Comitted as r1465696, done.