summaryrefslogtreecommitdiff
path: root/package/source/zippackage
diff options
context:
space:
mode:
Diffstat (limited to 'package/source/zippackage')
-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);