diff options
author | Andreas Bregas <ab@openoffice.org> | 2010-07-27 12:20:29 +0200 |
---|---|---|
committer | Andreas Bregas <ab@openoffice.org> | 2010-07-27 12:20:29 +0200 |
commit | dafb6e283e4534633c1c55f7f6effa40b0853bb7 (patch) | |
tree | 728265cea954c4de97205f8caa3958df8c6feca3 | |
parent | a61fdeaa608cc351a4b3fca62a5d8b1218fa6c3a (diff) | |
parent | 8f9b1b049ffa33e76ba4426a8a0e36d3ddc4c15d (diff) |
mib17: merge
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 14 | ||||
-rw-r--r-- | basic/source/runtime/step0.cxx | 19 | ||||
-rwxr-xr-x | vbahelper/inc/vbahelper/vbaeventshelperbase.hxx | 3 | ||||
-rwxr-xr-x | vbahelper/source/vbahelper/vbaeventshelperbase.cxx | 13 |
4 files changed, 20 insertions, 29 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 1dbf8e4763..646d5e3ba7 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -121,16 +121,16 @@ class DocObjectWrapper : public DocObjectWrapper_BASE public: DocObjectWrapper( SbModule* pMod ); - ~DocObjectWrapper(); + virtual ~DocObjectWrapper(); virtual void SAL_CALL acquire() throw(); virtual void SAL_CALL release() throw(); - virtual Sequence< sal_Int8 > SAL_CALL getImplementationId() - throw ( com::sun::star::uno::RuntimeException ) + virtual Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (RuntimeException) { + if( !m_xAggregateTypeProv.is() ) + throw RuntimeException(); return m_xAggregateTypeProv->getImplementationId(); - } virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (RuntimeException); @@ -202,7 +202,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pV } } -void SAL_CALL +void SAL_CALL DocObjectWrapper::acquire() throw () { osl_incrementInterlockedCount( &m_refCount ); @@ -220,8 +220,8 @@ DocObjectWrapper::release() throw () OSL_TRACE("DocObjectWrapper::release(%s) 0x%x refcount is now %d", rtl::OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount ); } -DocObjectWrapper::~DocObjectWrapper() -{ +DocObjectWrapper::~DocObjectWrapper() +{ } Sequence< Type > SAL_CALL DocObjectWrapper::getTypes() diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index e3f4db74c3..112c88bd3b 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -532,9 +532,10 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b // Handle withevents BOOL bWithEvents = refVar->IsSet( SBX_WITH_EVENTS ); - Reference< XInterface > xComListener; - if( bWithEvents ) + if ( bWithEvents ) { + Reference< XInterface > xComListener; + SbxBase* pObj = refVal->GetObject(); SbUnoObject* pUnoObj = (pObj != NULL) ? PTR_CAST(SbUnoObject,pObj) : NULL; if( pUnoObj != NULL ) @@ -545,13 +546,17 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b ::rtl::OUString aPrefix = refVar->GetName(); SbxObjectRef xScopeObj = refVar->GetParent(); xComListener = createComListener( aControlAny, aVBAType, aPrefix, xScopeObj ); - } - } - *refVar = *refVal; + refVal->SetDeclareClassName( aDeclareClassName ); + refVal->SetComListener( xComListener ); // Hold reference + } - if( bWithEvents ) - refVar->SetComListener( xComListener ); // Hold reference + *refVar = *refVal; + } + else + { + *refVar = *refVal; + } // lhs is a property who's value is currently (Empty e.g. no broadcast yet) // in this case if there is a default prop involved the value of the diff --git a/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx b/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx index f501b84672..b0dd184c1a 100755 --- a/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx +++ b/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx @@ -52,8 +52,6 @@ public: virtual ~VbaEventsHelperBase(); // XVBAEventProcessor - virtual void SAL_CALL setIgnoreEvents( sal_Bool bIgnoreEvents ) throw (css::uno::RuntimeException); - virtual sal_Bool SAL_CALL getIgnoreEvents() throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL hasVbaEventHandler( sal_Int32 nEventId, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); virtual void SAL_CALL processVbaEvent( sal_Int32 nEventId, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException, css::script::provider::ScriptFrameworkErrorException, css::util::VetoException, css::uno::RuntimeException); @@ -156,7 +154,6 @@ private: typedef ::std::map< sal_Int32, EventHandlerInfo > EventHandlerMap; EventHandlerMap maEvents; - bool mbIgnoreEvents; bool mbDisposed; }; diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx index edfe9e54c8..ee6eccbdd6 100755 --- a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx +++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx @@ -35,7 +35,6 @@ using namespace ::ooo::vba; VbaEventsHelperBase::VbaEventsHelperBase( const uno::Sequence< uno::Any >& rArgs, const uno::Reference< uno::XComponentContext >& /*xContext*/ ) : mpShell( 0 ), - mbIgnoreEvents( false ), mbDisposed( false ) { try @@ -57,16 +56,6 @@ VbaEventsHelperBase::~VbaEventsHelperBase() stopListening(); } -void SAL_CALL VbaEventsHelperBase::setIgnoreEvents( sal_Bool bIgnoreEvents ) throw (uno::RuntimeException) -{ - mbIgnoreEvents = bIgnoreEvents; -} - -sal_Bool SAL_CALL VbaEventsHelperBase::getIgnoreEvents() throw (uno::RuntimeException) -{ - return mbIgnoreEvents; -} - sal_Bool SAL_CALL VbaEventsHelperBase::hasVbaEventHandler( sal_Int32 nEventId, const uno::Sequence< uno::Any >& rArgs ) throw (lang::IllegalArgumentException, uno::RuntimeException) { @@ -87,7 +76,7 @@ void SAL_CALL VbaEventsHelperBase::processVbaEvent( sal_Int32 nEventId, const un /* bEnabled will track if event processing is enabled. Every event handler may disable handling of other events. */ - bool bEnabled = !mbIgnoreEvents; + bool bEnabled = true; /* bCancel will contain the current Cancel value. It is possible that multiple events will try to modify the Cancel value. Every event |