Apache OpenOffice (AOO) Bugzilla – Issue 121932
wrong position of flipped custom shape vertically.
Last modified: 2022-10-28 12:54:15 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.
Created attachment 80449 [details] Original position
Created attachment 80450 [details] Reloaded Position
The error is not in OOo3.4.1. I see the error for example in revision 1424563.
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'.
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?
You said that the error is not in OOo3.4.1. Is in OOo 4.0.0?
sorry, i saw the version. Regars. Yurggent Alfredo
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.
ALG: Grepping...
ALG: Checked the XML files, the translate part of draw:transform is wrong when saving. Checking how this gets generated...
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...
"alg" committed SVN revision 1465696 into trunk: i121932 fixed ODF CustomShape import/export
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.