summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-01-21 10:34:19 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-01-21 13:11:28 +0100
commitacf8dec2aff423c6c4cfbd0e1ecb01ee052316cd (patch)
treef884c7750c63e3929bf4c36a3c8571964cbd8b47 /sd
parentfdc91f7493171ae600ecb293ad380df5fa77a277 (diff)
oox smartart, org chart: fix position and size of connector shapes
Finally the bugdoc rendering result is reasonable and even looks like a tree as it should. Change-Id: I4e7a729afd3d2c5af2e7f41903737bd56be406fa Reviewed-on: https://gerrit.libreoffice.org/66664 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sd')
-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 ee25c47fbd8e..54dd57bc8615 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -778,6 +778,15 @@ void SdImportTestSmartArt::testOrgChart()
// assistant shape was below the employee shape.
CPPUNIT_ASSERT_GREATER(aAssistantPos.Y, aEmployeePos.Y);
+ // Make sure the connector of the assistant is above the shape.
+ uno::Reference<drawing::XShape> xAssistantConnector(
+ getChildShape(getChildShape(getChildShape(xGroup, 0), 1), 0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xAssistantConnector.is());
+ awt::Point aAssistantConnectorPos = xAssistantConnector->getPosition();
+ // This failed, the vertical positions of the connector and the shape of
+ // the assistant were the same.
+ CPPUNIT_ASSERT_LESS(aAssistantPos.Y, aAssistantConnectorPos.Y);
+
// Make sure the height of xManager and xManager2 is the same.
uno::Reference<text::XText> xManager2(
getChildShape(getChildShape(getChildShape(xGroup, 1), 0), 0), uno::UNO_QUERY);