diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-07 09:26:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-07 12:39:11 +0100 |
commit | 5404f75a2fa863b97bdf8432f647053f0bff726e (patch) | |
tree | 119d2cede534f5ce1173422df99a0e532d6a7a28 /svl/source/fsstor | |
parent | 39efec060719bb2654ba20844ba02429371a4ffb (diff) |
loplugin:collapseif in sdext..svx
Change-Id: I188d9e9b53e00acfbae3c7acd54de28f084c4b3f
Reviewed-on: https://gerrit.libreoffice.org/62985
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source/fsstor')
-rw-r--r-- | svl/source/fsstor/fsstorage.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index 32f88f6c8596..1c4de783df95 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -362,11 +362,8 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement( // TODO: test whether it really works for http and fwp std::unique_ptr<SvStream> pStream = ::utl::UcbStreamHelper::CreateStream( aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::STD_WRITE ); - if ( pStream ) - { - if ( !pStream->GetError() ) - xResult.set( new ::utl::OStreamWrapper( std::move(pStream) ) ); - } + if ( pStream && !pStream->GetError() ) + xResult.set( new ::utl::OStreamWrapper( std::move(pStream) ) ); } if ( !xResult.is() ) @@ -1148,14 +1145,11 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl // TODO: test whether it really works for http and fwp std::unique_ptr<SvStream> pStream = ::utl::UcbStreamHelper::CreateStream( aFileURL, StreamMode::STD_WRITE ); - if ( pStream ) + if ( pStream && !pStream->GetError() ) { - if ( !pStream->GetError() ) - { - uno::Reference< io::XStream > xStream = - uno::Reference < io::XStream >( new ::utl::OStreamWrapper( std::move(pStream) ) ); - xResult = static_cast< io::XStream* >( new OFSStreamContainer( xStream ) ); - } + uno::Reference< io::XStream > xStream = + uno::Reference < io::XStream >( new ::utl::OStreamWrapper( std::move(pStream) ) ); + xResult = static_cast< io::XStream* >( new OFSStreamContainer( xStream ) ); } } |