From a7e86beb00e9635ea4556ef4f8f8e24ff9965391 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 18 Oct 2018 14:43:23 +0200 Subject: oox: ignore SmartArt "fallback" with empty shape list This way at least something shows up in the import result. Far from perfect, though. Change-Id: Iae5a073d458598e7b5059ebdf435d50ce7c7df80 Reviewed-on: https://gerrit.libreoffice.org/61925 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sd/qa/unit/data/pptx/smartart-vertial-box-list.pptx | Bin 0 -> 43018 bytes sd/qa/unit/import-tests-smartart.cxx | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 sd/qa/unit/data/pptx/smartart-vertial-box-list.pptx (limited to 'sd') diff --git a/sd/qa/unit/data/pptx/smartart-vertial-box-list.pptx b/sd/qa/unit/data/pptx/smartart-vertial-box-list.pptx new file mode 100644 index 000000000000..b67d99e700c3 Binary files /dev/null and b/sd/qa/unit/data/pptx/smartart-vertial-box-list.pptx differ diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index e4960ada1121..1c2ef31f2958 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -40,6 +40,7 @@ public: void testEquation(); void testSegmentedCycle(); void testBaseRtoL(); + void testVertialBoxList(); CPPUNIT_TEST_SUITE(SdImportTestSmartArt); @@ -64,6 +65,7 @@ public: CPPUNIT_TEST(testEquation); CPPUNIT_TEST(testSegmentedCycle); CPPUNIT_TEST(testBaseRtoL); + CPPUNIT_TEST(testVertialBoxList); CPPUNIT_TEST_SUITE_END(); }; @@ -359,6 +361,19 @@ void SdImportTestSmartArt::testBaseRtoL() xDocShRef->DoClose(); } +void SdImportTestSmartArt::testVertialBoxList() +{ + sd::DrawDocShellRef xDocShRef = loadURL( + m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-vertial-box-list.pptx"), PPTX); + uno::Reference xShapeGroup(getShapeFromPage(0, 0, xDocShRef), + uno::UNO_QUERY_THROW); + // Without the accompanying fix in place, this test would have failed with + // 'actual: 0'. + CPPUNIT_ASSERT_EQUAL(static_cast(2), xShapeGroup->getCount()); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTestSmartArt); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit