diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-06-26 09:21:17 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-06-26 11:20:47 +0200 |
commit | 6c09c85ec384e88c89bff0817e7fe9889d7ed68e (patch) | |
tree | 4d3d27b37989919b872fbb6c0906d4952f570ff6 /compilerplugins/clang/test/convertlong.cxx | |
parent | ccb557636ea87a40d5fcc370b7434029c0153588 (diff) |
tdf#161779 DOCX import, drawingML: fix handling of translation for lines
Open the bugdoc, it has a line with a non-zero horizontal offset from
the anchor paragraph, it shows up as a horizontal line, while it should
be vertical.
Checking how the ODT import and the DOCX import works for lines, one
obvious difference is that the ODT import at
SdXMLLineShapeContext::startFastElement() only considers the size /
scaling for the individual points, everything else goes to the transform
matrix of the containing shape, set in
SdXMLShapeContext::SetTransformation(). The drawingML import is way more
complex, but it effectively tries to not set any transformation on the
shape and just transorms the points of the line instead.
Fix the problem by changing Shape::createAndInsert() to also not put any
scaling to the transform matrix, to not transform the points of the line
and finally to apply the transform matrix to lines as well.
Do this only for toplevel Writer lines, that's enough to fix the bugdoc
and group shapes / Calc shapes need more investigation, so leave those
unchanged for now. Tests which were failing while working on this
change:
- CppunitTest_sc_shapetest's testTdf144242_Line_noSwapWH: do this for
Writer shapes only, for now
- CppunitTest_sw_ooxmlimport's lineRotation: this is already broken
partially, now looks perfect
- CppunitTest_sw_ooxmlimport's testTdf85232 / group shape: this points
out that lines in group shapes are some additional complexity, so
leave that case unchanged, for now
- CppunitTest_sw_ooxmlexport3's testArrowPosition: manual testing shows
this is still OK
- CppunitTest_sw_writerfilter_dmapper's testTdf141540GroupLinePosSize:
manual testing shows this is still OK
Change-Id: I246430148e3b3c927e010f360fa317e8429c82d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169533
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'compilerplugins/clang/test/convertlong.cxx')
0 files changed, 0 insertions, 0 deletions