diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-12-14 00:11:53 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-12-14 00:21:20 +0100 |
commit | f92183833fa569006602ac7e93c906d2094e0d4d (patch) | |
tree | 9eade04a981394c2d3129b4667f5c20d8e46dee5 /package/inc | |
parent | 43eca2d9f8d87363b5f4bf8c5df92bf06be08c08 (diff) |
package: Better to use temporary files for huge memory zip streams
ZipPackageBuffer was holding the whole compressed data stream in one
uno::Sequence which seems to be a lot for big documents in some cases.
Change-Id: Ib10d00ac54df9674231f4bbf047fab7e9b0a7d45
Diffstat (limited to 'package/inc')
-rw-r--r-- | package/inc/ZipOutputEntry.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx index 1cf499f5efb3..48e33ebb546f 100644 --- a/package/inc/ZipOutputEntry.hxx +++ b/package/inc/ZipOutputEntry.hxx @@ -20,6 +20,7 @@ #define INCLUDED_PACKAGE_INC_ZIPOUTPUTENTRY_HXX #include <com/sun/star/io/XOutputStream.hpp> +#include <com/sun/star/io/XTempFile.hpp> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/xml/crypto/XCipherContext.hpp> @@ -36,7 +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::XTempFile > m_xTempFile; css::uno::Reference< css::io::XOutputStream > m_xOutStream; ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XCipherContext > m_xCipherContext; @@ -56,7 +57,7 @@ public: ~ZipOutputEntry(); - css::uno::Sequence< sal_Int8 > getData(); + css::uno::Reference< css::io::XInputStream > getData(); ZipEntry* getZipEntry() { return m_pCurrentEntry; } ZipPackageStream* getZipPackageStream() { return m_pCurrentStream; } bool isEncrypt() { return m_bEncryptCurrentEntry; } |