summaryrefslogtreecommitdiff
path: root/automation/source/testtool
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-12-10 16:13:54 +0000
committerRüdiger Timm <rt@openoffice.org>2004-12-10 16:13:54 +0000
commitb07fa35acdcbee19be2006d5d5f3143a32859902 (patch)
treeebaf26589d9995d3f0194bae5bf5a3b6ab9ebbfc /automation/source/testtool
parentbb3c3f9c3cf4f22c2a0cc3252efb6b9d3b094872 (diff)
INTEGRATION: CWS gh9 (1.3.24); FILE MERGED
2004/11/22 13:16:46 gh 1.3.24.1: #i37486#fix transfering of objects as ULong OR String
Diffstat (limited to 'automation/source/testtool')
-rw-r--r--automation/source/testtool/cmdstrm.cxx48
1 files changed, 40 insertions, 8 deletions
diff --git a/automation/source/testtool/cmdstrm.cxx b/automation/source/testtool/cmdstrm.cxx
index a180ff7a3f66..8d3ca3ffe328 100644
--- a/automation/source/testtool/cmdstrm.cxx
+++ b/automation/source/testtool/cmdstrm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cmdstrm.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: obo $ $Date: 2004-07-06 12:07:12 $
+ * last change: $Author: rt $ $Date: 2004-12-10 17:13:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -243,13 +243,45 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, BOOL IsKeyString )
else
SbxBase::SetError( SbxERR_WRONG_ARGS );
break;
- case SbxOBJECT: // auer bei Umschalten einer TabPage
- if ( nParams & PARAM_ULONG_1 )
- SbxBase::SetError( SbxERR_WRONG_ARGS );
- else
+ case SbxOBJECT: // whenever a control is passed. TabPage, MenuBar
{
- nParams |= PARAM_ULONG_1;
- nLNr1 = rPar->Get( i )->GetULong();
+ SbxProperty *pMember;
+ if ( rPar->Get( i )->ISA( SbxObject ) && ( pMember = ((SbxObject*)rPar->Get( i ))->GetDfltProperty() ) )
+ {
+ if ( pMember->GetType() == SbxSTRING )
+ {
+ if ( nParams & PARAM_STR_1 )
+ if ( nParams & PARAM_STR_2 )
+ SbxBase::SetError( SbxERR_WRONG_ARGS );
+ else
+ {
+ nParams |= PARAM_STR_2;
+ aString2 = pMember->GetString();
+ }
+ else
+ {
+ nParams |= PARAM_STR_1;
+ aString1 = pMember->GetString();
+ }
+ break;
+ }
+ else if ( pMember->GetType() == SbxULONG )
+ {
+ if ( nParams & PARAM_ULONG_1 )
+ SbxBase::SetError( SbxERR_WRONG_ARGS );
+ else
+ {
+ nParams |= PARAM_ULONG_1;
+ nLNr1 = pMember->GetULong();
+ }
+ }
+ else
+ SbxBase::SetError( SbxERR_NAMED_NOT_FOUND );
+ }
+ else
+ {
+ SbxBase::SetError( SbxERR_NAMED_NOT_FOUND );
+ }
}
break;
case SbxSTRING: