From 5d7be7fdbd1f94b2056f8b4adc7722addb9e7fc9 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Wed, 20 Nov 2019 07:49:23 +0100 Subject: Add SolarMutexGuard to infobar api methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If7fab7df7566b1db770437090115b064b98257c6 Reviewed-on: https://gerrit.libreoffice.org/83255 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit 9c9c047f42637c274b246fb4020ed0df4ee39ded) Reviewed-on: https://gerrit.libreoffice.org/83506 Reviewed-by: Xisco FaulĂ­ --- sfx2/source/view/sfxbasecontroller.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sfx2') diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index f4cf6768a8b3..22ec268c9518 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1477,6 +1477,8 @@ void SAL_CALL SfxBaseController::appendInfobar(const OUString& sId, const OUStri const Sequence& actionButtons, sal_Bool bShowCloseButton) { + SolarMutexGuard aGuard; + if (aInfobarType < static_cast(InfobarType::INFO) || aInfobarType > static_cast(InfobarType::DANGER)) throw lang::IllegalArgumentException("Undefined InfobarType: " @@ -1510,6 +1512,8 @@ void SAL_CALL SfxBaseController::updateInfobar(const OUString& sId, const OUStri const OUString& sSecondaryMessage, sal_Int32 aInfobarType) { + SolarMutexGuard aGuard; + if (aInfobarType < static_cast(InfobarType::INFO) || aInfobarType > static_cast(InfobarType::DANGER)) throw lang::IllegalArgumentException("Undefined InfobarType: " @@ -1525,6 +1529,8 @@ void SAL_CALL SfxBaseController::updateInfobar(const OUString& sId, const OUStri void SAL_CALL SfxBaseController::removeInfobar(const OUString& sId) { + SolarMutexGuard aGuard; + SfxViewFrame* pViewFrame = m_pData->m_pViewShell->GetFrame(); if (!pViewFrame->HasInfoBarWithID(sId)) throw css::container::NoSuchElementException("Infobar with ID '" + sId + "' not found."); -- cgit