diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-25 18:49:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-27 07:58:58 +0100 |
commit | ae80ee2d722ea8a0a0e133488f829b331ca2c195 (patch) | |
tree | 5df804ec5a112349235f7c6b9e0b7066ffcec5de /ucb/source | |
parent | 6c3b3832902157324af49bca5a16cebdf5ba3caf (diff) |
use comphelper::WeakComponentImplHelper in Provider
Change-Id: I60e496c823ab36ee5f9775b0b758617815b85151
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127519
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source')
-rw-r--r-- | ucb/source/ucp/image/ucpimage.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ucb/source/ucp/image/ucpimage.cxx b/ucb/source/ucp/image/ucpimage.cxx index 75bc7404fc0d..478509a716a3 100644 --- a/ucb/source/ucp/image/ucpimage.cxx +++ b/ucb/source/ucp/image/ucpimage.cxx @@ -16,7 +16,7 @@ #include <com/sun/star/ucb/XContentProvider.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uri/UriReferenceFactory.hpp> -#include <cppuhelper/compbase.hxx> +#include <comphelper/compbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <osl/mutex.hxx> #include <rtl/uri.hxx> @@ -36,14 +36,13 @@ namespace { class Provider final: - private osl::Mutex, - public cppu::WeakComponentImplHelper< + public comphelper::WeakComponentImplHelper< css::lang::XServiceInfo, css::ucb::XContentProvider> { public: explicit Provider( css::uno::Reference<css::uno::XComponentContext> const & context): - WeakComponentImplHelper(*static_cast<Mutex *>(this)), context_(context) + context_(context) {} private: @@ -65,7 +64,7 @@ private: { css::uno::Reference<css::uno::XComponentContext> context; { - osl::MutexGuard g(*this); + std::unique_lock g(m_aMutex); context = context_; } if (!context.is()) { @@ -146,7 +145,7 @@ private: Id2->getContentIdentifier()); } - void SAL_CALL disposing() override { + void disposing(std::unique_lock<std::mutex>&) override { context_.clear(); } |