summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-10-26 15:33:43 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-10-26 17:45:39 +0200
commitb083b0808121d19f398a9f6ead195ae7e14ed047 (patch)
tree676ccded3777e41ef9404d88525dfcfe3bb42de1 /sd/qa
parente21ece71a70906526e2c3eceaac3bc0c93bb7831 (diff)
oox smartart, linear layout: take width from constraints
Finally the "parent text" of the test document now has correct width. Change-Id: I05c552dda66ad91f19cfc335b464549920269f69 Reviewed-on: https://gerrit.libreoffice.org/62395 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 9ffb432ce104..864fc1ad11f5 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -371,6 +371,15 @@ void SdImportTestSmartArt::testVertialBoxList()
// 'actual: 0'.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xShapeGroup->getCount());
+ uno::Reference<drawing::XShapes> xFirstChild(xShapeGroup->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFirstChild.is());
+ uno::Reference<drawing::XShape> xParentText(xFirstChild->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xParentText.is());
+ // Without the accompanying fix in place, this test would have failed with
+ // 'actual: 7361', i.e. the width was not the 70% of the parent as the
+ // constraint wanted.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(11852), xParentText->getSize().Width);
+
uno::Reference<drawing::XShape> xSecondChild(xShapeGroup->getByIndex(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(xSecondChild.is());
// Without the accompanying fix in place, this test would have failed with