frm::OInterfaceContainer::insertByIndex must not crash for null argument.
Regression introduced with 4fae740db79d4e7cc97440e2bab8d1ef612d9b51; caused forms/qa/unoapi check to fail.
This commit is contained in:
committed by
Caolán McNamara
parent
ec6905bf85
commit
a8f776e0a0
@@ -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 );
|
||||
|
Reference in New Issue
Block a user