diff options
author | Noel Power <nopower@novell.com> | 2011-08-12 00:36:51 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-08-16 21:22:42 -0400 |
commit | 4fae740db79d4e7cc97440e2bab8d1ef612d9b51 (patch) | |
tree | c014cedf4204e02dd4946c5d0aafed34e1d13205 /forms/source/misc | |
parent | aadd74040761186497d705ce47cc956c2a3c0d77 (diff) |
Disable fake VBA events for the old-style form controls.
Diffstat (limited to 'forms/source/misc')
-rw-r--r-- | forms/source/misc/InterfaceContainer.cxx | 10 | ||||
-rw-r--r-- | forms/source/misc/property.cxx | 1 |
2 files changed, 10 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() ) diff --git a/forms/source/misc/property.cxx b/forms/source/misc/property.cxx index 0d97609f0eb7..5474c4d730dd 100644 --- a/forms/source/misc/property.cxx +++ b/forms/source/misc/property.cxx @@ -241,6 +241,7 @@ void PropertyInfoService::initialize() ADD_PROP_ASSIGNMENT(DEFAULT_SPIN_VALUE); ADD_PROP_ASSIGNMENT( WRITING_MODE ); ADD_PROP_ASSIGNMENT( CONTEXT_WRITING_MODE ); + ADD_PROP_ASSIGNMENT( GENERATEVBAEVENTS ); // now sort the array by name |