diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2021-06-14 16:06:55 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-06-21 17:53:00 +0200 |
commit | 11ef976624dce8a8e50a1eb20e9c586519fd7ec8 (patch) | |
tree | 875a4bf1016d1a446371aaaf2bef9f51e70fcc0e /sd | |
parent | b25c9bd18cfa544578ac87020b2b41d881e73e7f (diff) |
tdf#142590 PPTX import: fix custom slide show use as default
If the PPTX file contains a custom slideshow, which set by
default and opening in Impress, this setting wasn't imported.
See also commit 312334f8488a668e9b5302959b60292ce151e4fc
"tdf#47365 PPTX export: support loop attribute" and
commit a4b66458a7b8da2f5580014813e5dabe3fa670b6
"tdf#125071 PPTX: fix missing custom slide show export".
Change-Id: I9c2b3773f6883ee795f119df5b8534fcdfa6618f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117172
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 8bf44b9cdceb7926fe52ef0bd4a38af24e7c700a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117562
Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf142590.pptx | bin | 0 -> 35022 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf142590.pptx b/sd/qa/unit/data/pptx/tdf142590.pptx Binary files differnew file mode 100644 index 000000000000..ecc131c2a0f6 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf142590.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index fec4db5b6586..8d7b5333f720 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 testTdf142590(); void testCustomSlideShow(); void testInternalHyperlink(); void testHyperlinkColor(); @@ -241,6 +242,7 @@ public: CPPUNIT_TEST_SUITE(SdImportTest); CPPUNIT_TEST(testDocumentLayout); + CPPUNIT_TEST(testTdf142590); CPPUNIT_TEST(testCustomSlideShow); CPPUNIT_TEST(testInternalHyperlink); CPPUNIT_TEST(testHyperlinkColor); @@ -436,6 +438,23 @@ void SdImportTest::testDocumentLayout() } } +void SdImportTest::testTdf142590() +{ + ::sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf142590.pptx"), PPTX); + + uno::Reference<presentation::XPresentationSupplier> xPresentationSupplier( + xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> xPresentationProps(xPresentationSupplier->getPresentation(), + uno::UNO_QUERY_THROW); + const OUString sCustomShowId + = xPresentationProps->getPropertyValue("CustomShow").get<OUString>(); + + CPPUNIT_ASSERT(!sCustomShowId.isEmpty()); + + xDocShRef->DoClose(); +} + void SdImportTest::testCustomSlideShow() { ::sd::DrawDocShellRef xDocShRef |