summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/statement.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx74
-rw-r--r--dbaccess/source/core/dataaccess/definitioncontainer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx6
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx4
-rw-r--r--dbaccess/source/ui/misc/dbaundomanager.cxx2
6 files changed, 46 insertions, 44 deletions
diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx
index 3bad447db85f..beac6a16c13c 100644
--- a/dbaccess/source/core/api/statement.cxx
+++ b/dbaccess/source/core/api/statement.cxx
@@ -307,7 +307,7 @@ void OStatementBase::clearWarnings()
void OStatementBase::cancel()
{
// no blocking as cancel is typically called from a different thread
- ClearableMutexGuard aCancelGuard(m_aCancelMutex);
+ MutexGuard aCancelGuard(m_aCancelMutex);
if (m_xAggregateAsCancellable.is())
m_xAggregateAsCancellable->cancel();
// else do nothing
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index ad3713a1f43e..3c299261e438 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1804,52 +1804,54 @@ void ODatabaseDocument::disposing()
std::vector< Reference< XInterface > > aKeepAlive;
// SYNCHRONIZED ->
- SolarMutexClearableGuard aGuard;
-
- OSL_ENSURE( m_aControllers.empty(), "ODatabaseDocument::disposing: there still are controllers!" );
- // normally, nobody should explicitly dispose, but only XCloseable::close
- // the document. And upon closing, our controllers are closed, too
-
{
- uno::Reference<uno::XInterface> xUIInterface( m_xUIConfigurationManager );
- aKeepAlive.push_back( xUIInterface );
- }
- m_xUIConfigurationManager = nullptr;
+ SolarMutexGuard aGuard;
- clearObjectContainer( m_xForms );
- clearObjectContainer( m_xReports );
+ OSL_ENSURE(m_aControllers.empty(),
+ "ODatabaseDocument::disposing: there still are controllers!");
+ // normally, nobody should explicitly dispose, but only XCloseable::close
+ // the document. And upon closing, our controllers are closed, too
- // reset the macro mode: in case the our impl struct stays alive (e.g. because our DataSource
- // object still exists), and somebody subsequently re-opens the document, we want to have
- // the security warning, again.
- m_pImpl->resetMacroExecutionMode();
+ {
+ uno::Reference<uno::XInterface> xUIInterface(m_xUIConfigurationManager);
+ aKeepAlive.push_back(xUIInterface);
+ }
+ m_xUIConfigurationManager = nullptr;
- // similar arguing for our ViewMonitor
- m_aViewMonitor.reset();
+ clearObjectContainer(m_xForms);
+ clearObjectContainer(m_xReports);
- // tell our Impl to forget us
- m_pImpl->modelIsDisposing( impl_isInitialized(), ODatabaseModelImpl::ResetModelAccess() );
+ // reset the macro mode: in case the our impl struct stays alive (e.g. because our DataSource
+ // object still exists), and somebody subsequently re-opens the document, we want to have
+ // the security warning, again.
+ m_pImpl->resetMacroExecutionMode();
- // now, at the latest, the controller array should be empty. Controllers are
- // expected to listen for our disposal, and disconnect then
- OSL_ENSURE( m_aControllers.empty(), "ODatabaseDocument::disposing: there still are controllers!" );
- impl_disposeControllerFrames_nothrow();
+ // similar arguing for our ViewMonitor
+ m_aViewMonitor.reset();
- {
- uno::Reference<uno::XInterface> xModuleInterface( m_xModuleManager );
- aKeepAlive.push_back( xModuleInterface );
- }
- m_xModuleManager.clear();
+ // tell our Impl to forget us
+ m_pImpl->modelIsDisposing(impl_isInitialized(), ODatabaseModelImpl::ResetModelAccess());
- {
- uno::Reference<uno::XInterface> xTitleInterface( m_xTitleHelper );
- aKeepAlive.push_back( xTitleInterface );
- }
- m_xTitleHelper.clear();
+ // now, at the latest, the controller array should be empty. Controllers are
+ // expected to listen for our disposal, and disconnect then
+ OSL_ENSURE(m_aControllers.empty(),
+ "ODatabaseDocument::disposing: there still are controllers!");
+ impl_disposeControllerFrames_nothrow();
- m_pImpl.clear();
+ {
+ uno::Reference<uno::XInterface> xModuleInterface(m_xModuleManager);
+ aKeepAlive.push_back(xModuleInterface);
+ }
+ m_xModuleManager.clear();
- aGuard.clear();
+ {
+ uno::Reference<uno::XInterface> xTitleInterface(m_xTitleHelper);
+ aKeepAlive.push_back(xTitleInterface);
+ }
+ m_xTitleHelper.clear();
+
+ m_pImpl.clear();
+ }
// <- SYNCHRONIZED
aKeepAlive.clear();
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 4acaa00fcc52..c099c0fe8e84 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -605,7 +605,7 @@ void ODefinitionContainer::approveNewObject(const OUString& _sName,const Referen
// XPropertyChangeListener
void SAL_CALL ODefinitionContainer::propertyChange( const PropertyChangeEvent& evt )
{
- ClearableMutexGuard aGuard(m_aMutex);
+ MutexGuard aGuard(m_aMutex);
if( evt.PropertyName == PROPERTY_NAME || evt.PropertyName == "Title" )
{
m_bInPropertyChange = true;
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index bcb128145ffe..992eb24e5759 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -565,7 +565,7 @@ void SAL_CALL ODocumentContainer::insertByHierarchicalName( const OUString& _sNa
if ( !xContent.is() )
throw IllegalArgumentException();
- ClearableMutexGuard aGuard(m_aMutex);
+ MutexGuard aGuard(m_aMutex);
Any aContent;
Reference< XNameContainer > xNameContainer(this);
OUString sName;
@@ -589,7 +589,7 @@ void SAL_CALL ODocumentContainer::removeByHierarchicalName( const OUString& _sNa
if ( _sName.isEmpty() )
throw NoSuchElementException(_sName,*this);
- ClearableMutexGuard aGuard(m_aMutex);
+ MutexGuard aGuard(m_aMutex);
Any aContent;
OUString sName;
Reference< XNameContainer > xNameContainer(this);
@@ -606,7 +606,7 @@ void SAL_CALL ODocumentContainer::replaceByHierarchicalName( const OUString& _sN
if ( !xContent.is() )
throw IllegalArgumentException();
- ClearableMutexGuard aGuard(m_aMutex);
+ MutexGuard aGuard(m_aMutex);
Any aContent;
OUString sName;
Reference< XNameContainer > xNameContainer(this);
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index c69d42b2418f..d367b058af44 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -959,7 +959,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
// making it release the own mutex before calling SolarMutex-code is ... difficult, at least.
// So, to be on the same side, we lock the SolarMutex here. Yes, it sucks.
::SolarMutexGuard aSolarGuard;
- ::osl::ClearableMutexGuard aGuard(m_aMutex);
+ osl::MutexGuard aGuard(m_aMutex);
if ( m_bInExecute )
return aRet;
@@ -994,7 +994,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
return onCommandOpenSomething( aCommand.Argument, bActivateObject, Environment );
}
- ::osl::ClearableMutexGuard aGuard(m_aMutex);
+ osl::MutexGuard aGuard(m_aMutex);
if ( m_bInExecute )
return aRet;
diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx
index bff6e03b3609..76f6e7508b06 100644
--- a/dbaccess/source/ui/misc/dbaundomanager.cxx
+++ b/dbaccess/source/ui/misc/dbaundomanager.cxx
@@ -128,7 +128,7 @@ namespace dbaui
virtual ::framework::IMutex& getGuardedMutex() override;
private:
- ::osl::ResettableMutexGuard m_aGuard;
+ osl::ClearableMutexGuard m_aGuard;
OslMutexFacade m_aMutexFacade;
};