sot/source/sdstor/ucbstorage.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
New commits: commit 85a74ebd929d6396daf591a01f79758888fd7e4f Author: Noel <noel.gran...@collabora.co.uk> AuthorDate: Sat Feb 20 12:49:59 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Feb 20 17:48:23 2021 +0100 loplugin:refcounting in sot Change-Id: I29d50f536779c28570c8920ad34d0770934af0c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111261 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index ee6576c6b87c..bb936124a2ff 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -1577,18 +1577,17 @@ void UCBStorage_Impl::Init() { if ( !pStream->GetError() ) { - ::utl::OInputStreamWrapper* pHelper = new ::utl::OInputStreamWrapper( *pStream ); - css::uno::Reference < css::io::XInputStream > xInputStream( pHelper ); + rtl::Reference<::utl::OInputStreamWrapper> pHelper = new ::utl::OInputStreamWrapper( *pStream ); // create a manifest reader object that will read in the manifest from the stream Reference < css::packages::manifest::XManifestReader > xReader = css::packages::manifest::ManifestReader::create( ::comphelper::getProcessComponentContext() ) ; - Sequence < Sequence < PropertyValue > > aProps = xReader->readManifestSequence( xInputStream ); + Sequence < Sequence < PropertyValue > > aProps = xReader->readManifestSequence( pHelper ); // cleanup xReader = nullptr; - xInputStream = nullptr; + pHelper = nullptr; SetProps( aProps, OUString() ); } } @@ -2125,8 +2124,7 @@ sal_Int16 UCBStorage_Impl::Commit() // get the stream from the temp file and create an output stream wrapper SvStream* pStream = pTempFile->GetStream( StreamMode::STD_READWRITE ); - ::utl::OOutputStreamWrapper* pHelper = new ::utl::OOutputStreamWrapper( *pStream ); - css::uno::Reference < css::io::XOutputStream > xOutputStream( pHelper ); + rtl::Reference<::utl::OOutputStreamWrapper> xOutputStream = new ::utl::OOutputStreamWrapper( *pStream ); // create a manifest writer object that will fill the stream Reference < css::packages::manifest::XManifestWriter > xWriter = _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits