diff options
-rwxr-xr-x | sd/qa/unit/data/odp/tdf115005.odp | bin | 0 -> 51823 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 22 | ||||
-rw-r--r-- | xmloff/source/core/xmlmultiimagehelper.cxx | 4 |
3 files changed, 26 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/tdf115005.odp b/sd/qa/unit/data/odp/tdf115005.odp Binary files differnew file mode 100755 index 000000000000..764a862feda7 --- /dev/null +++ b/sd/qa/unit/data/odp/tdf115005.odp diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index d2c1cdc33256..0cf675be8cf2 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -133,6 +133,7 @@ public: void testTdf115394(); void testTdf115394Zero(); void testBulletsAsImage(); + void testTdf115005(); void testTdf111789(); /// SmartArt animated elements void testTdf104792(); @@ -197,6 +198,7 @@ public: CPPUNIT_TEST(testTdf115394); CPPUNIT_TEST(testTdf115394Zero); CPPUNIT_TEST(testBulletsAsImage); + CPPUNIT_TEST(testTdf115005); CPPUNIT_TEST(testTdf111789); CPPUNIT_TEST(testTdf104792); CPPUNIT_TEST(testTdf90627); @@ -1524,6 +1526,26 @@ void SdOOXMLExportTest2::testBulletsAsImage() xDocShRef->DoClose(); } +void SdOOXMLExportTest2::testTdf115005() +{ + sd::DrawDocShellRef xDocShRefOriginal = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf115005.odp"), ODP); + utl::TempFile tempFile; + sd::DrawDocShellRef xDocShRefResaved = saveAndReload(xDocShRefOriginal.get(), ODP, &tempFile); + + // additional checks of the output file + uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), tempFile.GetURL()); + + // check that the document contains original vector images + const uno::Sequence<OUString> names = xNameAccess->getElementNames(); + int nSVMFiles = 0; + for (int i=0; i<names.getLength(); i++) + { + if(names[i].endsWith(".svm")) + nSVMFiles++; + } + CPPUNIT_ASSERT_EQUAL(3, nSVMFiles); +} + void SdOOXMLExportTest2::testTdf111789() { // Shadow properties were not exported for text shapes. diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx index 6acf7b30ed28..474e796c9ad8 100644 --- a/xmloff/source/core/xmlmultiimagehelper.cxx +++ b/xmloff/source/core/xmlmultiimagehelper.cxx @@ -58,6 +58,10 @@ namespace } // vector formats, prefer always + if (rMimeType == "image/x-vclgraphic") // MIMETYPE_VCLGRAPHIC + { + return 990; + } if (rMimeType == "image/x-svm") { return 1000; |