summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2010-07-27 11:46:28 +0200
committerMikhail Voytenko <mav@openoffice.org>2010-07-27 11:46:28 +0200
commit2b0352f8093d7b0bdfdb5bb0fa3d5fd41d9f9b4e (patch)
tree634b782a555403d7abf027bdfe41b3480f36551f /basic
parentb33015e5107344b76c87985ba073989ef800efb5 (diff)
mib17: #163102# transport declaration class name for WithEvents
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/step0.cxx19
1 files changed, 12 insertions, 7 deletions
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