diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-19 10:49:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-20 08:24:23 +0200 |
commit | 4a553b9a5830ecc752efe0b0f2692bac0f0f3f8c (patch) | |
tree | 4d2cf04256ce55c9f74317753a4c25581a89193f | |
parent | 5733eeb43dc34b1bffc9eb14af3de976a4202bd0 (diff) |
loplugin:inlinefields in FSStorage_Impl
Change-Id: I6650d39f8f4c2f271e3936d590fe7eb500e674fe
Reviewed-on: https://gerrit.libreoffice.org/36665
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | svl/source/fsstor/fsstorage.cxx | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index 999a5a52e121..b79b626a94f4 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -69,7 +69,7 @@ struct FSStorage_Impl { OUString m_aURL; - ::ucbhelper::Content* m_pContent; + ::ucbhelper::Content m_aContent; sal_Int32 m_nMode; ::comphelper::OInterfaceContainerHelper2* m_pListenersContainer; // list of listeners @@ -80,7 +80,7 @@ struct FSStorage_Impl FSStorage_Impl( const ::ucbhelper::Content& aContent, sal_Int32 nMode, uno::Reference< uno::XComponentContext > const & xContext ) : m_aURL( aContent.getURL() ) - , m_pContent( new ::ucbhelper::Content( aContent ) ) + , m_aContent( aContent ) , m_nMode( nMode ) , m_pListenersContainer( nullptr ) , m_pTypeCollection( nullptr ) @@ -100,7 +100,6 @@ FSStorage_Impl::~FSStorage_Impl() { delete m_pListenersContainer; delete m_pTypeCollection; - delete m_pContent; } FSStorage::FSStorage( const ::ucbhelper::Content& aContent, @@ -148,20 +147,7 @@ bool FSStorage::MakeFolderNoUI( const OUString& rFolder ) ::ucbhelper::Content* FSStorage::GetContent() { ::osl::MutexGuard aGuard( m_aMutex ); - if ( !m_pImpl->m_pContent ) - { - uno::Reference< ucb::XCommandEnvironment > xDummyEnv; - - try - { - m_pImpl->m_pContent = new ::ucbhelper::Content( m_pImpl->m_aURL, xDummyEnv, comphelper::getProcessComponentContext() ); - } - catch( uno::Exception& ) - { - } - } - - return m_pImpl->m_pContent; + return &m_pImpl->m_aContent; } void FSStorage::CopyStreamToSubStream( const OUString& aSourceURL, |