diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-09-06 10:58:50 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-06 11:01:18 +0100 |
commit | a8f776e0a0b7687abc94ed18e4e63a2c91a47bf4 (patch) | |
tree | 581aa37d1b88370e97e1d9a1bc46fc60cb6018dc /forms | |
parent | ec6905bf855a9226aa0e3143fdbf15bff306cb69 (diff) |
frm::OInterfaceContainer::insertByIndex must not crash for null argument.
Regression introduced with 4fae740db79d4e7cc97440e2bab8d1ef612d9b51;
caused forms/qa/unoapi check to fail.
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/misc/InterfaceContainer.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index af244143f69e..ff5b9c79d86b 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -827,14 +827,6 @@ 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 ); @@ -890,6 +882,14 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper // <----- SYNCHRONIZED // insert faked VBA events? + bool bHandleVbaEvents = false; + try + { + _rxElement->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("GenerateVbaEvents") ) ) >>= bHandleVbaEvents; + } + catch( const Exception& ) + { + } if ( bHandleVbaEvents ) { Reference< XEventAttacherManager > xMgr ( pElementMetaData->xInterface, UNO_QUERY ); |