From 397b64afc62a5632a6648598558a4d2c3ca0d283 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 26 Oct 2018 17:45:49 +0200 Subject: oox smartart, linear layout: take horizontal position from constraints Both horizontal size and position looks sane now. Change-Id: I6f040e4f0ff49be74420fafc4bcc5e899b6e94f7 Reviewed-on: https://gerrit.libreoffice.org/62397 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sd/qa/unit/import-tests-smartart.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'sd') diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index 864fc1ad11f5..3f0d274f2c6a 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -380,12 +380,19 @@ void SdImportTestSmartArt::testVertialBoxList() // constraint wanted. CPPUNIT_ASSERT_EQUAL(static_cast(11852), xParentText->getSize().Width); - uno::Reference xSecondChild(xShapeGroup->getByIndex(1), uno::UNO_QUERY); - CPPUNIT_ASSERT(xSecondChild.is()); + uno::Reference xChildText(xShapeGroup->getByIndex(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChildText.is()); // Without the accompanying fix in place, this test would have failed with // 'actual: 7361' (and with the fix: 'actual: 16932', i.e. the width of the // parent). - CPPUNIT_ASSERT_GREATER(static_cast(10000), xSecondChild->getSize().Width); + CPPUNIT_ASSERT_GREATER(static_cast(10000), xChildText->getSize().Width); + + // Assert that the right edge of the parent text is closer to the slide + // boundary than the right edge of the parent text. + // Without the accompanying fix in place, this test would have failed with + // 'Expected greater than: 25656, Actual : 21165'. + CPPUNIT_ASSERT_GREATER(xParentText->getPosition().X + xParentText->getSize().Width, + xChildText->getPosition().X + xChildText->getSize().Width); xDocShRef->DoClose(); } -- cgit