summaryrefslogtreecommitdiff
path: root/basic/source/runtime/stdobj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/runtime/stdobj.cxx')
-rw-r--r--basic/source/runtime/stdobj.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index 70384dbf3f04..2a69f445d513 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -72,9 +72,9 @@ struct Methods {
struct StringHashCode
{
- size_t operator()( const String& rStr ) const
+ size_t operator()( const OUString& rStr ) const
{
- return rtl_ustr_hashCode_WithLength( rStr.GetBuffer(), rStr.Len() );
+ return rtl_ustr_hashCode_WithLength( rStr.getStr(), rStr.getLength() );
}
};
@@ -715,21 +715,21 @@ static Methods aMethods[] = {
{ NULL, SbxNULL, -1,NULL,0 }}; // end of the table
-SbiStdObject::SbiStdObject( const String& r, StarBASIC* pb ) : SbxObject( r )
+SbiStdObject::SbiStdObject( const OUString& r, StarBASIC* pb ) : SbxObject( r )
{
// do we have to initialize the hashcodes?
Methods* p = aMethods;
if( !p->nHash )
while( p->nArgs != -1 )
{
- String aName_ = rtl::OUString::createFromAscii( p->pName );
+ OUString aName_ = rtl::OUString::createFromAscii( p->pName );
p->nHash = SbxVariable::MakeHashCode( aName_ );
p += ( p->nArgs & _ARGSMASK ) + 1;
}
// #i92642: Remove default properties
- Remove( rtl::OUString("Name"), SbxCLASS_DONTCARE );
- Remove( rtl::OUString("Parent"), SbxCLASS_DONTCARE );
+ Remove( OUString("Name"), SbxCLASS_DONTCARE );
+ Remove( OUString("Parent"), SbxCLASS_DONTCARE );
SetParent( pb );
@@ -753,7 +753,7 @@ SbiStdObject::~SbiStdObject()
// return NULL without error code, so that a whole chain of
// objects can be asked for the method/property.
-SbxVariable* SbiStdObject::Find( const rtl::OUString& rName, SbxClassType t )
+SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
{
// entered already?
SbxVariable* pVar = SbxObject::Find( rName, t );
@@ -798,7 +798,7 @@ SbxVariable* SbiStdObject::Find( const rtl::OUString& rName, SbxClassType t )
short nType = ( p->nArgs & _TYPEMASK );
if( p->nArgs & _CONST )
nAccess |= SBX_CONST;
- String aName_ = rtl::OUString::createFromAscii( p->pName );
+ OUString aName_ = rtl::OUString::createFromAscii( p->pName );
SbxClassType eCT = SbxCLASS_OBJECT;
if( nType & _PROPERTY )
{
@@ -873,10 +873,12 @@ SbxInfo* SbiStdObject::GetInfo( short nIdx )
for( short i = 0; i < nPar; i++ )
{
p++;
- String aName_ = rtl::OUString::createFromAscii( p->pName );
+ OUString aName_ = rtl::OUString::createFromAscii( p->pName );
sal_uInt16 nFlags_ = ( p->nArgs >> 8 ) & 0x03;
if( p->nArgs & _OPT )
+ {
nFlags_ |= SBX_OPTIONAL;
+ }
pInfo_->AddParam( aName_, p->eType, nFlags_ );
}
return pInfo_;