From bfe1aa0e79cd1b849721760e89f254870b3f8000 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 20 Jul 2012 09:54:40 +0100 Subject: XubString->rtl::OUString Change-Id: I584ff580e3c8eee401f07c858ecbd63e5b0bf980 --- basic/inc/basic/sbmod.hxx | 4 +-- basic/inc/basic/sbobjmod.hxx | 10 +++--- basic/inc/basic/sbstar.hxx | 2 +- basic/inc/basic/sbstdobj.hxx | 8 ++--- basic/inc/basic/sbx.hxx | 6 ++-- basic/inc/basic/sbxfac.hxx | 4 +-- basic/inc/basic/sbxobj.hxx | 4 +-- basic/source/classes/sb.cxx | 64 +++++++++++++++++---------------------- basic/source/classes/sbunoobj.cxx | 24 +++++++-------- basic/source/classes/sbxmod.cxx | 14 ++++----- basic/source/inc/sbintern.hxx | 4 +-- basic/source/inc/sbunoobj.hxx | 14 ++++----- basic/source/inc/stdobj.hxx | 2 +- basic/source/runtime/stdobj.cxx | 4 +-- basic/source/runtime/stdobj1.cxx | 13 ++++---- basic/source/sbx/sbxarray.cxx | 2 +- basic/source/sbx/sbxbase.cxx | 10 +++--- basic/source/sbx/sbxcoll.cxx | 2 +- basic/source/sbx/sbxobj.cxx | 4 +-- 19 files changed, 91 insertions(+), 104 deletions(-) (limited to 'basic') diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx index 25d83a126fe6..f98121112a78 100644 --- a/basic/inc/basic/sbmod.hxx +++ b/basic/inc/basic/sbmod.hxx @@ -99,7 +99,7 @@ public: virtual void SetParent( SbxObject* ); virtual void Clear(); - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); virtual const String& GetSource() const; const ::rtl::OUString& GetSource32() const; @@ -164,7 +164,7 @@ public: ~SbClassModuleObject(); // Overridden to support NameAccess etc. - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); virtual void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ); diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx index 1e37280eb44f..d1f1c0f8f066 100644 --- a/basic/inc/basic/sbobjmod.hxx +++ b/basic/inc/basic/sbobjmod.hxx @@ -41,7 +41,7 @@ protected: public: TYPEINFO(); SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible ); - virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); + virtual SbxVariable* Find( const rtl::OUString& rName, SbxClassType t ); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); @@ -68,7 +68,7 @@ public: TYPEINFO(); SbUserFormModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat ); virtual ~SbUserFormModule(); - virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); + virtual SbxVariable* Find( const rtl::OUString& rName, SbxClassType t ); void ResetApiObj( bool bTriggerTerminateEvent = true ); void Unload(); void Load(); @@ -94,11 +94,11 @@ class BASIC_DLLPUBLIC SbUserFormModuleInstance : public SbUserFormModule SbUserFormModule* m_pParentModule; public: - SbUserFormModuleInstance( SbUserFormModule* pParentModule, const String& rName, + SbUserFormModuleInstance( SbUserFormModule* pParentModule, const rtl::OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat ); - virtual sal_Bool IsClass( const String& ) const; - virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); + virtual sal_Bool IsClass( const rtl::OUString& ) const; + virtual SbxVariable* Find( const rtl::OUString& rName, SbxClassType t ); }; diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx index 96a9c39d0198..1b0cd71972c4 100644 --- a/basic/inc/basic/sbstar.hxx +++ b/basic/inc/basic/sbstar.hxx @@ -126,7 +126,7 @@ public: static String GetErrorMsg(); static xub_StrLen GetErl(); - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); virtual sal_Bool Call( const String&, SbxArray* = NULL ); SbxArray* GetModules() { return pModules; } diff --git a/basic/inc/basic/sbstdobj.hxx b/basic/inc/basic/sbstdobj.hxx index 6b2955909304..c9befbec1382 100644 --- a/basic/inc/basic/sbstdobj.hxx +++ b/basic/inc/basic/sbstdobj.hxx @@ -36,7 +36,7 @@ class BASIC_DLLPUBLIC SbStdFactory : public SbxFactory public: SbStdFactory(); - virtual SbxObject* CreateObject( const String& rClassName ); + virtual SbxObject* CreateObject( const rtl::OUString& rClassName ); }; //-------------------- @@ -59,7 +59,7 @@ public: TYPEINFO(); SbStdPicture(); - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); Graphic GetGraphic() const { return aGraphic; } void SetGraphic( const Graphic& rGrf ) { aGraphic = rGrf; } @@ -93,7 +93,7 @@ public: TYPEINFO(); SbStdFont(); - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); void SetBold( sal_Bool bB ) { bBold = bB; } sal_Bool IsBold() const { return bBold; } @@ -131,7 +131,7 @@ public: TYPEINFO(); SbStdClipboard(); - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); }; #endif diff --git a/basic/inc/basic/sbx.hxx b/basic/inc/basic/sbx.hxx index 51e47c76e9f2..04b46de8ad06 100644 --- a/basic/inc/basic/sbx.hxx +++ b/basic/inc/basic/sbx.hxx @@ -88,7 +88,7 @@ public: SbxInfo(); SbxInfo( const String&, sal_uInt32 ); - void AddParam( const String&, SbxDataType, sal_uInt16=SBX_READ ); + void AddParam( const rtl::OUString&, SbxDataType, sal_uInt16=SBX_READ ); const SbxParamInfo* GetParam( sal_uInt16 n ) const; // index starts with 1! const String& GetComment() const { return aComment; } const String& GetHelpFile() const { return aHelpFile; } @@ -182,7 +182,7 @@ public: const String& GetAlias( sal_uInt16 ); void PutAlias( const String&, sal_uInt16 ); SbxVariable* FindUserData( sal_uInt32 nUserData ); - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); // Additional methods for 32-bit indices sal_uInt32 Count32() const; @@ -274,7 +274,7 @@ public: SbxCollection( const SbxCollection& ); SbxCollection& operator=( const SbxCollection& ); virtual SbxVariable* FindUserData( sal_uInt32 nUserData ); - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); virtual void Clear(); }; diff --git a/basic/inc/basic/sbxfac.hxx b/basic/inc/basic/sbxfac.hxx index af73df0e5bfa..e36cbe6a5948 100644 --- a/basic/inc/basic/sbxfac.hxx +++ b/basic/inc/basic/sbxfac.hxx @@ -21,11 +21,11 @@ #define __SBX_SBX_FACTORY_HXX #include +#include #include "basicdllapi.h" class SbxBase; class SbxObject; -class String; class BASIC_DLLPUBLIC SbxFactory { @@ -35,7 +35,7 @@ public: SbxFactory( sal_Bool bLast=sal_False ) { bHandleLast = bLast; } sal_Bool IsHandleLast( void ) { return bHandleLast; } virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); - virtual SbxObject* CreateObject( const String& ); + virtual SbxObject* CreateObject( const rtl::OUString& ); }; #endif diff --git a/basic/inc/basic/sbxobj.hxx b/basic/inc/basic/sbxobj.hxx index 9a0c4c3e59dc..e65f71bbbf49 100644 --- a/basic/inc/basic/sbxobj.hxx +++ b/basic/inc/basic/sbxobj.hxx @@ -56,7 +56,7 @@ public: virtual SbxClassType GetClass() const; virtual void Clear(); - virtual sal_Bool IsClass( const String& ) const; + virtual sal_Bool IsClass( const rtl::OUString& ) const; const String& GetClassName() const { return aClassName; } void SetClassName( const String &rNew ) { aClassName = rNew; } // Default-Property @@ -64,7 +64,7 @@ public: void SetDfltProperty( const String& r ); // Search for an element virtual SbxVariable* FindUserData( sal_uInt32 nUserData ); - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); SbxVariable* FindQualified( const String&, SbxClassType ); // Quick-Call-Interface for Methods virtual sal_Bool Call( const String&, SbxArray* = NULL ); diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 49f35e5f0226..85358089e665 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -404,24 +404,15 @@ SbxBase* SbiFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator ) return NULL; } -SbxObject* SbiFactory::CreateObject( const String& rClass ) +SbxObject* SbiFactory::CreateObject( const rtl::OUString& rClass ) { - if( rClass.EqualsIgnoreCaseAscii( "StarBASIC" ) ) + if( rClass.equalsIgnoreAsciiCase( "StarBASIC" ) ) return new StarBASIC( NULL ); - else - if( rClass.EqualsIgnoreCaseAscii( "StarBASICModule" ) ) - { - String aEmpty; - return new SbModule( aEmpty ); - } - else - if( rClass.EqualsIgnoreCaseAscii( "Collection" ) ) - { - String aCollectionName( RTL_CONSTASCII_USTRINGPARAM("Collection") ); - return new BasicCollection( aCollectionName ); - } - else - if( rClass.EqualsIgnoreCaseAscii( "FileSystemObject" ) ) + else if( rClass.equalsIgnoreAsciiCase( "StarBASICModule" ) ) + return new SbModule( rtl::OUString() ); + else if( rClass.equalsIgnoreAsciiCase( "Collection" ) ) + return new BasicCollection( rtl::OUString("Collection")); + else if( rClass.equalsIgnoreAsciiCase( "FileSystemObject" ) ) { try { @@ -431,7 +422,8 @@ SbxObject* SbiFactory::CreateObject( const String& rClass ) return new SbUnoObject( aServiceName, uno::makeAny( xInterface ) ); } catch(const Exception& ) - {} + { + } } return NULL; @@ -443,7 +435,7 @@ class SbOLEFactory : public SbxFactory { public: virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); - virtual SbxObject* CreateObject( const String& ); + virtual SbxObject* CreateObject( const rtl::OUString& ); }; SbxBase* SbOLEFactory::Create( sal_uInt16, sal_uInt32 ) @@ -454,7 +446,7 @@ SbxBase* SbOLEFactory::Create( sal_uInt16, sal_uInt32 ) SbUnoObject* createOLEObject_Impl( const ::rtl::OUString& aType ); // sbunoobj.cxx -SbxObject* SbOLEFactory::CreateObject( const String& rClassName ) +SbxObject* SbOLEFactory::CreateObject( const rtl::OUString& rClassName ) { SbxObject* pRet = createOLEObject_Impl( rClassName ); return pRet; @@ -468,7 +460,7 @@ class SbFormFactory : public SbxFactory { public: virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); - virtual SbxObject* CreateObject( const String& ); + virtual SbxObject* CreateObject( const rtl::OUString& ); }; SbxBase* SbFormFactory::Create( sal_uInt16, sal_uInt32 ) @@ -477,7 +469,7 @@ SbxBase* SbFormFactory::Create( sal_uInt16, sal_uInt32 ) return NULL; } -SbxObject* SbFormFactory::CreateObject( const String& rClassName ) +SbxObject* SbFormFactory::CreateObject( const rtl::OUString& rClassName ) { if( SbModule* pMod = GetSbData()->pMod ) { @@ -571,7 +563,7 @@ class SbTypeFactory : public SbxFactory { public: virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); - virtual SbxObject* CreateObject( const String& ); + virtual SbxObject* CreateObject( const rtl::OUString& ); }; SbxBase* SbTypeFactory::Create( sal_uInt16, sal_uInt32 ) @@ -580,7 +572,7 @@ SbxBase* SbTypeFactory::Create( sal_uInt16, sal_uInt32 ) return NULL; } -SbxObject* SbTypeFactory::CreateObject( const String& rClassName ) +SbxObject* SbTypeFactory::CreateObject( const rtl::OUString& rClassName ) { SbxObject* pRet = NULL; SbModule* pMod = GetSbData()->pMod; @@ -767,7 +759,7 @@ void SbClassModuleObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType handleProcedureProperties( rBC, rHint ); } -SbxVariable* SbClassModuleObject::Find( const XubString& rName, SbxClassType t ) +SbxVariable* SbClassModuleObject::Find( const rtl::OUString& rName, SbxClassType t ) { SbxVariable* pRes = SbxObject::Find( rName, t ); if( pRes ) @@ -863,7 +855,7 @@ SbxBase* SbClassFactory::Create( sal_uInt16, sal_uInt32 ) return NULL; } -SbxObject* SbClassFactory::CreateObject( const String& rClassName ) +SbxObject* SbClassFactory::CreateObject( const rtl::OUString& rClassName ) { SbxObjectRef xToUseClassModules = xClassModules; @@ -1270,7 +1262,7 @@ void StarBASIC::DeInitAllModules( void ) // method and a module with the given name is found the search continues // for entrypoint "Main". // If this fails again a conventional search over objects is performend. -SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t ) +SbxVariable* StarBASIC::Find( const rtl::OUString& rName, SbxClassType t ) { static String aMainStr( RTL_CONSTASCII_USTRINGPARAM("Main") ); @@ -1282,7 +1274,7 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t ) { if( t == SbxCLASS_DONTCARE || t == SbxCLASS_OBJECT ) { - if( rName.EqualsIgnoreCaseAscii( RTLNAME ) ) + if( rName.equalsIgnoreAsciiCase( RTLNAME ) ) pRes = pRtl; } if( !pRes ) @@ -1901,7 +1893,7 @@ static sal_uInt16 nCountHash = 0, nAddHash, nItemHash, nRemoveHash; SbxInfoRef BasicCollection::xAddInfo = NULL; SbxInfoRef BasicCollection::xItemInfo = NULL; -BasicCollection::BasicCollection( const XubString& rClass ) +BasicCollection::BasicCollection( const rtl::OUString& rClass ) : SbxObject( rClass ) { if( !nCountHash ) @@ -1955,7 +1947,7 @@ void BasicCollection::Initialize() } } -SbxVariable* BasicCollection::Find( const XubString& rName, SbxClassType t ) +SbxVariable* BasicCollection::Find( const rtl::OUString& rName, SbxClassType t ) { SbxVariable* pFind = SbxObject::Find( rName, t ); return pFind; @@ -1973,20 +1965,20 @@ void BasicCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1, sal_Bool bRequestInfo = sal_Bool( nId == SBX_HINT_INFOWANTED ); SbxVariable* pVar = p->GetVar(); SbxArray* pArg = pVar->GetParameters(); - XubString aVarName( pVar->GetName() ); + rtl::OUString aVarName( pVar->GetName() ); if( bRead || bWrite ) { if( pVar->GetHashCode() == nCountHash - && aVarName.EqualsIgnoreCaseAscii( pCountStr ) ) + && aVarName.equalsIgnoreAsciiCaseAscii( pCountStr ) ) pVar->PutLong( xItemArray->Count32() ); else if( pVar->GetHashCode() == nAddHash - && aVarName.EqualsIgnoreCaseAscii( pAddStr ) ) + && aVarName.equalsIgnoreAsciiCaseAscii( pAddStr ) ) CollAdd( pArg ); else if( pVar->GetHashCode() == nItemHash - && aVarName.EqualsIgnoreCaseAscii( pItemStr ) ) + && aVarName.equalsIgnoreAsciiCaseAscii( pItemStr ) ) CollItem( pArg ); else if( pVar->GetHashCode() == nRemoveHash - && aVarName.EqualsIgnoreCaseAscii( pRemoveStr ) ) + && aVarName.equalsIgnoreAsciiCaseAscii( pRemoveStr ) ) CollRemove( pArg ); else SbxObject::SFX_NOTIFY( rCst, rId1, rHint, rId2 ); @@ -1995,10 +1987,10 @@ void BasicCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1, else if ( bRequestInfo ) { if( pVar->GetHashCode() == nAddHash - && aVarName.EqualsIgnoreCaseAscii( pAddStr ) ) + && aVarName.equalsIgnoreAsciiCaseAscii( pAddStr ) ) pVar->SetInfo( xAddInfo ); else if( pVar->GetHashCode() == nItemHash - && aVarName.EqualsIgnoreCaseAscii( pItemStr ) ) + && aVarName.equalsIgnoreAsciiCaseAscii( pItemStr ) ) pVar->SetInfo( xItemInfo ); } } diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 54b0804f9b8a..4a8a8f73a9f1 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2657,7 +2657,7 @@ SbUnoProperty::~SbUnoProperty() {} -SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t ) +SbxVariable* SbUnoObject::Find( const rtl::OUString& rName, SbxClassType t ) { static Reference< XIdlMethod > xDummyMethod; static Property aDummyProp; @@ -2802,9 +2802,9 @@ SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t ) if( !pRes ) { - if( rName.EqualsIgnoreCaseAscii( ID_DBG_SUPPORTEDINTERFACES ) || - rName.EqualsIgnoreCaseAscii( ID_DBG_PROPERTIES ) || - rName.EqualsIgnoreCaseAscii( ID_DBG_METHODS ) ) + if( rName.equalsIgnoreAsciiCase(ID_DBG_SUPPORTEDINTERFACES) || + rName.equalsIgnoreAsciiCase(ID_DBG_PROPERTIES) || + rName.equalsIgnoreAsciiCase(ID_DBG_METHODS) ) { // Create implCreateDbgProperties(); @@ -2949,7 +2949,7 @@ SbxBase* SbUnoFactory::Create( sal_uInt16, sal_uInt32 ) return NULL; } -SbxObject* SbUnoFactory::CreateObject( const String& rClassName ) +SbxObject* SbUnoFactory::CreateObject( const rtl::OUString& rClassName ) { return Impl_CreateUnoStruct( rClassName ); } @@ -3413,10 +3413,8 @@ SbUnoClass* findUnoClass( const ::rtl::OUString& rName ) return pUnoClass; } -SbxVariable* SbUnoClass::Find( const XubString& rName, SbxClassType t ) +SbxVariable* SbUnoClass::Find( const rtl::OUString& rName, SbxClassType ) { - (void)t; - SbxVariable* pRes = SbxObject::Find( rName, SbxCLASS_VARIABLE ); // If nothing were located the submodule isn't known yet @@ -3570,7 +3568,7 @@ SbUnoService* findUnoService( const ::rtl::OUString& rName ) return pSbUnoService; } -SbxVariable* SbUnoService::Find( const String& rName, SbxClassType ) +SbxVariable* SbUnoService::Find( const rtl::OUString& rName, SbxClassType ) { SbxVariable* pRes = SbxObject::Find( rName, SbxCLASS_METHOD ); @@ -4878,7 +4876,7 @@ void SbUnoStructRefObject::initMemberCache() mbMemberCacheInit = true; } -SbxVariable* SbUnoStructRefObject::Find( const String& rName, SbxClassType t ) +SbxVariable* SbUnoStructRefObject::Find( const rtl::OUString& rName, SbxClassType t ) { SbxVariable* pRes = SbxObject::Find( rName, t ); if ( !pRes ) @@ -4903,9 +4901,9 @@ SbxVariable* SbUnoStructRefObject::Find( const String& rName, SbxClassType t ) if( !pRes ) { - if( rName.EqualsIgnoreCaseAscii( ID_DBG_SUPPORTEDINTERFACES ) || - rName.EqualsIgnoreCaseAscii( ID_DBG_PROPERTIES ) || - rName.EqualsIgnoreCaseAscii( ID_DBG_METHODS ) ) + if( rName.equalsIgnoreAsciiCase(ID_DBG_SUPPORTEDINTERFACES) || + rName.equalsIgnoreAsciiCase(ID_DBG_PROPERTIES) || + rName.equalsIgnoreAsciiCase(ID_DBG_METHODS) ) { // Create implCreateDbgProperties(); diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 5a6ad6beeb36..a7b401b00026 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -689,7 +689,7 @@ void SbModule::Clear() } -SbxVariable* SbModule::Find( const XubString& rName, SbxClassType t ) +SbxVariable* SbModule::Find( const rtl::OUString& rName, SbxClassType t ) { // make sure a search in an uninstatiated class module will fail SbxVariable* pRes = SbxObject::Find( rName, t ); @@ -2214,7 +2214,7 @@ SbObjModule::GetObject() return pDocObject; } SbxVariable* -SbObjModule::Find( const XubString& rName, SbxClassType t ) +SbObjModule::Find( const rtl::OUString& rName, SbxClassType t ) { SbxVariable* pVar = NULL; if ( pDocObject) @@ -2568,20 +2568,20 @@ SbUserFormModuleInstance* SbUserFormModule::CreateInstance() } SbUserFormModuleInstance::SbUserFormModuleInstance( SbUserFormModule* pParentModule, - const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat ) + const rtl::OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat ) : SbUserFormModule( rName, mInfo, bIsVBACompat ) , m_pParentModule( pParentModule ) { } -sal_Bool SbUserFormModuleInstance::IsClass( const XubString& rName ) const +sal_Bool SbUserFormModuleInstance::IsClass( const rtl::OUString& rName ) const { sal_Bool bParentNameMatches = m_pParentModule->GetName().EqualsIgnoreCaseAscii( rName ); sal_Bool bRet = bParentNameMatches || SbxObject::IsClass( rName ); return bRet; } -SbxVariable* SbUserFormModuleInstance::Find( const XubString& rName, SbxClassType t ) +SbxVariable* SbUserFormModuleInstance::Find( const rtl::OUString& rName, SbxClassType t ) { SbxVariable* pVar = m_pParentModule->Find( rName, t ); return pVar; @@ -2625,7 +2625,7 @@ void SbUserFormModule::Unload() triggerTerminateEvent(); } // Search method - SbxVariable* pMeth = SbObjModule::Find( String( RTL_CONSTASCII_USTRINGPARAM( "UnloadObject" ) ), SbxCLASS_METHOD ); + SbxVariable* pMeth = SbObjModule::Find( rtl::OUString("UnloadObject"), SbxCLASS_METHOD ); if( pMeth ) { OSL_TRACE("Attempting too run the UnloadObjectMethod"); @@ -2721,7 +2721,7 @@ void SbUserFormModule::InitObject() } SbxVariable* -SbUserFormModule::Find( const XubString& rName, SbxClassType t ) +SbUserFormModule::Find( const rtl::OUString& rName, SbxClassType t ) { if ( !pDocObject && !GetSbData()->bRunInit && GetSbData()->pInst ) InitObject(); diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx index 55e419fcd5e4..3ed8e5f4359f 100644 --- a/basic/source/inc/sbintern.hxx +++ b/basic/source/inc/sbintern.hxx @@ -40,7 +40,7 @@ class SbiFactory : public SbxFactory { public: virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); - virtual SbxObject* CreateObject( const String& ); + virtual SbxObject* CreateObject( const rtl::OUString& ); }; typedef ::std::vector< String > StringVector; @@ -73,7 +73,7 @@ public: void RemoveClassModule( SbModule* pClassModule ); virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); - virtual SbxObject* CreateObject( const String& ); + virtual SbxObject* CreateObject( const rtl::OUString& ); SbModule* FindClass( const String& rClassName ); }; diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index a2f82a45cfcd..eac35fba34c6 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -87,7 +87,7 @@ public: ~SbUnoStructRefObject(); // Find overloaded to support e. g. NameAccess - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); // Force creation of all properties for debugging void createAllProperties( void ) @@ -127,7 +127,7 @@ public: void doIntrospection( void ); // Find overloaded to support e. g. NameAccess - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); // Force creation of all properties for debugging void createAllProperties( void ) @@ -215,7 +215,7 @@ class SbUnoFactory : public SbxFactory { public: virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); - virtual SbxObject* CreateObject( const String& ); + virtual SbxObject* CreateObject( const rtl::OUString& ); }; // wrapper for an uno-class @@ -234,7 +234,7 @@ public: {} - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass >& getUnoClass( void ) { return m_xClass; } @@ -263,7 +263,7 @@ public: , m_bNeedsInit( true ) {} - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ); }; @@ -387,8 +387,8 @@ class BasicCollection : public SbxObject public: TYPEINFO(); - BasicCollection( const String& rClassname ); - virtual SbxVariable* Find( const String&, SbxClassType ); + BasicCollection( const rtl::OUString& rClassname ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); virtual void Clear(); }; diff --git a/basic/source/inc/stdobj.hxx b/basic/source/inc/stdobj.hxx index f5991f37a499..324cdf242a86 100644 --- a/basic/source/inc/stdobj.hxx +++ b/basic/source/inc/stdobj.hxx @@ -36,7 +36,7 @@ class SbiStdObject : public SbxObject const SfxHint& rHint, const TypeId& rHintType ); public: SbiStdObject( const String&, StarBASIC* ); - virtual SbxVariable* Find( const String&, SbxClassType ); + virtual SbxVariable* Find( const rtl::OUString&, SbxClassType ); virtual void SetModified( sal_Bool ); }; diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index f96c48d7604a..1b3cd81d366f 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -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 String& rName, SbxClassType t ) +SbxVariable* SbiStdObject::Find( const rtl::OUString& rName, SbxClassType t ) { // entered already? SbxVariable* pVar = SbxObject::Find( rName, t ); @@ -776,7 +776,7 @@ SbxVariable* SbiStdObject::Find( const String& rName, SbxClassType t ) { if( ( p->nArgs & nSrchMask ) && ( p->nHash == nHash_ ) - && ( rName.EqualsIgnoreCaseAscii( p->pName ) ) ) + && ( rName.equalsIgnoreAsciiCaseAscii( p->pName ) ) ) { SbiInstance* pInst = GetSbData()->pInst; bFound = sal_True; diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx index 816c4eb9ff46..0cd55efb3a6f 100644 --- a/basic/source/runtime/stdobj1.cxx +++ b/basic/source/runtime/stdobj1.cxx @@ -46,12 +46,11 @@ SbStdFactory::SbStdFactory() { } -SbxObject* SbStdFactory::CreateObject( const String& rClassName ) +SbxObject* SbStdFactory::CreateObject( const rtl::OUString& rClassName ) { - if( rClassName.EqualsIgnoreCaseAscii( String( RTL_CONSTASCII_USTRINGPARAM("Picture") ) ) ) + if( rClassName.equalsIgnoreAsciiCase("Picture") ) return new SbStdPicture; - else - if( rClassName.EqualsIgnoreCaseAscii( String( RTL_CONSTASCII_USTRINGPARAM("Font") ) ) ) + else if( rClassName.equalsIgnoreAsciiCase("Font") ) return new SbStdFont; else return NULL; @@ -135,7 +134,7 @@ SbStdPicture::~SbStdPicture() } -SbxVariable* SbStdPicture::Find( const String& rName, SbxClassType t ) +SbxVariable* SbStdPicture::Find( const rtl::OUString& rName, SbxClassType t ) { // entered already? return SbxObject::Find( rName, t ); @@ -258,7 +257,7 @@ SbStdFont::~SbStdFont() } -SbxVariable* SbStdFont::Find( const String& rName, SbxClassType t ) +SbxVariable* SbStdFont::Find( const rtl::OUString& rName, SbxClassType t ) { return SbxObject::Find( rName, t ); } @@ -427,7 +426,7 @@ SbStdClipboard::~SbStdClipboard() } -SbxVariable* SbStdClipboard::Find( const String& rName, SbxClassType t ) +SbxVariable* SbStdClipboard::Find( const rtl::OUString& rName, SbxClassType t ) { return SbxObject::Find( rName, t ); } diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index ab5cb0fb7b09..e1725a893fd2 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -441,7 +441,7 @@ SbxVariable* SbxArray::FindUserData( sal_uInt32 nData ) // Search of an element by his name and type. If an element is an object, // it will also be scanned.. -SbxVariable* SbxArray::Find( const XubString& rName, SbxClassType t ) +SbxVariable* SbxArray::Find( const rtl::OUString& rName, SbxClassType t ) { SbxVariable* p = NULL; sal_uInt32 nCount = pData->size(); diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx index 1b0850b70117..0b10ffa7159c 100644 --- a/basic/source/sbx/sbxbase.cxx +++ b/basic/source/sbx/sbxbase.cxx @@ -171,7 +171,7 @@ SbxBase* SbxBase::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator ) if( nSbxId == 0x65 ) // Dialog Id return new SbxVariable; - XubString aEmptyStr; + rtl::OUString aEmptyStr; if( nCreator == SBXCR_SBX ) switch( nSbxId ) { @@ -342,7 +342,7 @@ SbxBase* SbxFactory::Create( sal_uInt16, sal_uInt32 ) return NULL; } -SbxObject* SbxFactory::CreateObject( const XubString& ) +SbxObject* SbxFactory::CreateObject( const rtl::OUString& ) { return NULL; } @@ -352,8 +352,7 @@ SbxObject* SbxFactory::CreateObject( const XubString& ) SbxInfo::~SbxInfo() {} -void SbxInfo::AddParam - ( const XubString& rName, SbxDataType eType, sal_uInt16 nFlags ) +void SbxInfo::AddParam(const rtl::OUString& rName, SbxDataType eType, sal_uInt16 nFlags) { aParams.push_back(new SbxParamInfo(rName, eType, nFlags)); } @@ -377,10 +376,9 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer ) rStrm >> nHelpId >> nParam; while( nParam-- ) { - XubString aName; sal_uInt16 nType, nFlags; sal_uInt32 nUserData = 0; - aName = read_lenPrefixed_uInt8s_ToOUString(rStrm, + rtl::OUString aName = read_lenPrefixed_uInt8s_ToOUString(rStrm, RTL_TEXTENCODING_ASCII_US); rStrm >> nType >> nFlags; if( nVer > 1 ) diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx index 0abc6209e315..eda0078a9511 100644 --- a/basic/source/sbx/sbxcoll.cxx +++ b/basic/source/sbx/sbxcoll.cxx @@ -99,7 +99,7 @@ SbxVariable* SbxCollection::FindUserData( sal_uInt32 nData ) return SbxObject::FindUserData( nData ); } -SbxVariable* SbxCollection::Find( const XubString& rName, SbxClassType t ) +SbxVariable* SbxCollection::Find( const rtl::OUString& rName, SbxClassType t ) { if( GetParameters() ) { diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 40b2d0ac089d..2e3e7c991573 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -163,7 +163,7 @@ void SbxObject::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, } } -sal_Bool SbxObject::IsClass( const XubString& rName ) const +sal_Bool SbxObject::IsClass( const rtl::OUString& rName ) const { return sal_Bool( aClassName.EqualsIgnoreCaseAscii( rName ) ); } @@ -199,7 +199,7 @@ SbxVariable* SbxObject::FindUserData( sal_uInt32 nData ) return pRes; } -SbxVariable* SbxObject::Find( const XubString& rName, SbxClassType t ) +SbxVariable* SbxObject::Find( const rtl::OUString& rName, SbxClassType t ) { #ifdef DBG_UTIL static sal_uInt16 nLvl = 0; -- cgit