summaryrefslogtreecommitdiff
path: root/package/inc
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-12-13 23:09:10 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-12-14 00:21:18 +0100
commit43eca2d9f8d87363b5f4bf8c5df92bf06be08c08 (patch)
treef44052ffe4cc1d49035cfc113aef42aed468f4bc /package/inc
parent2ffeaecdf0bbef478408fb6753ec6cf9ea043b16 (diff)
package: Create memory buffer only when we need it - if we use parallelism
Otherwise write directly to the resulting zip file. Change-Id: I75097969f0cccf0b45da591c71221e5ae18668cb
Diffstat (limited to 'package/inc')
-rw-r--r--package/inc/ZipOutputEntry.hxx3
-rw-r--r--package/inc/ZipOutputStream.hxx1
2 files changed, 4 insertions, 0 deletions
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx
index 26ebb1548b56..1cf499f5efb3 100644
--- a/package/inc/ZipOutputEntry.hxx
+++ b/package/inc/ZipOutputEntry.hxx
@@ -19,6 +19,7 @@
#ifndef INCLUDED_PACKAGE_INC_ZIPOUTPUTENTRY_HXX
#define INCLUDED_PACKAGE_INC_ZIPOUTPUTENTRY_HXX
+#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/xml/crypto/XCipherContext.hpp>
@@ -36,6 +37,7 @@ class ZipOutputEntry
::com::sun::star::uno::Sequence< sal_Int8 > m_aDeflateBuffer;
ZipUtils::Deflater m_aDeflater;
css::uno::Reference< ZipPackageBuffer > m_pBuffer;
+ css::uno::Reference< css::io::XOutputStream > m_xOutStream;
::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XCipherContext > m_xCipherContext;
::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XDigestContext > m_xDigestContext;
@@ -48,6 +50,7 @@ class ZipOutputEntry
public:
ZipOutputEntry(
+ const css::uno::Reference< css::io::XOutputStream >& rxOutStream,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
ZipEntry& rEntry, ZipPackageStream* pStream, bool bEncrypt = false);
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index acf6dc4e1855..d6d7853f96cc 100644
--- a/package/inc/ZipOutputStream.hxx
+++ b/package/inc/ZipOutputStream.hxx
@@ -57,6 +57,7 @@ public:
void finish()
throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+ css::uno::Reference< css::io::XOutputStream > getStream();
static sal_uInt32 getCurrentDosTime();
static void setEntry( ZipEntry *pEntry );