Created attachment 139948 [details] Same UI results by different rotation angles Open attached document. It contains an image as "Draw image", which means it is a "graphic" in LO, and the same image as "Writer image", which means it is a "frame" in LO. The image have got an rotation of 30° in the UI and both images look the same on screen. Unpack the file and look at the draw:transform attribute. One image has got a rotate(alpha) and the other rotate(-alpha). But the rotation has to be the same, because the file format makes no difference between a "Draw image" and a "Writer image", but both are draw:frame elements with the same graphic properties. For the new Writer image rotation the sign has to be changes in writing to file and reading from file. If you open the file in "Calligra Words" or in "Text Maker" you see, that the Writer image looks different there, because the rotation angle has the wrong sign. You can not control it in MS Word, because MS Word has a bug, that it handles rotation angles wrongly, so that (rotate(-pi/6) and rotate((-pi/6)+2pi) is different for Word. I set this to high priority, because it is a new feature and the correction should be done quickly, so that only few documents are affected.
Discussed with Regina, thnks for the comments. Problem is that in ODF all angles are defined wrong orientated. For WriterFlyFrames I did it correct (to be safe for the future and later corrections for the other places). But it will be better to do the same as currently done in ODF anywhere, so will need to change to also do it 'wrong' using the wrong orientation. Potential problem is that transform statements will be not self-containing: The form using the matrix directly by representing the matrix values will have to have the correct orientaiton when rotation is included, while a rotate(xyz) as a partial statement will have to use the 'wrong' orientation. Thus - when not knowing this fact - conversion in ODF from one form to the other will be very dangerous -> main reason to correct this in one of the coming ODF versions. Note: Linear composition with 'wrong' orientation *will not* work correctly - that is how I found out about that error myself in the past ;-(
Added, checked (interactively), version on gerrit.
Armin Le Grand committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ea360461746f37be021b63da7a64a60d0f3c4af4 tdf#115782: Need to use mirrored rotation in ODF It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Armin Le Grand committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=91374342ba491234a46aeb4b554b5e379869f301&h=libreoffice-6-0 tdf#115782: Need to use mirrored rotation in ODF It will be available in 6.0.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Okay, done: tdf#115782: Need to use mirrored rotation in ODF (ea360461746f37be021b63da7a64a60d0f3c4af4) in libreoffice-6-0: 91374342ba491234a46aeb4b554b5e379869f301