diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-09 14:47:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-09 18:02:08 +0100 |
commit | a3fa2c3bad77b976e7f79de5d0f2abc0283e7b3e (patch) | |
tree | 9de61ffd3c1c50e23af81f02bff9a0892b0b0026 /package/source/zipapi/ZipOutputEntry.cxx | |
parent | 9754b3feb4092243f30c665abc0344b1a665b5f6 (diff) |
Simplify some TempFile service code
Change-Id: Id39be33dcc5aa9378e29c850cb71d3662093ab25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package/source/zipapi/ZipOutputEntry.cxx')
-rw-r--r-- | package/source/zipapi/ZipOutputEntry.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/package/source/zipapi/ZipOutputEntry.cxx b/package/source/zipapi/ZipOutputEntry.cxx index 5115c7a3ebc1..a30eba7c981c 100644 --- a/package/source/zipapi/ZipOutputEntry.cxx +++ b/package/source/zipapi/ZipOutputEntry.cxx @@ -252,12 +252,11 @@ void ZipOutputEntryInThread::createBufferFile() { assert(!m_xOutStream.is() && m_aTempURL.isEmpty() && "should only be called in the threaded mode where there is no existing stream yet"); - uno::Reference < beans::XPropertySet > xTempFileProps( + uno::Reference < io::XTempFile > xTempFile( io::TempFile::create(m_xContext), - uno::UNO_QUERY_THROW ); - xTempFileProps->setPropertyValue("RemoveFile", uno::makeAny(false)); - uno::Any aUrl = xTempFileProps->getPropertyValue( "Uri" ); - aUrl >>= m_aTempURL; + uno::UNO_SET_THROW ); + xTempFile->setRemoveFile(false); + m_aTempURL = xTempFile->getUri(); assert(!m_aTempURL.isEmpty()); uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess(ucb::SimpleFileAccess::create(m_xContext)); |