diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-08-24 14:29:00 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-08-24 16:04:53 +0200 |
commit | b766cab621690a3aaf4e10fcf925ebab1c1925b8 (patch) | |
tree | 37baa80815d5b792fa8697f5696daaf141cb94d7 /sd/qa/unit | |
parent | 04e719efbdb551d7c72fd0cc690f76c96bb66960 (diff) |
tdf#108926: Notes placeholder text boxes not shown in PPTs
Regression from:
acb2943c8125f4ceed74f35f31776929dedeb8d8
Call this placeholder related code not only for
normal slide pages.
Change-Id: Iae185ac7e5d2505554692045516cc51dbdcd735b
Reviewed-on: https://gerrit.libreoffice.org/41517
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sd/qa/unit')
-rwxr-xr-x | sd/qa/unit/data/pptx/tdf108926.ppt | bin | 0 -> 164864 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/tdf108926.ppt b/sd/qa/unit/data/pptx/tdf108926.ppt Binary files differnew file mode 100755 index 000000000000..c8455e226e1b --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf108926.ppt diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 7546689852a5..f9177c6493d3 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -171,6 +171,7 @@ public: void testSmartArtRotation(); void testTdf109223(); void testTdf109187(); + void testTdf108926(); bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected); void testPatternImport(); @@ -250,6 +251,7 @@ public: CPPUNIT_TEST(testSmartArtRotation); CPPUNIT_TEST(testTdf109223); CPPUNIT_TEST(testTdf109187); + CPPUNIT_TEST(testTdf108926); CPPUNIT_TEST_SUITE_END(); }; @@ -2431,6 +2433,23 @@ void SdImportTest::testTdf109187() xDocShRef->DoClose(); } +void SdImportTest::testTdf108926() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf108926.ppt"), PPT); + uno::Reference< presentation::XPresentationPage > xPage (getPage(0, xDocShRef), uno::UNO_QUERY_THROW); + uno::Reference< drawing::XDrawPage > xNotesPage (xPage->getNotesPage(), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xNotesPage->getCount()); + + // Second object should be imported as an empty presentation shape + uno::Reference< beans::XPropertySet > xPresentationShape(xNotesPage->getByIndex(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xPresentationShape.is()); + bool bIsEmptyPresObject = false; + xPresentationShape->getPropertyValue( "IsEmptyPresentationObject" ) >>= bIsEmptyPresObject; + CPPUNIT_ASSERT(bIsEmptyPresObject); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |