summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-04-23 15:58:31 +0000
committerRüdiger Timm <rt@openoffice.org>2003-04-23 15:58:31 +0000
commitd0aee4749831b25c697d1be1115ea416d6f83b01 (patch)
treecc0ebd14752bdc0c7fec8975cf2e66204118412d /basic
parentda132b90d8a79a1958d2cfcf3face8950ab17a38 (diff)
INTEGRATION: CWS uno2 (1.12.6); FILE MERGED
2003/04/08 10:28:17 ab 1.12.6.1: #108496# Check for SbUnoAnyObject in checkUnoStructCopy()
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/step0.cxx37
1 files changed, 21 insertions, 16 deletions
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index d2df1bc449b9..11c9c344f214 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: step0.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: hr $ $Date: 2003-03-18 16:28:38 $
+ * last change: $Author: rt $ $Date: 2003-04-23 16:58:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -193,28 +193,33 @@ void SbiRuntime::StepGET()
inline void checkUnoStructCopy( SbxVariableRef& refVal, SbxVariableRef& refVar )
{
SbxDataType eVarType = refVar->GetType();
- if( eVarType == SbxOBJECT )
+ if( eVarType != SbxOBJECT )
+ return;
+
+ SbxObjectRef xValObj = (SbxObject*)refVal->GetObject();
+ if( xValObj->ISA(SbUnoAnyObject) )
+ return;
+
+ SbxObjectRef xVarObj = (SbxObject*)refVar->GetObject();
+ SbxDataType eValType = refVal->GetType();
+ if( eValType == SbxOBJECT && xVarObj == xValObj )
{
- SbxObjectRef xVarObj = (SbxObject*)refVar->GetObject();
- SbxDataType eValType = refVal->GetType();
- if( eValType == SbxOBJECT && xVarObj == refVal->GetObject() )
+ SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)xVarObj);
+ if( pUnoObj )
{
- SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)xVarObj);
- if( pUnoObj )
+ Any aAny = pUnoObj->getUnoAny();
+ if( aAny.getValueType().getTypeClass() == TypeClass_STRUCT )
{
- Any aAny = pUnoObj->getUnoAny();
- if( aAny.getValueType().getTypeClass() == TypeClass_STRUCT )
- {
- SbUnoObject* pNewUnoObj = new SbUnoObject( pUnoObj->GetName(), aAny );
- // #70324: ClassName uebernehmen
- pNewUnoObj->SetClassName( pUnoObj->GetClassName() );
- refVar->PutObject( pNewUnoObj );
- }
+ SbUnoObject* pNewUnoObj = new SbUnoObject( pUnoObj->GetName(), aAny );
+ // #70324: ClassName uebernehmen
+ pNewUnoObj->SetClassName( pUnoObj->GetClassName() );
+ refVar->PutObject( pNewUnoObj );
}
}
}
}
+
// Ablage von TOS in TOS-1
void SbiRuntime::StepPUT()