ucb/source/ucp/image/ucpimage.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit ae80ee2d722ea8a0a0e133488f829b331ca2c195 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sat Dec 25 18:49:13 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Dec 27 07:58:58 2021 +0100 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.gran...@collabora.co.uk> 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(); }