From d32be3ace8c8fd430bbecdf69f88a116b0ee91d1 Mon Sep 17 00:00:00 2001 From: Brij Mohan Lal Srivastava Date: Wed, 12 Nov 2014 14:24:10 +0530 Subject: fdo#86023 - O[U]String needs a 'clear' method Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann --- package/source/xstor/owriteablestream.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'package/source/xstor') diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index eabedbf2210b..02c8ee8196a8 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -278,7 +278,7 @@ OWriteStream_Impl::~OWriteStream_Impl() if ( !m_aTempURL.isEmpty() ) { KillFile( m_aTempURL, comphelper::getProcessComponentContext() ); - m_aTempURL = OUString(); + m_aTempURL.clear(); } CleanCacheStream(); @@ -606,14 +606,14 @@ OUString OWriteStream_Impl::FillTempGetFileName() catch( const packages::WrongPasswordException& ) { KillFile( m_aTempURL, comphelper::getProcessComponentContext() ); - m_aTempURL = OUString(); + m_aTempURL.clear(); throw; } catch( const uno::Exception& ) { KillFile( m_aTempURL, comphelper::getProcessComponentContext() ); - m_aTempURL = OUString(); + m_aTempURL.clear(); } } } @@ -835,7 +835,7 @@ void OWriteStream_Impl::Commit() // TODO/NEW: Let the temporary file be removed after commit xNewPackageStream->setDataStream( xInStream ); - m_aTempURL = OUString(); + m_aTempURL.clear(); } else // if ( m_bHasInsertedStreamOptimization ) { @@ -909,7 +909,7 @@ void OWriteStream_Impl::Revert() if ( !m_aTempURL.isEmpty() ) { KillFile( m_aTempURL, comphelper::getProcessComponentContext() ); - m_aTempURL = OUString(); + m_aTempURL.clear(); } m_aProps.realloc( 0 ); @@ -1330,7 +1330,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre if ( !m_aTempURL.isEmpty() ) { KillFile( m_aTempURL, comphelper::getProcessComponentContext() ); - m_aTempURL = OUString(); + m_aTempURL.clear(); } if ( m_xCacheStream.is() ) CleanCacheStream(); -- cgit