Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Found a regression from a recent "Disable fake VBA events for the old-style form controls" commit that causes the forms/qa/unoapi check to fail. Attached patch fixes it.

-Stephan
From 9bea29af5a3fd86031e28bb8b4ca3f445f3eca96 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 6 Sep 2011 10:58:50 +0200
Subject: [PATCH] frm::OInterfaceContainer::insertByIndex must not crash for
 null argument.

Regression introduced with 4fae740db79d4e7cc97440e2bab8d1ef612d9b51;
caused forms/qa/unoapi check to fail.
---
 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 af24414..ff5b9c7 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 );
-- 
1.7.6


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.