summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx42
1 files changed, 42 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 17aa03e16cd7..68555d365cae 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -211,8 +211,29 @@ void SdImportTestSmartArt::testBase()
uno::Reference<drawing::XShape> xShape2(xShapeGroup->getByIndex(3), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape3(xShapeGroup->getByIndex(4), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape4(xShapeGroup->getByIndex(5), uno::UNO_QUERY_THROW);
+
+ /*
+ * Arrangement
+ * (LTR)
+ * ╭─────────╮
+ * │ 0 1 │
+ * │ 2 3 │
+ * │ 4 │
+ * ╰─────────╯
+ */
CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().Y, xShape1->getPosition().Y);
CPPUNIT_ASSERT_EQUAL(xShape2->getPosition().Y, xShape3->getPosition().Y);
+
+ CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().X, xShape2->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(xShape1->getPosition().X, xShape3->getPosition().X);
+
+ CPPUNIT_ASSERT_EQUAL(xShape2->getPosition().Y - xShape0->getPosition().Y,
+ xShape4->getPosition().Y - xShape2->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(xShape1->getPosition().X - xShape0->getPosition().X,
+ xShape3->getPosition().X - xShape2->getPosition().X);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(xShape2->getPosition().X + xShape3->getPosition().X,
+ 2 * xShape4->getPosition().X, 1);
+
CPPUNIT_ASSERT(xShape2->getPosition().Y > xShape0->getPosition().Y);
CPPUNIT_ASSERT(xShape4->getPosition().Y > xShape2->getPosition().Y);
CPPUNIT_ASSERT(xShape0->getPosition().X < xShape1->getPosition().X);
@@ -630,8 +651,29 @@ void SdImportTestSmartArt::testBaseRtoL()
uno::Reference<drawing::XShape> xShape2(xShapeGroup->getByIndex(3), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape3(xShapeGroup->getByIndex(4), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape4(xShapeGroup->getByIndex(5), uno::UNO_QUERY_THROW);
+
+ /*
+ * Arrangement
+ * (RTL)
+ * ╭─────────╮
+ * │ 1 0 │
+ * │ 3 2 │
+ * │ 4 │
+ * ╰─────────╯
+ */
CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().Y, xShape1->getPosition().Y);
CPPUNIT_ASSERT_EQUAL(xShape2->getPosition().Y, xShape3->getPosition().Y);
+
+ CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().X, xShape2->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(xShape1->getPosition().X, xShape3->getPosition().X);
+
+ CPPUNIT_ASSERT_EQUAL(xShape2->getPosition().Y - xShape0->getPosition().Y,
+ xShape4->getPosition().Y - xShape2->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(xShape1->getPosition().X - xShape0->getPosition().X,
+ xShape3->getPosition().X - xShape2->getPosition().X);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(xShape2->getPosition().X + xShape3->getPosition().X,
+ 2 * xShape4->getPosition().X, 1);
+
CPPUNIT_ASSERT(xShape2->getPosition().Y > xShape0->getPosition().Y);
CPPUNIT_ASSERT(xShape4->getPosition().Y > xShape2->getPosition().Y);
CPPUNIT_ASSERT(xShape0->getPosition().X > xShape1->getPosition().X);