diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2021-10-06 09:31:37 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-10-20 12:30:21 +0200 |
commit | 378e8396223a80b96262d7b638a066eb83ba88d6 (patch) | |
tree | 64c842ba0d235f00689b0f7d59d4d5dcef5d567b /sd | |
parent | 649e29e53f9a79d8695b31b9a848fba14d6b583d (diff) |
tdf#144917 PPTX import: fix hyperlinks on grouped shapes
Hyperlinks on the shapes of a group shape weren't imported.
Now all of them are imported correctly.
Change-Id: Ic42892650a3492958600232bd7038585f9aa6ae1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123127
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf144917.pptx | bin | 0 -> 16033 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf144917.pptx b/sd/qa/unit/data/pptx/tdf144917.pptx Binary files differnew file mode 100644 index 000000000000..654b17a432cd --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf144917.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 36b3886d852f..580cb527e85f 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -122,6 +122,7 @@ public: virtual void setUp() override; void testDocumentLayout(); + void testTdf144917(); void testHyperlinkOnImage(); void testTdf142645(); void testTdf141704(); @@ -248,6 +249,7 @@ public: CPPUNIT_TEST_SUITE(SdImportTest); CPPUNIT_TEST(testDocumentLayout); + CPPUNIT_TEST(testTdf144917); CPPUNIT_TEST(testHyperlinkOnImage); CPPUNIT_TEST(testTdf142645); CPPUNIT_TEST(testTdf141704); @@ -450,6 +452,25 @@ void SdImportTest::testDocumentLayout() } } +void SdImportTest::testTdf144917() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf144917.pptx"), PPTX); + + uno::Reference<container::XIndexAccess> xGroupShape(getShapeFromPage(0, 0, xDocShRef), + uno::UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> xShape(xGroupShape->getByIndex(1), uno::UNO_QUERY_THROW); + uno::Reference<document::XEventsSupplier> xEventsSupplier(xShape, uno::UNO_QUERY); + uno::Reference<container::XNameAccess> xEvents(xEventsSupplier->getEvents()); + uno::Sequence<beans::PropertyValue> props; + xEvents->getByName("OnClick") >>= props; + comphelper::SequenceAsHashMap map(props); + auto iter(map.find("Bookmark")); + CPPUNIT_ASSERT_EQUAL(OUString("http://www.example.com/"), iter->second.get<OUString>()); + + xDocShRef->DoClose(); +} + void SdImportTest::testHyperlinkOnImage() { sd::DrawDocShellRef xDocShRef |