summaryrefslogtreecommitdiff
path: root/svl/source/fsstor
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/fsstor')
-rw-r--r--svl/source/fsstor/fsstorage.cxx11
-rw-r--r--svl/source/fsstor/ostreamcontainer.cxx18
2 files changed, 14 insertions, 15 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index cbe3664b9c15..86ba08f7218e 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -410,7 +410,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
if ( pStream )
{
if ( !pStream->GetError() )
- xResult = uno::Reference < io::XStream >( new ::utl::OStreamWrapper( *pStream ) );
+ xResult.set( new ::utl::OStreamWrapper( *pStream ) );
else
delete pStream;
}
@@ -540,11 +540,10 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement(
throw io::IOException(); // there is no such folder
::ucbhelper::Content aResultContent( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() );
- xResult = uno::Reference< embed::XStorage >(
- static_cast< OWeakObject* >( new FSStorage( aResultContent,
- nStorageMode,
- m_pImpl->m_xContext ) ),
- uno::UNO_QUERY );
+ xResult.set( static_cast< OWeakObject* >( new FSStorage( aResultContent,
+ nStorageMode,
+ m_pImpl->m_xContext ) ),
+ uno::UNO_QUERY );
}
catch( embed::InvalidStorageException& )
{
diff --git a/svl/source/fsstor/ostreamcontainer.cxx b/svl/source/fsstor/ostreamcontainer.cxx
index 48fafcde9460..5ed416ee3a33 100644
--- a/svl/source/fsstor/ostreamcontainer.cxx
+++ b/svl/source/fsstor/ostreamcontainer.cxx
@@ -37,20 +37,20 @@ OFSStreamContainer::OFSStreamContainer( const uno::Reference < io::XStream >& xS
if ( !m_xStream.is() )
throw uno::RuntimeException();
- m_xSeekable = uno::Reference< io::XSeekable >( xStream, uno::UNO_QUERY );
+ m_xSeekable.set( xStream, uno::UNO_QUERY );
m_xInputStream = xStream->getInputStream();
m_xOutputStream = xStream->getOutputStream();
- m_xTruncate = uno::Reference< io::XTruncate >( m_xOutputStream, uno::UNO_QUERY );
- m_xAsyncOutputMonitor = uno::Reference< io::XAsyncOutputMonitor >( m_xOutputStream, uno::UNO_QUERY );
+ m_xTruncate.set( m_xOutputStream, uno::UNO_QUERY );
+ m_xAsyncOutputMonitor.set( m_xOutputStream, uno::UNO_QUERY );
}
catch( uno::Exception& )
{
- m_xStream = uno::Reference< io::XStream >();
- m_xSeekable = uno::Reference< io::XSeekable >();
- m_xInputStream = uno::Reference< io::XInputStream >();
- m_xOutputStream = uno::Reference< io::XOutputStream >();
- m_xTruncate = uno::Reference< io::XTruncate >();
- m_xAsyncOutputMonitor = uno::Reference< io::XAsyncOutputMonitor >();
+ m_xStream.clear();
+ m_xSeekable.clear();
+ m_xInputStream.clear();
+ m_xOutputStream.clear();
+ m_xTruncate.clear();
+ m_xAsyncOutputMonitor.clear();
}
}