diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2018-11-19 21:41:07 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2018-11-20 09:07:44 +0100 |
commit | d220e476df38e86e094066a690985c624316d37f (patch) | |
tree | c858c371739c54f892a8cd93d7cd1a40733bc93d /sw | |
parent | 0c627e494052f8717856712358763eb670b5a5fb (diff) |
tdf#120551 DOCX import: fix position of group shape with absolute position
Regression from commit af313fc149f80adb0f1680ca20e19745ccb7fede
(tdf#105143 DOCX import: enable DoNotCaptureDrawObjsOnPage layout compat
option, 2017-01-06), the group shape which covers most of the single
page in the document had a negative left position, while it should have
a small positive one (checking the drawingML markup).
This was a pre-existing problem, but now it's visible since we no longer
force objects to be on the page in Word compat mode.
Seeing the ODT import never positions group shapes (it's just a
container for child shapes), probably the DOCX import shouldn't do that
either. Start moving into this direction, first only for
absolute-positioned toplevel group shapes only, which already fixes the
bug.
Change-Id: I152ba06a81a2bd09195a4c724da4b8878b0457bb
Reviewed-on: https://gerrit.libreoffice.org/63606
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf120551.docx | bin | 0 -> 31758 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf120551.docx b/sw/qa/extras/ooxmlimport/data/tdf120551.docx Binary files differnew file mode 100644 index 000000000000..0fc0057c4e03 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf120551.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 743ed626fe8b..8466180c7903 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -92,6 +92,14 @@ DECLARE_OOXMLIMPORT_TEST(testGroupShapeFontName, "groupshape-fontname.docx") getProperty<OUString>(getRun(getParagraphOfText(1, xText), 1), "CharFontNameAsian")); } +DECLARE_OOXMLIMPORT_TEST(test120551, "tdf120551.docx") +{ + auto nHoriOrientPosition = getProperty<sal_Int32>(getShape(1), "HoriOrientPosition"); + // Without the accompanying fix in place, this test would have failed with + // 'Expected: 436, Actual : -2542'. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(436), nHoriOrientPosition); +} + DECLARE_OOXMLIMPORT_TEST(testTdf111550, "tdf111550.docx") { // The test document has following ill-formed structure: |