diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-28 09:08:51 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-28 08:21:44 +0000 |
commit | 1632d6380cb905c3d3c022079e703abf7ce14f5e (patch) | |
tree | d5ccccc984058c60d82d1898a6057eef8c00456b /sd | |
parent | 979c4a4140d6b86a4219b3daf1c3fbd9f8730459 (diff) |
ODP export: add embedded pdf support
This is basically the draw shape equivalent of
SwGrfNode::GetReplacementGrfObj(), that already had explicit code for
PDF purposes.
Change-Id: I00a619082f59a3e377d45c3a59615cadae295586
Reviewed-on: https://gerrit.libreoffice.org/26724
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/odp/embedded-pdf.odp | bin | 0 -> 19654 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/embedded-pdf.odp b/sd/qa/unit/data/odp/embedded-pdf.odp Binary files differnew file mode 100644 index 000000000000..87aec5a70ef4 --- /dev/null +++ b/sd/qa/unit/data/odp/embedded-pdf.odp diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 0dd47e5c4ff3..a2c3be24bd97 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -157,6 +157,7 @@ public: void testTdf80224(); void testTdf92527(); void testTdf99224(); + void testEmbeddedPdf(); CPPUNIT_TEST_SUITE(SdExportTest); CPPUNIT_TEST(testFdo90607); @@ -212,6 +213,7 @@ public: CPPUNIT_TEST(testExtFileField); CPPUNIT_TEST(testAuthorField); CPPUNIT_TEST(testTdf99224); + CPPUNIT_TEST(testEmbeddedPdf); CPPUNIT_TEST_SUITE_END(); @@ -1722,6 +1724,18 @@ void SdExportTest::testTdf99224() xShell->DoClose(); } +void SdExportTest::testEmbeddedPdf() +{ + sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/embedded-pdf.odp"), ODP); + xShell = saveAndReload(xShell, ODP); + uno::Reference<drawing::XDrawPage> xPage = getPage(0, xShell); + uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY); + OUString aReplacementGraphicURL; + xShape->getPropertyValue("ReplacementGraphicURL") >>= aReplacementGraphicURL; + CPPUNIT_ASSERT(!aReplacementGraphicURL.isEmpty()); + xShell->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |