diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-03-09 09:54:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-03-09 14:23:45 +0100 |
commit | bbcf235753dc87ef6bc6652a77239513110e2d9e (patch) | |
tree | 0636b306f11ec31554ff4618547230de9c877977 /embedserv/source/embed | |
parent | 5e8c0e2556eebfee7b2d75403cbf5cee6642e644 (diff) |
loplugin:refcounting (clang-cl)
Change-Id: I91189ebd902b70e2fbe42fe8cc09b8677af1a5fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112194
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'embedserv/source/embed')
-rw-r--r-- | embedserv/source/embed/docholder.cxx | 8 | ||||
-rw-r--r-- | embedserv/source/embed/ed_ipersiststr.cxx | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 762352579d94..3d322c3cf95e 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -63,6 +63,7 @@ #include <o3tl/any.hxx> #include <osl/diagnose.h> #include <rtl/process.h> +#include <rtl/ref.hxx> using namespace ::com::sun::star; @@ -78,7 +79,6 @@ DocumentHolder::DocumentHolder( m_pIOleIPUIWindow(nullptr), m_pCHatchWin(nullptr), m_xOleAccess( xOleAccess ), - m_pInterceptor(nullptr), m_xFactory( xFactory ), m_bOnDeactivate(false), m_hWndxWinParent(nullptr), @@ -798,14 +798,14 @@ void DocumentHolder::ClearInterceptorInternally() m_pInterceptor->DisconnectDocHolder(); m_xInterceptorLocker.clear(); - m_pInterceptor = nullptr; + m_pInterceptor.clear(); } void DocumentHolder::ClearInterceptor() { ::osl::MutexGuard aGuard( m_aMutex ); m_xInterceptorLocker.clear(); - m_pInterceptor = nullptr; + m_pInterceptor.clear(); } @@ -967,7 +967,7 @@ void DocumentHolder::setTitle(const OUString& aDocumentName) { ::osl::ClearableMutexGuard aGuard( m_aMutex ); - Interceptor* pTmpInter = nullptr; + rtl::Reference<Interceptor> pTmpInter; uno::Reference< frame::XDispatchProviderInterceptor > xLock( m_xInterceptorLocker ); if ( xLock.is() && m_pInterceptor ) pTmpInter = m_pInterceptor; diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx index 1ccb2bc28a05..df5f412593a4 100644 --- a/embedserv/source/embed/ed_ipersiststr.cxx +++ b/embedserv/source/embed/ed_ipersiststr.cxx @@ -175,7 +175,6 @@ EmbedDocument_Impl::EmbedDocument_Impl( const uno::Reference< lang::XMultiServic { m_xOwnAccess = new EmbeddedDocumentInstanceAccess_Impl( this ); m_pDocHolder = new DocumentHolder( xFactory, m_xOwnAccess ); - m_pDocHolder->acquire(); } EmbedDocument_Impl::~EmbedDocument_Impl() @@ -192,8 +191,6 @@ EmbedDocument_Impl::~EmbedDocument_Impl() m_pDocHolder->CloseDocument(); m_pDocHolder->CloseFrame(); } - - m_pDocHolder->release(); } uno::Sequence< beans::PropertyValue > EmbedDocument_Impl::fillArgsForLoading_Impl( uno::Reference< io::XInputStream > const & xStream, DWORD /*nStreamMode*/, LPCOLESTR pFilePath ) |