summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2018-11-30 17:57:21 +0100
committerMiklos Vajna <vmiklos@collabora.com>2018-12-17 15:39:55 +0100
commit967f2ac350330a28a3fc2ec0993cbaf976e6cf60 (patch)
treeca473824002bf9b12064ce73d7082aa08ed11a1d /sd
parentbe78a50a883e646e9d4830e3024554395dd12b9e (diff)
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 <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit ddc2786831367577967e806d603f337a2e42806a) Reviewed-on: https://gerrit.libreoffice.org/65252
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx6
1 files changed, 6 insertions, 0 deletions
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<OUString>();
CPPUNIT_ASSERT_EQUAL(OUString("ooxml-rightArrow"), aType);
+ // Make sure that height of the arrow is less than its width.
+ uno::Reference<drawing::XShape> xArrowShape(xArrow, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xArrowShape.is());
+ awt::Size aArrowSize = xArrowShape->getSize();
+ CPPUNIT_ASSERT_LESS(aArrowSize.Width, aArrowSize.Height);
+
uno::Reference<drawing::XShapes> xSecondPair(xGroup->getByIndex(2), uno::UNO_QUERY);
CPPUNIT_ASSERT(xSecondPair.is());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), xSecondPair->getCount());