diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2018-11-30 16:40:58 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2018-12-01 00:10:20 +0100 |
commit | 7f66a340933339974b5c6d70af4ae3c17e4f001a (patch) | |
tree | 2a6c826438b14d84b6f166ecc9088f4ee3407a49 /sd | |
parent | e4c2d0bb57ab8ea8f5c400d103d01376b8140f22 (diff) |
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 <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/import-tests-smartart.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
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 <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/text/XText.hpp> +#include <comphelper/sequenceashashmap.hxx> + 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<beans::XPropertySet> 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>()); + OUString aType = aCustomShapeGeometry["Type"].get<OUString>(); + CPPUNIT_ASSERT_EQUAL(OUString("ooxml-rightArrow"), aType); + 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()); |