From 474f68e38b88ca6495cb7c5cc4038100c2786063 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 7 Mar 2023 13:48:17 +0200 Subject: osl::Mutex->std::mutex in SQLEditView Change-Id: I5110342b54a3674a521d3f9b8452711650b70d0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148438 Tested-by: Jenkins Reviewed-by: Noel Grandin --- dbaccess/source/ui/control/sqledit.cxx | 6 +++--- dbaccess/source/ui/inc/sqledit.hxx | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 49758289e092..86bb65c7b6cb 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -54,7 +54,7 @@ private: virtual void SAL_CALL disposing(css::lang::EventObject const &) override { - osl::MutexGuard g(editor_.m_mutex); + std::unique_lock g(editor_.m_mutex); editor_.m_notifier.clear(); } @@ -145,7 +145,7 @@ void SQLEditView::SetDrawingArea(weld::DrawingArea* pDrawingArea) officecfg::Office::Common::Font::SourceViewFont::get(), css::uno::UNO_QUERY_THROW); { - osl::MutexGuard g(m_mutex); + std::unique_lock g(m_mutex); m_notifier = n; } css::uno::Sequence< OUString > s { "FontHeight", "FontName" }; @@ -157,7 +157,7 @@ SQLEditView::~SQLEditView() { css::uno::Reference< css::beans::XMultiPropertySet > n; { - osl::MutexGuard g(m_mutex); + std::unique_lock g(m_mutex); n = m_notifier; } if (n.is()) { diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx index 0f2ecc8b60eb..d0f8672cc698 100644 --- a/dbaccess/source/ui/inc/sqledit.hxx +++ b/dbaccess/source/ui/inc/sqledit.hxx @@ -25,6 +25,7 @@ #include #include #include +#include namespace com::sun::star::beans { class XMultiPropertySet; } @@ -45,7 +46,7 @@ namespace dbaui rtl::Reference m_pItemPool; rtl::Reference m_listener; - osl::Mutex m_mutex; + std::mutex m_mutex; css::uno::Reference m_notifier; bool m_bInUpdate; -- cgit