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 /basic | |
parent | a61fdeaa608cc351a4b3fca62a5d8b1218fa6c3a (diff) | |
parent | 8f9b1b049ffa33e76ba4426a8a0e36d3ddc4c15d (diff) |
mib17: merge
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 14 | ||||
-rw-r--r-- | basic/source/runtime/step0.cxx | 19 |
2 files changed, 19 insertions, 14 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 |