diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-11-20 07:49:23 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-12-04 13:42:23 +0100 |
commit | 81d31daf68c6fef75735d7dac62fa462e0eed0da (patch) | |
tree | 9b224be9d2259ed3b8d4f268a7a3936c5f5df81b /sfx2/source/view/sfxbasecontroller.cxx | |
parent | 22307d97089805b0f4f961fc8958204c61623d22 (diff) |
Add SolarMutexGuard to infobar api methods
Change-Id: If7fab7df7566b1db770437090115b064b98257c6
Reviewed-on: https://gerrit.libreoffice.org/83255
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2/source/view/sfxbasecontroller.cxx')
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 3898c843b97a..72cd0cd11475 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1480,6 +1480,8 @@ void SAL_CALL SfxBaseController::appendInfobar(const OUString& sId, const OUStri const Sequence<StringPair>& actionButtons, sal_Bool bShowCloseButton) { + SolarMutexGuard aGuard; + if (aInfobarType < static_cast<sal_Int32>(InfobarType::INFO) || aInfobarType > static_cast<sal_Int32>(InfobarType::DANGER)) throw lang::IllegalArgumentException("Undefined InfobarType: " @@ -1513,6 +1515,8 @@ void SAL_CALL SfxBaseController::updateInfobar(const OUString& sId, const OUStri const OUString& sSecondaryMessage, sal_Int32 aInfobarType) { + SolarMutexGuard aGuard; + if (aInfobarType < static_cast<sal_Int32>(InfobarType::INFO) || aInfobarType > static_cast<sal_Int32>(InfobarType::DANGER)) throw lang::IllegalArgumentException("Undefined InfobarType: " @@ -1528,6 +1532,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."); |