summaryrefslogtreecommitdiff
path: root/package/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-26 20:07:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-05 22:15:54 +0000
commit458bf0812570f517dd4b80efbcfb7e0fca9479f7 (patch)
tree20a84c003004b38810cbd97459a2f6b2018024f6 /package/inc
parent5a2a266d4bb493a7e9e71616d567cb4ccdf82269 (diff)
Resolves: tdf#88314 close temp file after each thread completed
Change-Id: Ic2eec30cfb5f61c53777eefeeb8bad6f552da2fc Reviewed-on: https://gerrit.libreoffice.org/17355 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'package/inc')
-rw-r--r--package/inc/ZipOutputEntry.hxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx
index 2a5aa0483ce8..d431a0746ea7 100644
--- a/package/inc/ZipOutputEntry.hxx
+++ b/package/inc/ZipOutputEntry.hxx
@@ -37,7 +37,8 @@ class ZipOutputEntry
{
::com::sun::star::uno::Sequence< sal_Int8 > m_aDeflateBuffer;
ZipUtils::Deflater m_aDeflater;
- css::uno::Reference< css::io::XTempFile > m_xTempFile;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ OUString m_aTempURL;
css::uno::Reference< css::io::XOutputStream > m_xOutStream;
::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XCipherContext > m_xCipherContext;
@@ -58,14 +59,21 @@ public:
~ZipOutputEntry();
- css::uno::Reference< css::io::XInputStream > getData();
+ /* This block of methods is for threaded zipping, where we compress to a temp stream, whose
+ data is retrieved via getData */
+ ZipOutputEntry(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
+ ZipEntry& rEntry, ZipPackageStream* pStream, bool bEncrypt = false);
+ void createBufferFile();
+ void setParallelDeflateException(const ::css::uno::Any &rAny) { m_aParallelDeflateException = rAny; }
+ css::uno::Reference< css::io::XInputStream > getData() const;
+ ::css::uno::Any getParallelDeflateException() const { return m_aParallelDeflateException; }
+ void closeBufferFile();
+
ZipEntry* getZipEntry() { return m_pCurrentEntry; }
ZipPackageStream* getZipPackageStream() { return m_pCurrentStream; }
bool isEncrypt() { return m_bEncryptCurrentEntry; }
- void setParallelDeflateException(const ::css::uno::Any &rAny) { m_aParallelDeflateException = rAny; }
- ::css::uno::Any getParallelDeflateException() const { return m_aParallelDeflateException; }
-
void closeEntry();
void write(const css::uno::Sequence< sal_Int8 >& rBuffer);