summaryrefslogtreecommitdiffstats
path: root/forms/source/misc/InterfaceContainer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/misc/InterfaceContainer.cxx')
-rw-r--r--forms/source/misc/InterfaceContainer.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index de178b800dd3..1301c08c255d 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -828,6 +828,14 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper
sal_Bool _bEvents, ElementDescription* _pApprovalResult, sal_Bool _bFire ) throw( IllegalArgumentException )
{
const bool bHandleEvents = _bEvents && m_xEventAttacher.is();
+ bool bHandleVbaEvents = false;
+ try
+ {
+ _rxElement->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("GenerateVbaEvents") ) ) >>= bHandleVbaEvents;
+ }
+ catch( const Exception& )
+ {
+ }
// SYNCHRONIZED ----->
::osl::ClearableMutexGuard aGuard( m_rMutex );
@@ -883,7 +891,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper
// <----- SYNCHRONIZED
// insert faked VBA events?
- if ( bHandleEvents )
+ if ( bHandleVbaEvents )
{
Reference< XEventAttacherManager > xMgr ( pElementMetaData->xInterface, UNO_QUERY );
if ( xMgr.is() )