summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-04-21 10:05:39 +0200
committersb <sb@openoffice.org>2010-04-21 10:05:39 +0200
commit0dbdeb5cc3174f2fc404cec504012e43100194e1 (patch)
treea0821120fbbc2bb18f74cd956f55a4c05dc0b379 /forms
parent834486c8e1eeee1c2616e9f6f64c60c7a12a3c62 (diff)
sb120: #i109916# prevent further frm::OInterfaceContainer::implInsert deadlocks (patch by fs)
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/DatabaseForm.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 5f3f04d45618..154ed4b00272 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -2403,6 +2403,7 @@ void ODatabaseForm::_propertyChanged(const PropertyChangeEvent& evt) throw( Runt
//------------------------------------------------------------------------------
void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException)
{
+ // SYNCHRONIZED ----->
::osl::ResettableMutexGuard aGuard(m_aMutex);
Reference<XForm> xParentForm(getParent(), UNO_QUERY);
@@ -2447,14 +2448,15 @@ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com
}
}
+ Reference< XPropertySet > xAggregateProperties( m_xAggregateSet );
+ aGuard.clear();
+ // <----- SYNCHRONIZED
+
Reference< XConnection > xOuterConnection;
sal_Bool bIsEmbedded = ::dbtools::isEmbeddedInDatabase( Parent, xOuterConnection );
- // clear the guard before setting property values, because of the notifications
- // which are triggered there
- aGuard.clear();
if ( bIsEmbedded )
- m_xAggregateSet->setPropertyValue( PROPERTY_DATASOURCE, makeAny( ::rtl::OUString() ) );
+ xAggregateProperties->setPropertyValue( PROPERTY_DATASOURCE, makeAny( ::rtl::OUString() ) );
}
//==============================================================================