diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-09-21 20:54:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-29 09:11:18 +0200 |
commit | 4b95451f859bac8e05956ce12df17f1ee410032d (patch) | |
tree | 2ebe03c8ecbba3c9179d33c346774e037fcfc224 /package | |
parent | a08468c1a5255d3fb04cd8a0dc627acdea40426a (diff) |
split utl::TempFile into fast and named variants
which makes it easier to know what each variant requires
to stay on it's happy path
Change-Id: I3275a2543573367714bc78092e882f6535507285
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package')
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 2 | ||||
-rw-r--r-- | package/source/xstor/owriteablestream.hxx | 2 | ||||
-rw-r--r-- | package/source/xstor/selfterminatefilestream.cxx | 2 | ||||
-rw-r--r-- | package/source/xstor/selfterminatefilestream.hxx | 4 |
4 files changed, 4 insertions, 6 deletions
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 9f1360a4256b..3437df46f2fd 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -484,7 +484,6 @@ void OWriteStream_Impl::GetFilledTempFileIfNo( const uno::Reference< io::XInputS if ( !m_oTempFile.has_value() ) { m_oTempFile.emplace(); - m_oTempFile->EnableKillingFile(); try { if ( xStream.is() ) @@ -550,7 +549,6 @@ void OWriteStream_Impl::FillTempGetFileName() else if ( !m_oTempFile.has_value() ) { m_oTempFile.emplace(); - m_oTempFile->EnableKillingFile(); try { // copy stream contents to the file diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx index 9fa6c6ea0e59..140257641576 100644 --- a/package/source/xstor/owriteablestream.hxx +++ b/package/source/xstor/owriteablestream.hxx @@ -74,7 +74,7 @@ struct OWriteStream_Impl friend class OInputCompStream; OWriteStream* m_pAntiImpl; - std::optional<utl::TempFile> m_oTempFile; + std::optional<utl::TempFileFast> m_oTempFile; css::uno::Reference< css::io::XStream > m_xCacheStream; css::uno::Reference< css::io::XSeekable > m_xCacheSeek; diff --git a/package/source/xstor/selfterminatefilestream.cxx b/package/source/xstor/selfterminatefilestream.cxx index 798f278f76f3..f3fe79439781 100644 --- a/package/source/xstor/selfterminatefilestream.cxx +++ b/package/source/xstor/selfterminatefilestream.cxx @@ -25,7 +25,7 @@ using namespace ::com::sun::star; -OSelfTerminateFileStream::OSelfTerminateFileStream( const uno::Reference< uno::XComponentContext >& xContext, utl::TempFile aTempFile ) +OSelfTerminateFileStream::OSelfTerminateFileStream( const uno::Reference< uno::XComponentContext >& xContext, utl::TempFileFast aTempFile ) : m_oTempFile( std::move(aTempFile) ) { uno::Reference< uno::XComponentContext > xOwnContext = xContext; diff --git a/package/source/xstor/selfterminatefilestream.hxx b/package/source/xstor/selfterminatefilestream.hxx index 333d1e55790e..f8cedcb64c46 100644 --- a/package/source/xstor/selfterminatefilestream.hxx +++ b/package/source/xstor/selfterminatefilestream.hxx @@ -35,11 +35,11 @@ struct OWriteStream_Impl; class OSelfTerminateFileStream final : public cppu::WeakImplHelper< css::io::XInputStream, css::io::XSeekable > { - std::optional<utl::TempFile> m_oTempFile; + std::optional<utl::TempFileFast> m_oTempFile; rtl::Reference< utl::OSeekableInputStreamWrapper > m_xStreamWrapper; public: - OSelfTerminateFileStream( const css::uno::Reference< css::uno::XComponentContext >& xContext, utl::TempFile aTempFile ); + OSelfTerminateFileStream( const css::uno::Reference< css::uno::XComponentContext >& xContext, utl::TempFileFast aTempFile ); virtual ~OSelfTerminateFileStream() override; |