summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorPaul Trojahn <paul.trojahn@gmail.com>2017-06-06 23:05:10 +0200
committerAndras Timar <andras.timar@collabora.com>2017-06-21 12:36:00 +0200
commit93c71c74739243373dd73b9685d9539ee5f1556b (patch)
treec167be1d469aae7d3e3cc06df519e062791ac1c0 /sd
parent812ebb1a2f826af3ed597816198361fbbde79aa8 (diff)
tdf#89064 Fix import of pages with comments and notes
importSlide removes the shapes on the page. It was used to import the comments and authors, which resulted in an empty notes page. Reviewed-on: https://gerrit.libreoffice.org/38648 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit c2da33ead8b093b12ebb9a0ea9c06d156c41a3e6) Change-Id: I7d68085b482e5497d46e92328c413c87440714a0
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf89064.pptxbin0 -> 24629 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf89064.pptx b/sd/qa/unit/data/pptx/tdf89064.pptx
new file mode 100644
index 000000000000..312496f79ad0
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf89064.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 27d15c0ec22b..d00387710361 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XEventsSupplier.hpp>
#include <com/sun/star/presentation/ClickAction.hpp>
+#include <com/sun/star/presentation/XPresentationPage.hpp>
#include <com/sun/star/drawing/GraphicExportFilter.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
@@ -143,6 +144,7 @@ public:
void testTdf104201();
void testTdf104445();
void testTdf100926();
+ void testTdf89064();
bool checkPattern(sd::DrawDocShellRef& rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected);
void testPatternImport();
@@ -207,6 +209,7 @@ public:
CPPUNIT_TEST(testTdf104445);
CPPUNIT_TEST(testPatternImport);
CPPUNIT_TEST(testTdf100926);
+ CPPUNIT_TEST(testTdf89064);
CPPUNIT_TEST_SUITE_END();
};
@@ -2137,6 +2140,16 @@ void SdImportTest::testTdf100926()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf89064()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf89064.pptx"), PPTX);
+ 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>(1), xNotesPage->getCount());
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();