diff options
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 ) |