From 50b68c341f2543c4d841fce4d4b3e080f4491e1d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 9 Mar 2023 14:28:47 +0200 Subject: improve loplugin:unnecessarylocking to find more locking we can remove Change-Id: Ief7bc5ec2a1ff31f22a0ad366910b7fcc4725818 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148599 Tested-by: Jenkins Reviewed-by: Noel Grandin --- toolkit/source/controls/unocontrolmodel.cxx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'toolkit') diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 90c61bfcb2a9..5b68774b678e 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -511,8 +511,6 @@ css::uno::Any UnoControlModel::getPropertyDefault( const OUString& rPropertyName // css::io::XPersistObjec OUString UnoControlModel::getServiceName( ) { - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - OSL_FAIL( "ServiceName of UnoControlModel ?!" ); return OUString(); } @@ -1218,17 +1216,12 @@ void UnoControlModel::getFastPropertyValue( css::uno::Any& rValue, sal_Int32 nPr // css::beans::XPropertySet void UnoControlModel::setPropertyValue( const OUString& rPropertyName, const css::uno::Any& rValue ) { - sal_Int32 nPropId = 0; - { - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - nPropId = static_cast(GetPropertyId( rPropertyName )); - DBG_ASSERT( nPropId, "Invalid ID in UnoControlModel::setPropertyValue" ); - } + sal_Int32 nPropId = static_cast(GetPropertyId( rPropertyName )); + DBG_ASSERT( nPropId, "Invalid ID in UnoControlModel::setPropertyValue" ); if( !nPropId ) throw css::beans::UnknownPropertyException(rPropertyName); setFastPropertyValue( nPropId, rValue ); - } // css::beans::XFastPropertySet -- cgit