From 7f66a340933339974b5c6d70af4ae3c17e4f001a Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 30 Nov 2018 16:40:58 +0100 Subject: oox smartart, accent process: handle connector shape between pairs The shape was created, but we literally tried to create a "conn" type, while that has to be resolved to the relevant arrow type based on the context. This means now arrows show up between the parent-child pairs (but their size is not yet correct). Change-Id: I82594e46579e4ef723093e1dd0ba31bfcbbec4a0 Reviewed-on: https://gerrit.libreoffice.org/64348 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sd/qa/unit/import-tests-smartart.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sd') diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index aa8498b73ce9..be8ac42d3b45 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -14,6 +14,8 @@ #include #include +#include + using namespace ::com::sun::star; class SdImportTestSmartArt : public SdModelTestBase @@ -490,6 +492,17 @@ void SdImportTestSmartArt::testAccentProcess() // below xFirstParent (a good position is 9081). CPPUNIT_ASSERT_LESS(nFirstChildTop, nFirstParentTop); + // Make sure that we have an arrow shape between the two pairs. + uno::Reference xArrow(xGroup->getByIndex(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xArrow.is()); + comphelper::SequenceAsHashMap aCustomShapeGeometry( + xArrow->getPropertyValue("CustomShapeGeometry")); + // Without the accompanying fix in place, this test would have failed, i.e. + // the custom shape lacked a type -> arrow was not visible. + CPPUNIT_ASSERT(aCustomShapeGeometry["Type"].has()); + OUString aType = aCustomShapeGeometry["Type"].get(); + CPPUNIT_ASSERT_EQUAL(OUString("ooxml-rightArrow"), aType); + uno::Reference xSecondPair(xGroup->getByIndex(2), uno::UNO_QUERY); CPPUNIT_ASSERT(xSecondPair.is()); CPPUNIT_ASSERT_EQUAL(static_cast(3), xSecondPair->getCount()); -- cgit