summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGrzegorz Araminowicz <grzegorz.araminowicz@collabora.com>2019-05-30 13:29:08 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-05-31 11:59:57 +0200
commit1b9344b95a685743d7b0e9bd831fea06d12df201 (patch)
tree12a8c0882bd8da605cd45e6970ca45ffda1e45a0 /sd
parenteaf9ed44af5ec746cfbeecf20817074e501d6a5e (diff)
SmartArt: more constraints used in linear algorithm
* both width and height of children and space is taken from constraints * better handling of space between children (not lost in some cases) * children centered in the other axis Change-Id: I25b8360790de0292b2b5c313dfa55e58dc042193 Reviewed-on: https://gerrit.libreoffice.org/73201 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 0267961f70cf..722cb142fbfc 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -1222,9 +1222,9 @@ void SdImportTestSmartArt::testVerticalBlockList()
// BC shape is rotated 90*, so width and height is swapped
CPPUNIT_ASSERT_GREATER(xShapeA->getSize().Width, xShapeBC->getSize().Height);
- CPPUNIT_ASSERT_LESSEQUAL(xShapeA->getSize().Height, xShapeBC->getSize().Width);
+ CPPUNIT_ASSERT_LESS(xShapeA->getSize().Height, xShapeBC->getSize().Width);
CPPUNIT_ASSERT_GREATER(xShapeA->getPosition().X, xShapeBC->getPosition().X);
- CPPUNIT_ASSERT_GREATEREQUAL(xShapeA->getPosition().Y, xShapeBC->getPosition().Y);
+ CPPUNIT_ASSERT_GREATER(xShapeA->getPosition().Y, xShapeBC->getPosition().Y);
uno::Reference<drawing::XShapes> xGroup3(xGroup->getByIndex(3), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xGroup3->getCount());
@@ -1235,7 +1235,11 @@ void SdImportTestSmartArt::testVerticalBlockList()
CPPUNIT_ASSERT_EQUAL(xShapeA->getSize().Width, xShapeEmpty->getSize().Width);
CPPUNIT_ASSERT_EQUAL(xShapeA->getSize().Height, xShapeEmpty->getSize().Height);
CPPUNIT_ASSERT_EQUAL(xShapeA->getPosition().X, xShapeEmpty->getPosition().X);
- CPPUNIT_ASSERT_GREATEREQUAL(xShapeA->getPosition().Y + 2*xShapeA->getSize().Height, xShapeEmpty->getPosition().Y);
+ CPPUNIT_ASSERT_GREATER(xShapeA->getPosition().Y + 2*xShapeA->getSize().Height, xShapeEmpty->getPosition().Y);
+
+ uno::Reference<drawing::XShape> xGroupShape(xGroup, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(xGroupShape->getPosition().Y + xGroupShape->getSize().Height,
+ xShapeEmpty->getPosition().Y + xShapeEmpty->getSize().Height);
xDocShRef->DoClose();
}