summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-07 11:48:47 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-07 17:53:04 +0200
commit5a824268dfdd48c00f656b767b48cd12ccbdaabb (patch)
treea25f4afd3ca49cff41fc44559aedea70c82e6c7e /reportdesign
parenta6186a678cd9f67359da885606b3c3983f6bdc74 (diff)
Don't use resettable/clearable guard where plain guard is enough
Also use scope where possible. This allows to limit guard scope at language level; visualises the scope clearly; and helps avoiding errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b. Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41 Reviewed-on: https://gerrit.libreoffice.org/70376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx8
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportControllerObserver.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 695334214042..7aad736fa96d 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -639,7 +639,7 @@ void SAL_CALL OReportDefinition::disposing()
// SYNCHRONIZED --->
{
SolarMutexGuard aSolarGuard;
- ::osl::ResettableMutexGuard aGuard(m_aMutex);
+ osl::MutexGuard aGuard(m_aMutex);
m_pImpl->m_aControllers.clear();
@@ -1732,7 +1732,7 @@ sal_Bool SAL_CALL OReportDefinition::isModified( )
void SAL_CALL OReportDefinition::setModified( sal_Bool _bModified )
{
- ::osl::ResettableMutexGuard aGuard(m_aMutex);
+ osl::ClearableMutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
if ( !m_pImpl->m_bSetModifiedEnabled )
@@ -1773,7 +1773,7 @@ void OReportDefinition::notifyEvent(const OUString& _sEventName)
{
try
{
- ::osl::ResettableMutexGuard aGuard(m_aMutex);
+ osl::ClearableMutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
document::EventObject aEvt(*this, _sEventName);
aGuard.clear();
@@ -1791,7 +1791,7 @@ void SAL_CALL OReportDefinition::notifyDocumentEvent( const OUString& rEventName
{
try
{
- ::osl::ResettableMutexGuard aGuard(m_aMutex);
+ osl::ClearableMutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
document::DocumentEvent aEvt(*this, rEventName, rViewController, rSupplement);
aGuard.clear();
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index cc01968c9dbc..f78f7a08a335 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -432,7 +432,7 @@ inspection::InteractiveSelectionResult SAL_CALL DataProviderHandler::onInteracti
void SAL_CALL DataProviderHandler::actuatingPropertyChanged(const OUString & ActuatingPropertyName, const uno::Any & NewValue, const uno::Any & OldValue, const uno::Reference< inspection::XObjectInspectorUI > & InspectorUI, sal_Bool FirstTimeInit)
{
- ::osl::ClearableMutexGuard aGuard( m_aMutex );
+ osl::MutexGuard aGuard( m_aMutex );
if ( ActuatingPropertyName == PROPERTY_COMMAND )
{
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx
index abcf21bb9771..d388239cb626 100644
--- a/reportdesign/source/ui/report/ReportControllerObserver.cxx
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -143,7 +143,7 @@ public:
// XPropertyChangeListener
void SAL_CALL OXReportControllerObserver::propertyChange(const beans::PropertyChangeEvent& _rEvent)
{
- ::osl::ClearableMutexGuard aGuard( m_pImpl->m_aMutex );
+ osl::MutexGuard aGuard( m_pImpl->m_aMutex );
if ( m_pImpl->m_nLocks != 0 )
return;