diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-20 12:49:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-20 17:48:23 +0100 |
commit | 85a74ebd929d6396daf591a01f79758888fd7e4f (patch) | |
tree | 045cf512ab90a34ee66d5c957b9ea31882ba68f0 /sot | |
parent | f56ae6badbb1eeb53c443bedbe8e96fd36ed426c (diff) |
loplugin:refcounting in sot
Change-Id: I29d50f536779c28570c8920ad34d0770934af0c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111261
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
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 = |