diff options
author | Justin Luth <justin_luth@sil.org> | 2018-08-01 14:08:34 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-08-10 16:18:28 +0200 |
commit | ab296726263655bd3a722c125dd9cec2d507aaa5 (patch) | |
tree | c9221b42ec1cabd9fde7d62340d3f2776abc950b /sw | |
parent | 3cc5149a84c7b8cfaf0deb2e2f6c88c72343ee28 (diff) |
tdf#91999 export/drawingml: shape rotate 180 is not special
This commit reverts the first (LO 4.3ish) regression commit
6063555744ed89d8a757b667cddcdd4357839466 and most of the two commits
that tried to fix that: commit 9ae1e094d5a8a5b4432c88ebea0ca9fc1c79f602
and commit ee45d881efab230e7682f964d6ad4d00f85b0006 in LO6.0/6.2.
The ooxmlexport6 unit test shows that there is nothing special
about 180degrees. So, all transformations need to be avoided in
docx format - not just 180 degree ones.
I removed IsInGroupShape() since it is no longer being used - as
per standard procedures.
Change-Id: Id2bba5bc542875a10ac21fbb67f29b2d59705493
Reviewed-on: https://gerrit.libreoffice.org/58434
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/dml-textshapeB.docx | bin | 0 -> 15148 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 17 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 3 |
3 files changed, 19 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/dml-textshapeB.docx b/sw/qa/extras/ooxmlexport/data/dml-textshapeB.docx Binary files differnew file mode 100644 index 000000000000..ab790a896fd4 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/dml-textshapeB.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index 771378445fcb..3a20b765f934 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -114,6 +114,23 @@ DECLARE_OOXMLEXPORT_TEST(testDmlTextshape, "dml-textshape.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(-4727), xShape->getPosition().Y); } +DECLARE_OOXMLEXPORT_TEST(testDmlTextshapeB, "dml-textshapeB.docx") +{ + uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY); + xmlDocPtr pXmlDocument = parseExport("word/document.xml"); + if (!pXmlDocument) + return; + + uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(3), uno::UNO_QUERY); + // Connector was incorrectly shifted towards the top left corner, X was 192, Y was -5743. + CPPUNIT_ASSERT_EQUAL(sal_Int32(3778), xShape->getPosition().X); + CPPUNIT_ASSERT_EQUAL(sal_Int32(-5064), xShape->getPosition().Y); + + xShape.set(xGroup->getByIndex(5), uno::UNO_QUERY); + // This was incorrectly shifted towards the top of the page, Y was -5011. + CPPUNIT_ASSERT_EQUAL(sal_Int32(-4713), xShape->getPosition().Y); +} + DECLARE_OOXMLEXPORT_TEST(testDMLSolidfillAlpha, "dml-solidfill-alpha.docx") { // Problem was that the transparency was not exported (a:alpha). diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx index e958de434a81..404c40b1b149 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx @@ -1050,7 +1050,8 @@ DECLARE_OOXMLEXPORT_TEST(testFdo66474, "fdo66474.docx") DECLARE_OOXMLEXPORT_TEST(testGroupshapeRotation, "groupshape-rotation.docx") { // Rotation on groupshapes wasn't handled at all by the VML importer. - CPPUNIT_ASSERT_EQUAL(sal_Int32(315 * 100), getProperty<sal_Int32>(getShape(1), "RotateAngle")); + // Note: the shapes are still shifting on the page, so the rotation drifts after multiple round-trips. + CPPUNIT_ASSERT_DOUBLES_EQUAL(31500.0, getProperty<double>(getShape(1), "RotateAngle"), 100); } DECLARE_OOXMLEXPORT_TEST(testBnc780044Spacing, "bnc780044_spacing.docx") |