sw/source/uibase/docvw/srcedtw.cxx | 6 +++--- sw/source/uibase/inc/srcedtw.hxx | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-)
New commits: commit 487389da0c38c9b7306c7e1f1a60d45c236816d3 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Wed Dec 22 20:33:28 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Dec 30 07:43:17 2021 +0100 osl::Mutex->std::mutex in SwSrcEditWindow Change-Id: I752ffe7bd1b21dba2abfec12ccdafa6610233fd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 116879f91e46..ba8bcad6650d 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -217,7 +217,7 @@ private: virtual void SAL_CALL disposing(css::lang::EventObject const &) override { - osl::MutexGuard g(m_Editor.mutex_); + std::unique_lock g(m_Editor.mutex_); m_Editor.m_xNotifier.clear(); } @@ -257,7 +257,7 @@ SwSrcEditWindow::SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView ) officecfg::Office::Common::Font::SourceViewFont::get(), css::uno::UNO_QUERY_THROW); { - osl::MutexGuard g(mutex_); + std::unique_lock g(mutex_); m_xNotifier = n; } n->addPropertiesChangeListener({ "FontHeight", "FontName" }, m_xListener); @@ -272,7 +272,7 @@ void SwSrcEditWindow::dispose() { css::uno::Reference< css::beans::XMultiPropertySet > n; { - osl::MutexGuard g(mutex_); + std::unique_lock g(mutex_); n = m_xNotifier; } if (n.is()) { diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx index 9217bb296a8d..0042060cbaf1 100644 --- a/sw/source/uibase/inc/srcedtw.hxx +++ b/sw/source/uibase/inc/srcedtw.hxx @@ -25,6 +25,7 @@ #include <vcl/idle.hxx> #include <vcl/xtextedt.hxx> +#include <mutex> #include <set> namespace com::sun::star::beans { class XMultiPropertySet; } @@ -70,7 +71,7 @@ private: SwSrcView* m_pSrcView; rtl::Reference< ChangesListener > m_xListener; - osl::Mutex mutex_; + std::mutex mutex_; css::uno::Reference< css::beans::XMultiPropertySet > m_xNotifier;