diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-03 14:03:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-11-05 08:44:19 +0200 |
commit | 705c48d32eec0aa5180e60ca157daca4b154e4a3 (patch) | |
tree | 97f43496f4b429a2b8d03b1e71cb2a1c33142a15 /basic | |
parent | b7d8a58ff2698ffc6e22943f64aa97c5ea253bd9 (diff) |
fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure
gained optimised handling for static char constants.
Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/errobject.cxx | 3 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 28 |
3 files changed, 11 insertions, 22 deletions
diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx index d5843fe634c9..64f88a2815a8 100644 --- a/basic/source/classes/errobject.cxx +++ b/basic/source/classes/errobject.cxx @@ -156,8 +156,7 @@ ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any OUString SAL_CALL ErrObject::getDefaultPropertyName( ) throw (uno::RuntimeException, std::exception) { - static OUString sDfltPropName( "Number" ); - return sDfltPropName; + return OUString( "Number" ); } void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 0ff639372491..13bc3dc47a3e 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4242,7 +4242,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) (void)pBasic; (void)bWrite; - static OUString aTypeTypeString( "type" ); + static const char aTypeTypeString[] = "type"; // 2 parameters needed if ( rPar.Count() != 3 ) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 351508c6490e..7d4ae675562b 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -732,9 +732,7 @@ SbxVariable* SbModule::Find( const OUString& rName, SbxClassType t ) const OUString& SbModule::GetSource() const { - static OUString aRetStr; - aRetStr = aOUSource; - return aRetStr; + return aOUSource; } // Parent and BASIC are one! @@ -1000,29 +998,25 @@ static void SendHint( SbxObject* pObj, sal_uIntPtr nId, SbMethod* p ) void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic ) { // delete the return value of CreateUnoService - static OUString aName("CreateUnoService"); - SbxVariable* pVar = pBasic->GetRtl()->Find( aName, SbxCLASS_METHOD ); + SbxVariable* pVar = pBasic->GetRtl()->Find( OUString("CreateUnoService"), SbxCLASS_METHOD ); if( pVar ) { pVar->SbxValue::Clear(); } // delete the return value of CreateUnoDialog - static OUString aName2("CreateUnoDialog"); - pVar = pBasic->GetRtl()->Find( aName2, SbxCLASS_METHOD ); + pVar = pBasic->GetRtl()->Find( OUString("CreateUnoDialog"), SbxCLASS_METHOD ); if( pVar ) { pVar->SbxValue::Clear(); } // delete the return value of CDec - static OUString aName3("CDec"); - pVar = pBasic->GetRtl()->Find( aName3, SbxCLASS_METHOD ); + pVar = pBasic->GetRtl()->Find( OUString("CDec"), SbxCLASS_METHOD ); if( pVar ) { pVar->SbxValue::Clear(); } // delete return value of CreateObject - static OUString aName4("CreateObject"); - pVar = pBasic->GetRtl()->Find( aName4, SbxCLASS_METHOD ); + pVar = pBasic->GetRtl()->Find( OUString("CreateObject"), SbxCLASS_METHOD ); if( pVar ) { pVar->SbxValue::Clear(); @@ -2548,29 +2542,25 @@ void SbUserFormModule::triggerInitializeEvent( void ) if ( mbInit ) return; SAL_INFO("basic", "**** SbUserFormModule::triggerInitializeEvent"); - static OUString aInitMethodName( "Userform_Initialize"); - triggerMethod( aInitMethodName ); + triggerMethod(OUString("Userform_Initialize")); mbInit = true; } void SbUserFormModule::triggerTerminateEvent( void ) { SAL_INFO("basic", "**** SbUserFormModule::triggerTerminateEvent"); - static OUString aTermMethodName( "Userform_Terminate" ); - triggerMethod( aTermMethodName ); + triggerMethod(OUString( "Userform_Terminate" )); mbInit=false; } void SbUserFormModule::triggerLayoutEvent( void ) { - static OUString aMethodName( "Userform_Layout" ); - triggerMethod( aMethodName ); + triggerMethod(OUString( "Userform_Layout" )); } void SbUserFormModule::triggerResizeEvent( void ) { - static OUString aMethodName("Userform_Resize"); - triggerMethod( aMethodName ); + triggerMethod(OUString("Userform_Resize")); } SbUserFormModuleInstance* SbUserFormModule::CreateInstance() |