diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2020-07-09 09:54:15 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-11-25 18:08:10 +0100 |
commit | 92f1c430e4e77e71e7c914ad567d4970e5b2cd95 (patch) | |
tree | 53271d1d2da2b696ed94972d55192c15cba8ed62 /sw/qa | |
parent | 35977939ba091386a8f2278c5bfecee91f5e1ac2 (diff) |
tdf#138130, tdf#123621 sw: fix textbox position according to DOCX
i.e. when spAutoFit is present in DOCX, and size of
the textbox is relative.
See also commit cab956c480eb4f619580285c7b9a15b9e6d9b780
(tdf#112312 DOCX legacy shape export: keep fixed size).
Co-authored-by: Attila Szűcs (NISZ)
Change-Id: I29af97001954ad353a386164b68cd22f6230e3e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98401
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit also includes:
Clean-up of commit I29af97001954ad353a386164b68cd22f6230e3e5
Change-Id: I1963a5d899da2d122e60c4d87ca32aba4fb1f32a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102449
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106589
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf123621.docx | bin | 0 -> 14753 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 11 |
3 files changed, 12 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123621.docx b/sw/qa/extras/ooxmlexport/data/tdf123621.docx Binary files differnew file mode 100644 index 000000000000..471b6ef71e95 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf123621.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index f209ed442175..87a5223ccd2b 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -236,7 +236,7 @@ DECLARE_OOXMLEXPORT_TEST(testMceNested, "mce-nested.docx") // Vertical position of the shape was incorrect due to incorrect nested mce handling. uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY); // positionV's posOffset from the bugdoc, was 0. - CPPUNIT_ASSERT(6985 <= getProperty<sal_Int32>(xShape, "VertOrientPosition")); + CPPUNIT_ASSERT(6879 <= getProperty<sal_Int32>(xShape, "VertOrientPosition")); // This was -1 (default), make sure the background color is set. CPPUNIT_ASSERT_EQUAL(sal_Int32(0x4f81bd), getProperty<sal_Int32>(xShape, "FillColor")); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index 1950b8349697..1fd8ad4a7d84 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -30,6 +30,17 @@ protected: } }; +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123621, "tdf123621.docx") +{ + xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml"); + if (!pXmlDocument) + return; + + assertXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor" + "/wp:positionV/wp:posOffset", "1080135"); +} + + DECLARE_OOXMLEXPORT_TEST(testTdf133334_followPgStyle, "tdf133334_followPgStyle.odt") { CPPUNIT_ASSERT_EQUAL(2, getPages()); |