INTEGRATION: CWS ab13fixes (1.14.14); FILE MERGED
2005/01/20 16:50:34 ab 1.14.14.2: #111897# SbiRuntime::StepParam(): Adapted DefaultId handling to UserData usage for ParamArray 2005/01/17 16:59:13 ab 1.14.14.1: #118116# SbiRuntime::CheckArray() extended to collection objects
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: step2.cxx,v $
|
||||
*
|
||||
* $Revision: 1.14 $
|
||||
* $Revision: 1.15 $
|
||||
*
|
||||
* last change: $Author: rt $ $Date: 2004-11-15 16:38:03 $
|
||||
* last change: $Author: rt $ $Date: 2005-01-28 16:10:01 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -462,7 +462,9 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
|
||||
{
|
||||
// Ist es ein Uno-Objekt?
|
||||
SbxBaseRef pObj = (SbxBase*)pElem->GetObject();
|
||||
if( pObj && pObj->ISA(SbUnoObject) )
|
||||
if( pObj )
|
||||
{
|
||||
if( pObj->ISA(SbUnoObject) )
|
||||
{
|
||||
SbUnoObject* pUnoObj = (SbUnoObject*)(SbxBase*)pObj;
|
||||
Any aAny = pUnoObj->getUnoAny();
|
||||
@@ -516,12 +518,19 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// #42940, 0.Parameter zu NULL setzen, damit sich Var nicht selbst haelt
|
||||
if( pPar )
|
||||
pPar->Put( NULL, 0 );
|
||||
}
|
||||
else if( pObj->ISA(BasicCollection) )
|
||||
{
|
||||
BasicCollection* pCol = (BasicCollection*)(SbxBase*)pObj;
|
||||
pElem = new SbxVariable( SbxVARIANT );
|
||||
pPar->Put( pElem, 0 );
|
||||
pCol->CollItem( pPar );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return pElem;
|
||||
}
|
||||
@@ -617,9 +626,10 @@ void SbiRuntime::StepPARAM( USHORT nOp1, USHORT nOp2 )
|
||||
if( pParam && ( (pParam->nFlags & SBX_OPTIONAL) != 0 ) )
|
||||
{
|
||||
// Default value?
|
||||
if( pParam->nUserData > 0 )
|
||||
USHORT nDefaultId = (pParam->nUserData & 0xffff );
|
||||
if( nDefaultId > 0 )
|
||||
{
|
||||
String aDefaultStr = pImg->GetString( pParam->nUserData );
|
||||
String aDefaultStr = pImg->GetString( nDefaultId );
|
||||
p = new SbxVariable();
|
||||
p->PutString( aDefaultStr );
|
||||
refParams->Put( p, i );
|
||||
|
Reference in New Issue
Block a user