summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2015-03-25 21:35:55 +0100
committerDavid Tardon <dtardon@redhat.com>2015-03-26 08:46:45 +0000
commit9ae9434662a9165aa31575448bc577e4b48db753 (patch)
tree654d669b739d065cdff8d5350825c225b30df01b
parenta3158e0550c797e579d2b792cc37f571a8006700 (diff)
tdf#90010 Partially revert "package: Do not bother with deflating jpeg images"
This reverts commit 0843ade74e5848c0babad509b10c334b01847be2 for the case, when the document is protected by password. Would be nice to fix properly later. Change-Id: If159639d6f74de4e106e9dad382faac9d5de4a09 (cherry picked from commit ca5ff4559726455d0c8fbdd08cb35af3308492bf) Reviewed-on: https://gerrit.libreoffice.org/15006 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit da651b6ccb47e82f71d890fc8bb9d6cf0201f289) Reviewed-on: https://gerrit.libreoffice.org/15010 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index e22b234ee24a..c34ba01bf7dc 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -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);