diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-11-19 14:00:57 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-11-20 02:27:22 +0100 |
commit | cdae2f16ef9da75c1b3f9cc3f8abc3a180f324d1 (patch) | |
tree | 3c7bc03cd63a826521af5806deb6b48ab6068a39 /sfx2/source/sidebar/Theme.cxx | |
parent | 20ef6c22268b04eef11834292f42d6d831ab31a2 (diff) |
fix tdf#138335 guard sidebar uno methods with SolarMutex
Wasn't threadsafe before; using vcl/gui code, so we need the
SolarMutex.
Change-Id: I3d4407f095837d03ad492fcdf9a08746cf911d25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106169
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sfx2/source/sidebar/Theme.cxx')
-rw-r--r-- | sfx2/source/sidebar/Theme.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index 361a77414a8e..66294a5cd9a3 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -256,6 +256,8 @@ void Theme::UpdateTheme() void SAL_CALL Theme::disposing() { + SolarMutexGuard aGuard; + ChangeListeners aListeners; aListeners.swap(maChangeListeners); @@ -290,6 +292,8 @@ void SAL_CALL Theme::setPropertyValue ( const OUString& rsPropertyName, const css::uno::Any& rValue) { + SolarMutexGuard aGuard; + PropertyNameToIdMap::const_iterator iId (maPropertyNameToIdMap.find(rsPropertyName)); if (iId == maPropertyNameToIdMap.end()) throw beans::UnknownPropertyException(rsPropertyName); @@ -332,6 +336,8 @@ void SAL_CALL Theme::setPropertyValue ( Any SAL_CALL Theme::getPropertyValue ( const OUString& rsPropertyName) { + SolarMutexGuard aGuard; + PropertyNameToIdMap::const_iterator iId (maPropertyNameToIdMap.find(rsPropertyName)); if (iId == maPropertyNameToIdMap.end()) throw beans::UnknownPropertyException(rsPropertyName); @@ -349,6 +355,8 @@ void SAL_CALL Theme::addPropertyChangeListener( const OUString& rsPropertyName, const css::uno::Reference<css::beans::XPropertyChangeListener>& rxListener) { + SolarMutexGuard aGuard; + ThemeItem eItem (AnyItem_); if (rsPropertyName.getLength() > 0) { @@ -371,6 +379,8 @@ void SAL_CALL Theme::removePropertyChangeListener( const OUString& rsPropertyName, const css::uno::Reference<css::beans::XPropertyChangeListener>& rxListener) { + SolarMutexGuard aGuard; + ThemeItem eItem (AnyItem_); if (rsPropertyName.getLength() > 0) { @@ -403,6 +413,8 @@ void SAL_CALL Theme::addVetoableChangeListener( const OUString& rsPropertyName, const css::uno::Reference<css::beans::XVetoableChangeListener>& rxListener) { + SolarMutexGuard aGuard; + ThemeItem eItem (AnyItem_); if (rsPropertyName.getLength() > 0) { @@ -425,6 +437,8 @@ void SAL_CALL Theme::removeVetoableChangeListener( const OUString& rsPropertyName, const css::uno::Reference<css::beans::XVetoableChangeListener>& rxListener) { + SolarMutexGuard aGuard; + ThemeItem eItem (AnyItem_); if (rsPropertyName.getLength() > 0) { @@ -454,6 +468,8 @@ void SAL_CALL Theme::removeVetoableChangeListener( css::uno::Sequence<css::beans::Property> SAL_CALL Theme::getProperties() { + SolarMutexGuard aGuard; + ::std::vector<beans::Property> aProperties; sal_Int32 const nEnd(End_); @@ -479,6 +495,8 @@ css::uno::Sequence<css::beans::Property> SAL_CALL Theme::getProperties() beans::Property SAL_CALL Theme::getPropertyByName (const OUString& rsPropertyName) { + SolarMutexGuard aGuard; + PropertyNameToIdMap::const_iterator iId (maPropertyNameToIdMap.find(rsPropertyName)); if (iId == maPropertyNameToIdMap.end()) throw beans::UnknownPropertyException(rsPropertyName); @@ -498,6 +516,8 @@ beans::Property SAL_CALL Theme::getPropertyByName (const OUString& rsPropertyNam sal_Bool SAL_CALL Theme::hasPropertyByName (const OUString& rsPropertyName) { + SolarMutexGuard aGuard; + PropertyNameToIdMap::const_iterator iId (maPropertyNameToIdMap.find(rsPropertyName)); if (iId == maPropertyNameToIdMap.end()) return false; |