Kaydet (Commit) 79b2f1cb authored tarafından Serge Krot's avatar Serge Krot Kaydeden (comit) Samuel Mehrbrodt

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.

Change-Id: I7c723e99995f73258bb59d976a6c7670c51f7a25
Reviewed-on: https://gerrit.libreoffice.org/51599Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
üst 1083e405
...@@ -133,6 +133,7 @@ public: ...@@ -133,6 +133,7 @@ public:
void testTdf115394(); void testTdf115394();
void testTdf115394Zero(); void testTdf115394Zero();
void testBulletsAsImage(); void testBulletsAsImage();
void testTdf115005();
void testTdf111789(); void testTdf111789();
/// SmartArt animated elements /// SmartArt animated elements
void testTdf104792(); void testTdf104792();
...@@ -197,6 +198,7 @@ public: ...@@ -197,6 +198,7 @@ public:
CPPUNIT_TEST(testTdf115394); CPPUNIT_TEST(testTdf115394);
CPPUNIT_TEST(testTdf115394Zero); CPPUNIT_TEST(testTdf115394Zero);
CPPUNIT_TEST(testBulletsAsImage); CPPUNIT_TEST(testBulletsAsImage);
CPPUNIT_TEST(testTdf115005);
CPPUNIT_TEST(testTdf111789); CPPUNIT_TEST(testTdf111789);
CPPUNIT_TEST(testTdf104792); CPPUNIT_TEST(testTdf104792);
CPPUNIT_TEST(testTdf90627); CPPUNIT_TEST(testTdf90627);
...@@ -1524,6 +1526,26 @@ void SdOOXMLExportTest2::testBulletsAsImage() ...@@ -1524,6 +1526,26 @@ void SdOOXMLExportTest2::testBulletsAsImage()
xDocShRef->DoClose(); 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() void SdOOXMLExportTest2::testTdf111789()
{ {
// Shadow properties were not exported for text shapes. // Shadow properties were not exported for text shapes.
......
...@@ -58,6 +58,10 @@ namespace ...@@ -58,6 +58,10 @@ namespace
} }
// vector formats, prefer always // vector formats, prefer always
if (rMimeType == "image/x-vclgraphic") // MIMETYPE_VCLGRAPHIC
{
return 990;
}
if (rMimeType == "image/x-svm") if (rMimeType == "image/x-svm")
{ {
return 1000; return 1000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment