[Libreoffice-commits] core.git: Branch 'libreoffice-7-0-0' - package/inc package/source
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 17 09:29:01 UTC 2020
package/inc/ZipOutputEntry.hxx | 1 +
package/source/zipapi/ZipOutputEntry.cxx | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 31cb5467927dc87579e7343b270b81fc13b0ab79
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon Jul 13 12:02:59 2020 +0200
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Fri Jul 17 11:28:26 2020 +0200
fix encrypted parallel zip saving (tdf#134332)
ZipOutputEntryBase::processDeflated() was calling isDeflaterFinished()
to find out whether to finalize and dispose m_xCipherContext.
With ZipOutputEntryParallel this was always true, so the context
was disposed after the first call. That was originally correct, because
originally processDeflated() was called just once at the very end, but
353d4528b8ad8abca9a13f3016632e42bab7afde changed to calling it several
times.
Change-Id: I1e4a0c887e4ba7ac7b20fa315169eaa911335fde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98625
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
(cherry picked from commit 08161f853571e3d4113c40a5d9d2cc24dca7506f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98648
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
(cherry picked from commit 53c3c95c0a3d42161ea661ecb454ef46d4b7111f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98838
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
Tested-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx
index b7720a5009d8..9ef4466ed742 100644
--- a/package/inc/ZipOutputEntry.hxx
+++ b/package/inc/ZipOutputEntry.hxx
@@ -139,6 +139,7 @@ class ZipOutputEntryParallel final : public ZipOutputEntryBase
{
sal_Int64 totalIn;
sal_Int64 totalOut;
+ bool finished;
public:
ZipOutputEntryParallel(
const css::uno::Reference< css::io::XOutputStream >& rxOutStream,
diff --git a/package/source/zipapi/ZipOutputEntry.cxx b/package/source/zipapi/ZipOutputEntry.cxx
index c63dc1691136..c9a4943cbe19 100644
--- a/package/source/zipapi/ZipOutputEntry.cxx
+++ b/package/source/zipapi/ZipOutputEntry.cxx
@@ -358,6 +358,7 @@ ZipOutputEntryParallel::ZipOutputEntryParallel(
: ZipOutputEntryBase(rxOutput, rxContext, rEntry, pStream, bEncrypt, true)
, totalIn(0)
, totalOut(0)
+, finished(false)
{
}
@@ -381,6 +382,7 @@ void ZipOutputEntryParallel::writeStream(const uno::Reference< io::XInputStream
void ZipOutputEntryParallel::finishDeflater()
{
// ThreadedDeflater is called synchronously in one call, so nothing to do here.
+ finished = true;
}
sal_Int64 ZipOutputEntryParallel::getDeflaterTotalIn() const
@@ -397,11 +399,12 @@ void ZipOutputEntryParallel::deflaterReset()
{
totalIn = 0;
totalOut = 0;
+ finished = false;
}
bool ZipOutputEntryParallel::isDeflaterFinished() const
{
- return true;
+ return finished;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list