diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-28 12:18:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-28 13:53:36 +0100 |
commit | ba23ece286671f8f9b5baf245239996e1e1fabdb (patch) | |
tree | 7314f9c83e9c92a72563856459c4a217fc42227e /basic | |
parent | 2ee701afd333ef01bc5d4f62543aaf0f5ac5ed3c (diff) |
probably the last uses of the one argument String::CreateFromAscii variant
Change-Id: I36aab317da2f69f12aaefc24895ad9eaa6b69a7c
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/basmgr/basicmanagerrepository.cxx | 4 | ||||
-rw-r--r-- | basic/source/classes/eventatt.cxx | 3 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 6 | ||||
-rw-r--r-- | basic/source/comp/exprtree.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 7 | ||||
-rw-r--r-- | basic/source/runtime/methods1.cxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/step2.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxform.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxvar.cxx | 2 |
9 files changed, 14 insertions, 18 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 8d0c2ebd9eda..f3ef0b11b282 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -297,14 +297,14 @@ namespace basic SvtPathOptions aPathCFG; String aAppBasicDir( aPathCFG.GetBasicPath() ); if ( !aAppBasicDir.Len() ) - aPathCFG.SetBasicPath( String::CreateFromAscii("$(prog)") ); + aPathCFG.SetBasicPath(rtl::OUString("$(prog)")); // soffice.new search only in user dir => first dir String aAppFirstBasicDir = aAppBasicDir.GetToken(1); // Create basic and load it // AppBasicDir is now a PATH - INetURLObject aAppBasic( SvtPathOptions().SubstituteVariable( String::CreateFromAscii("$(progurl)") ) ); + INetURLObject aAppBasic( SvtPathOptions().SubstituteVariable(rtl::OUString("$(progurl)")) ); aAppBasic.insertName( Application::GetAppName() ); BasicManager* pBasicManager = new BasicManager( new StarBASIC, &aAppBasicDir ); diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 06b055fa4ccc..d535eee387e7 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -349,8 +349,7 @@ Any implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic ) { Any aRetDlgLibAny; - SbxVariable* pDlgLibContVar = pBasic->Find - ( String::CreateFromAscii("DialogLibraries"), SbxCLASS_OBJECT ); + SbxVariable* pDlgLibContVar = pBasic->Find(rtl::OUString("DialogLibraries"), SbxCLASS_OBJECT); if( pDlgLibContVar && pDlgLibContVar->ISA(SbUnoObject) ) { SbUnoObject* pDlgLibContUnoObj = (SbUnoObject*)(SbxBase*)pDlgLibContVar; diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index a676fc8bfde5..e31ceeb59d3f 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1093,8 +1093,6 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth ) { OSL_TRACE("About to run %s, vba compatmode is %d", rtl::OUStringToOString( pMeth->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), mbVBACompat ); static sal_uInt16 nMaxCallLevel = 0; - static String aMSOMacroRuntimeLibName = String::CreateFromAscii( "Launcher" ); - static String aMSOMacroRuntimeAppSymbol = String::CreateFromAscii( "Application" ); sal_uInt16 nRes = 0; sal_Bool bDelInst = sal_Bool( GetSbData()->pInst == NULL ); @@ -1129,7 +1127,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth ) // Launcher problem // i80726 The Find below will genarate an error in Testtool so we reset it unless there was one before already sal_Bool bWasError = SbxBase::GetError() != 0; - SbxVariable* pMSOMacroRuntimeLibVar = Find( aMSOMacroRuntimeLibName, SbxCLASS_OBJECT ); + SbxVariable* pMSOMacroRuntimeLibVar = Find( rtl::OUString("Launcher"), SbxCLASS_OBJECT ); if ( !bWasError && (SbxBase::GetError() == SbxERR_PROC_UNDEFINED) ) SbxBase::ResetError(); if( pMSOMacroRuntimeLibVar ) @@ -1139,7 +1137,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth ) { sal_uInt16 nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SBX_GBLSEARCH; pMSOMacroRuntimeLib->ResetFlag( SBX_GBLSEARCH ); - SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( aMSOMacroRuntimeAppSymbol, SbxCLASS_METHOD ); + SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( rtl::OUString("Application"), SbxCLASS_METHOD ); pMSOMacroRuntimeLib->SetFlag( nGblFlag ); if( pAppSymbol ) { diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index 02db3928e1be..79eeedf65e44 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -142,7 +142,7 @@ static SbiSymDef* AddSym sal_uInt16 n = 1; for( short i = 0; i < pPar->GetSize(); i++ ) { - String aPar = String::CreateFromAscii( "PAR" ); + String aPar = rtl::OUString("PAR"); aPar += ++n; pProc->GetParams().AddSym( aPar ); } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 9943ad327174..4f6680c2212c 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -56,6 +56,7 @@ #include "errobject.hxx" #include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/util/DateTime.hpp> @@ -2375,7 +2376,6 @@ RTLFUNC(IsMissing) // Function looks for wildcards, removes them and always returns the pure path String implSetupWildcard( const String& rFileParam, SbiRTLData* pRTLData ) { - static String aAsterisk = String::CreateFromAscii( "*" ); static sal_Char cDelim1 = (sal_Char)'/'; static sal_Char cDelim2 = (sal_Char)'\\'; static sal_Char cWild1 = '*'; @@ -2410,7 +2410,7 @@ String implSetupWildcard( const String& rFileParam, SbiRTLData* pRTLData ) return aPathStr; } - String aPureFileName; + rtl::OUString aPureFileName; if( nLastDelim == STRING_NOTFOUND ) { aPureFileName = aFileParam; @@ -2424,11 +2424,10 @@ String implSetupWildcard( const String& rFileParam, SbiRTLData* pRTLData ) // Try again to get a valid URL/UNC-path with only the path String aPathStr = getFullPath( aFileParam ); - xub_StrLen nPureLen = aPureFileName.Len(); // Is there a pure file name left? Otherwise the path is // invalid anyway because it was not accepted by OSL before - if( nPureLen && aPureFileName != aAsterisk ) + if (comphelper::string::equals(aPureFileName, '*')) { pRTLData->pWildCard = new WildCard( aPureFileName ); } diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 42ea005bec82..19f4823608a4 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -1631,7 +1631,7 @@ RTLFUNC(Join) if( nParCount == 3 ) aDelim = rPar.Get(2)->GetString(); else - aDelim = String::CreateFromAscii( " " ); + aDelim = rtl::OUString(" "); String aRetStr; short nLower, nUpper; @@ -1671,7 +1671,7 @@ RTLFUNC(Split) if( nParCount >= 3 ) aDelim = rPar.Get(2)->GetString(); else - aDelim = String::CreateFromAscii( " " ); + aDelim = rtl::OUString(" "); sal_Int32 nCount = -1; if( nParCount == 4 ) diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 05d1d22d00a7..d6d97a50f71e 100644 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -89,7 +89,7 @@ SbxVariable* SbiRuntime::FindElement PushVar( p ); StepARGV(); nOp1 = nOp1 | 0x8000; // indicate params are present - aName = String::CreateFromAscii("Evaluate"); + aName = rtl::OUString("Evaluate"); } if( bLocal ) { diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx index 09617744d696..abcb2ec3e166 100644 --- a/basic/source/sbx/sbxform.cxx +++ b/basic/source/sbx/sbxform.cxx @@ -972,7 +972,7 @@ String SbxBasicFormater::BasicFormat( double dNumber, String sFormatStrg ) { if( sNegFormatStrg.Len() == 0 && bPosFormatFound ) { - sTempStrg = String::CreateFromAscii("-"); + sTempStrg = rtl::OUString("-"); sTempStrg += sPosFormatStrg; } else diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 96d9bc40a019..61092c5f3414 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -387,7 +387,7 @@ void SbxVariable::SetParent( SbxObject* p ) } if ( !bFound ) { - String aMsg = String::CreateFromAscii( "dangling: [" ); + String aMsg = rtl::OUString("dangling: ["); aMsg += GetName(); aMsg.AppendAscii( "].SetParent([" ); aMsg += p->GetName(); |