use comphelper::WeakComponentImplHelper in ExpandContentProviderImpl

Change-Id: I3c24b1c2eb3d44cb58709cb18de53597adf56e41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127520
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2021-12-25 18:51:39 +02:00 committed by Noel Grandin
parent bde743f745
commit d3ca7a5090
2 changed files with 6 additions and 13 deletions

View file

@ -15,6 +15,7 @@ $(eval $(call gb_Library_set_componentfile,ucpexpand1,ucb/source/ucp/expand/ucpe
$(eval $(call gb_Library_use_sdk_api,ucpexpand1))
$(eval $(call gb_Library_use_libraries,ucpexpand1,\
comphelper \
cppu \
cppuhelper \
sal \

View file

@ -20,9 +20,8 @@
#include <rtl/uri.hxx>
#include <osl/mutex.hxx>
#include <cppuhelper/compbase.hxx>
#include <comphelper/compbase.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <ucbhelper/content.hxx>
@ -42,11 +41,11 @@ using namespace ::com::sun::star;
namespace
{
typedef ::cppu::WeakComponentImplHelper<
typedef comphelper::WeakComponentImplHelper<
lang::XServiceInfo, ucb::XContentProvider > t_impl_helper;
class ExpandContentProviderImpl : protected cppu::BaseMutex, public t_impl_helper
class ExpandContentProviderImpl : public t_impl_helper
{
uno::Reference< uno::XComponentContext > m_xComponentContext;
uno::Reference< util::XMacroExpander > m_xMacroExpander;
@ -55,13 +54,11 @@ class ExpandContentProviderImpl : protected cppu::BaseMutex, public t_impl_helpe
protected:
void check() const;
virtual void SAL_CALL disposing() override;
public:
explicit ExpandContentProviderImpl(
uno::Reference< uno::XComponentContext > const & xComponentContext )
: t_impl_helper( m_aMutex ),
m_xComponentContext( xComponentContext ),
: m_xComponentContext( xComponentContext ),
m_xMacroExpander( util::theMacroExpander::get(xComponentContext) )
{}
@ -83,7 +80,7 @@ void ExpandContentProviderImpl::check() const
{
// xxx todo guard?
// MutexGuard guard( m_mutex );
if (rBHelper.bInDispose || rBHelper.bDisposed)
if (m_bDisposed)
{
throw lang::DisposedException(
"expand content provider instance has "
@ -93,11 +90,6 @@ void ExpandContentProviderImpl::check() const
}
}
void ExpandContentProviderImpl::disposing()
{
}
// XServiceInfo
OUString ExpandContentProviderImpl::getImplementationName()