diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/inc/ZipOutputEntry.hxx | 1 | ||||
-rw-r--r-- | package/source/zipapi/ZipOutputEntry.cxx | 7 | ||||
-rw-r--r-- | package/source/zipapi/ZipOutputStream.cxx | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx index d431a0746ea7..3a6447cc9007 100644 --- a/package/inc/ZipOutputEntry.hxx +++ b/package/inc/ZipOutputEntry.hxx @@ -69,6 +69,7 @@ public: css::uno::Reference< css::io::XInputStream > getData() const; ::css::uno::Any getParallelDeflateException() const { return m_aParallelDeflateException; } void closeBufferFile(); + void deleteBufferFile(); ZipEntry* getZipEntry() { return m_pCurrentEntry; } ZipPackageStream* getZipPackageStream() { return m_pCurrentStream; } diff --git a/package/source/zipapi/ZipOutputEntry.cxx b/package/source/zipapi/ZipOutputEntry.cxx index e3070036fa31..47ecbb4622af 100644 --- a/package/source/zipapi/ZipOutputEntry.cxx +++ b/package/source/zipapi/ZipOutputEntry.cxx @@ -114,6 +114,13 @@ void ZipOutputEntry::closeBufferFile() m_xOutStream.clear(); } +void ZipOutputEntry::deleteBufferFile() +{ + assert(!m_xOutStream.is() && !m_aTempURL.isEmpty()); + uno::Reference < ucb::XSimpleFileAccess3 > xAccess(ucb::SimpleFileAccess::create(m_xContext)); + xAccess->kill(m_aTempURL); +} + uno::Reference< io::XInputStream > ZipOutputEntry::getData() const { uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess(ucb::SimpleFileAccess::create(m_xContext)); diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx index 4acfa77f0124..be261cd5bef9 100644 --- a/package/source/zipapi/ZipOutputStream.cxx +++ b/package/source/zipapi/ZipOutputStream.cxx @@ -121,10 +121,12 @@ void ZipOutputStream::finish() rawWrite(aSequence); } while (nRead == n_ConstBufferSize); + xInput.clear(); rawCloseEntry(m_aEntries[i]->isEncrypt()); m_aEntries[i]->getZipPackageStream()->successfullyWritten(m_aEntries[i]->getZipEntry()); + m_aEntries[i]->deleteBufferFile(); delete m_aEntries[i]; } |