summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport6.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport6.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index b07cd328e342..4e2f62b0dcbc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -108,12 +108,14 @@ DECLARE_OOXMLEXPORT_TEST(testDmlTextshape, "dml-textshape.docx")
OUString aType = comphelper::SequenceAsHashMap(getProperty<beans::PropertyValues>(xShape, "CustomShapeGeometry"))["Type"].get<OUString>();
CPPUNIT_ASSERT_EQUAL(OUString("ooxml-bentConnector3"), aType);
// Connector was incorrectly shifted towards the top left corner, X was 552, Y was 0.
- CPPUNIT_ASSERT_EQUAL(sal_Int32(4018), xShape->getPosition().X);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(-4487), xShape->getPosition().Y);
+ // It is not a DML, but a VML shape. The whole group is shifted 3mm right and 6mm up.
+ // Values are as in LO7.2, original problem is still fixed.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4016), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-4485), xShape->getPosition().Y);
xShape.set(xGroup->getByIndex(5), uno::UNO_QUERY);
// This was incorrectly shifted towards the top of the page, Y was 106.
- CPPUNIT_ASSERT_EQUAL(sal_Int32(-4727), xShape->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-4725), xShape->getPosition().Y);
}
// testDmlTextshapeB was only made export-only because as an import-export test it failed for an unknown reason
@@ -123,13 +125,15 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlTextshapeB, "dml-textshapeB.docx")
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(3776), xShape->getPosition().X);
- // Value as of LO7.2. Whole group is still shifted 3mm to right and 5mm down.
- CPPUNIT_ASSERT_EQUAL(sal_Int32(-5063), xShape->getPosition().Y);
+ // Values are as in LO7.2, the original problem is still fixed.
+ // FixMe: The shape is a VML group, not a DML. Export writes the connector shifted up, resulting
+ // in different routing. LO7.2 reads and writes the second connector wrongly. Whole group is
+ // still shifted.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-5061), xShape->getPosition().Y);
xShape.set(xGroup->getByIndex(5), uno::UNO_QUERY);
// This was incorrectly shifted towards the top of the page, Y was -5011.
- // Value as of LO 7.2
- CPPUNIT_ASSERT_EQUAL(sal_Int32(-4712), xShape->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-4710), xShape->getPosition().Y);
}
DECLARE_OOXMLEXPORT_TEST(testDMLSolidfillAlpha, "dml-solidfill-alpha.docx")
@@ -360,12 +364,12 @@ DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeChildPosition, "dml-groupshape-childpo
uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xChildGroup(xGroup->getByIndex(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(-2123), xChildGroup->getPosition().X);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(mbExported ? 11333 : 11331), xChildGroup->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(mbExported ? 11331 : 11331), xChildGroup->getPosition().Y);
xGroup.set(xChildGroup, uno::UNO_QUERY);
xChildGroup.set(xGroup->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1859), xChildGroup->getPosition().X);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(mbExported ? 11333 : 11331), xChildGroup->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(mbExported ? 11331 : 11331), xChildGroup->getPosition().Y);
xChildGroup.set(xGroup->getByIndex(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(-2123), xChildGroup->getPosition().X);