tdf#90010 Partially revert "package: Do not bother with deflating jpeg images"

This reverts commit 0843ade74e for the case, when
the document is protected by password. Would be nice to fix properly later.

Change-Id: If159639d6f74de4e106e9dad382faac9d5de4a09
This commit is contained in:
Matúš Kukan
2015-03-25 21:35:55 +01:00
parent b33788cb6b
commit ca5ff45597

View File

@@ -775,7 +775,8 @@ bool ZipPackageStream::saveChild(
uno::Reference< io::XSeekable > xSeek(xStream, uno::UNO_QUERY);
// It's not worth to deflate jpegs to save ~1% in a slow process
if (xSeek.is() && msMediaType.endsWith("/jpeg"))
// Unfortunately, does not work for streams protected by password
if (xSeek.is() && msMediaType.endsWith("/jpeg") && !m_bToBeEncrypted)
{
ImplSetStoredData(*pTempEntry, xStream);
xSeek->seek(0);