diff options
author | Serge Krot <Serge.Krot@cib.de> | 2018-03-19 22:19:38 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-26 08:29:23 +0200 |
commit | 4e136b5d0d8fb5bf4712cffbda71979b8c02c3a4 (patch) | |
tree | d1483f9ab975c02522a500b9c5b6548b42a3e361 /sd | |
parent | 2564d17e117b2489cd06c476dbdc61360cc512c7 (diff) |
tdf#115005 Do not remove original vector images from slides
During calculation of the quality index of the image, we should
take into account also SVM vector image type.
Its mime type is image/x-vclgraphic.
Reviewed-on: https://gerrit.libreoffice.org/51599
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Conflicts:
sd/qa/unit/export-tests-ooxml2.cxx
xmloff/source/core/xmlmultiimagehelper.cxx
Reviewed-on: https://gerrit.libreoffice.org/51655
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 070f3db51da48c70cde12050c18fb03de2192c0f)
Change-Id: I7c723e99995f73258bb59d976a6c7670c51f7a25
Diffstat (limited to 'sd')
-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 |
2 files changed, 22 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 972e60949eaa..606e931c0c1f 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -130,6 +130,7 @@ public: void testTdf115394(); void testTdf115394Zero(); void testTdf111789(); + void testTdf115005(); /// SmartArt animated elements void testTdf104792(); void testTdf90627(); @@ -185,6 +186,7 @@ public: CPPUNIT_TEST(testGroupsRotatedPosition); CPPUNIT_TEST(testAccentColor); CPPUNIT_TEST(testTdf114848); + CPPUNIT_TEST(testTdf115005); CPPUNIT_TEST(testTdf107608); CPPUNIT_TEST(testTdf111786); CPPUNIT_TEST(testFontScale); @@ -1482,6 +1484,26 @@ void SdOOXMLExportTest2::testTdf111789() 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::testTdf104792() { ::sd::DrawDocShellRef xDocShRef = loadURL( |