From 967f2ac350330a28a3fc2ec0993cbaf976e6cf60 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 30 Nov 2018 17:57:21 +0100 Subject: oox smartart, accent process: adjust size of connector from constraints The constraints explicitly said that the width should be larger than the height, but it was the opposite as constraints were not parsed. Unfortunately it would be too brave for globally start handling all constraints which lack a forName, so add a switch to opt in for this, and use that with the conn algorithm. All clients should migrate to bRequireForName=true at some stage, though. Change-Id: I24ae79b141c0f7a11e4d19f141759fc1dd2169b0 Reviewed-on: https://gerrit.libreoffice.org/64350 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit ddc2786831367577967e806d603f337a2e42806a) Reviewed-on: https://gerrit.libreoffice.org/65252 --- sd/qa/unit/import-tests-smartart.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sd') diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index be8ac42d3b45..fe24ff486fa3 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -503,6 +503,12 @@ void SdImportTestSmartArt::testAccentProcess() OUString aType = aCustomShapeGeometry["Type"].get(); CPPUNIT_ASSERT_EQUAL(OUString("ooxml-rightArrow"), aType); + // Make sure that height of the arrow is less than its width. + uno::Reference xArrowShape(xArrow, uno::UNO_QUERY); + CPPUNIT_ASSERT(xArrowShape.is()); + awt::Size aArrowSize = xArrowShape->getSize(); + CPPUNIT_ASSERT_LESS(aArrowSize.Width, aArrowSize.Height); + uno::Reference xSecondPair(xGroup->getByIndex(2), uno::UNO_QUERY); CPPUNIT_ASSERT(xSecondPair.is()); CPPUNIT_ASSERT_EQUAL(static_cast(3), xSecondPair->getCount()); -- cgit