repl OClearableGuard(SolarMutex) by SolarMutexGuard as none needed clear()

Four site used a Clearbale Guard on the SolarMutex, but non of these site
actually needed to clear the Guard, so SolarMutexGuard fit nicely
This commit is contained in:
Norbert Thiebaud 2010-10-14 22:00:34 -05:00
parent 921136c693
commit 8f1eae5b74
4 changed files with 11 additions and 10 deletions

View file

@ -1294,7 +1294,7 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u
::sal_Bool SAL_CALL OReportDefinition::attachResource( const ::rtl::OUString& /*_rURL*/, const uno::Sequence< beans::PropertyValue >& _aArguments ) throw (uno::RuntimeException)
{
// LLA: we had a deadlock problem in our context, so we get the SolarMutex earlier.
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);

View file

@ -222,6 +222,7 @@ void SAL_CALL OXUndoEnvironment::disposing(const EventObject& e) throw( RuntimeE
//------------------------------------------------------------------------------
void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEvent ) throw(uno::RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_pImpl->m_aMutex );
if ( IsLocked() )
@ -283,7 +284,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
// TODO: this is a potential race condition: two threads here could in theory
// add their undo actions out-of-order
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
SolarMutexGuard aSolarGuard;
ORptUndoPropertyAction* pUndo = NULL;
try
{
@ -328,7 +329,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
//------------------------------------------------------------------------------
void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) throw(uno::RuntimeException)
{
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
// neues Object zum lauschen
@ -389,7 +390,7 @@ void OXUndoEnvironment::implSetModified()
//------------------------------------------------------------------------------
void SAL_CALL OXUndoEnvironment::elementReplaced(const ContainerEvent& evt) throw(uno::RuntimeException)
{
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
Reference< XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY);
@ -405,7 +406,7 @@ void SAL_CALL OXUndoEnvironment::elementReplaced(const ContainerEvent& evt) thro
//------------------------------------------------------------------------------
void SAL_CALL OXUndoEnvironment::elementRemoved(const ContainerEvent& evt) throw(uno::RuntimeException)
{
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
Reference< uno::XInterface > xIface( evt.Element, UNO_QUERY );

View file

@ -646,7 +646,7 @@ void SAL_CALL OFieldExpressionControl::elementInserted(const container::Containe
{
if ( m_bIgnoreEvent )
return;
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
sal_Int32 nGroupPos = 0;
if ( evt.Accessor >>= nGroupPos )
@ -695,7 +695,7 @@ void SAL_CALL OFieldExpressionControl::elementReplaced(const container::Containe
//------------------------------------------------------------------------------
void SAL_CALL OFieldExpressionControl::elementRemoved(const container::ContainerEvent& evt) throw(uno::RuntimeException)
{
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
if ( m_bIgnoreEvent )

View file

@ -418,7 +418,7 @@ void OXReportControllerObserver::RemoveElement(const uno::Reference< uno::XInter
//------------------------------------------------------------------------------
void SAL_CALL OXReportControllerObserver::elementInserted(const container::ContainerEvent& evt) throw(uno::RuntimeException)
{
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
// neues Object zum lauschen
@ -432,7 +432,7 @@ void SAL_CALL OXReportControllerObserver::elementInserted(const container::Conta
//------------------------------------------------------------------------------
void SAL_CALL OXReportControllerObserver::elementReplaced(const container::ContainerEvent& evt) throw(uno::RuntimeException)
{
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
uno::Reference< uno::XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY);
@ -446,7 +446,7 @@ void SAL_CALL OXReportControllerObserver::elementReplaced(const container::Conta
//------------------------------------------------------------------------------
void SAL_CALL OXReportControllerObserver::elementRemoved(const container::ContainerEvent& evt) throw(uno::RuntimeException)
{
::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
uno::Reference< uno::XInterface > xIface( evt.Element, uno::UNO_QUERY );