diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2010-07-27 11:46:28 +0200 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2010-07-27 11:46:28 +0200 |
commit | 521b922314728107ea4c63dde76a1f5afe0b0855 (patch) | |
tree | 39e3a36e50c77593cf186676ba52735e9327cf3e /basic | |
parent | a11c345f88392632016ca0d4dd1e21188dae9e6c (diff) |
mib17: #163102# transport declaration class name for WithEvents
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/step0.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index bdbb22678bf3..29965c7e9da5 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 |