From e9c4ee996d5a6bf895072613ac4e488346ee5b05 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 4 Nov 2013 13:56:13 +0200 Subject: remove unnecessary use of OUString constructor in BASIC module Change-Id: Iee86ce9200285647d5031cb2f89266a52704dd44 --- basic/source/classes/sbunoobj.cxx | 2 +- basic/source/comp/scanner.cxx | 10 +++++----- basic/source/comp/token.cxx | 8 ++++---- basic/source/runtime/methods.cxx | 14 +++++++------- basic/source/runtime/runtime.cxx | 16 ++++++++-------- basic/source/uno/dlgcont.cxx | 6 +++--- basic/source/uno/namecont.cxx | 12 ++++++------ basic/source/uno/scriptcont.cxx | 8 ++++---- 8 files changed, 38 insertions(+), 38 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 27456414c7fc..40db878cf189 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -3620,7 +3620,7 @@ SbxVariable* SbUnoService::Find( const OUString& rName, SbxClassType ) { if( xCtor->isDefaultConstructor() ) { - aName = OUString("create"); + aName = "create"; } } diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 3609765b3630..fd6ff11d9565 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -160,7 +160,7 @@ void SbiScanner::scanGoto() OUString aTemp = aLine.copy(n, 2); if(aTemp.equalsIgnoreAsciiCase("to")) { - aSym = OUString("goto"); + aSym = "goto"; pLine += n + 2 - nCol; nCol = n + 2; } @@ -210,7 +210,7 @@ bool SbiScanner::NextSym() sal_Unicode buf[ BUF_SIZE ], *p = buf; eScanType = SbxVARIANT; - aSym = OUString(); + aSym = ""; bHash = bSymbol = bNumber = bSpaces = false; // read in line? @@ -433,7 +433,7 @@ bool SbiScanner::NextSym() default : // treated as an operator --pLine; --nCol; nCol1 = nCol-1; - aSym = OUString("&"); + aSym = "&"; return true; } bNumber = true; @@ -537,7 +537,7 @@ PrevLineCommentLbl: ( aSym.startsWith("'") || aSym.equalsIgnoreAsciiCase( "REM" ) ) ) ) { bPrevLineExtentsComment = false; - aSym = OUString("REM"); + aSym = "REM"; sal_Int32 nLen = rtl_ustr_getLength(pLine); if( bCompatible && pLine[ nLen - 1 ] == '_' && pLine[ nLen - 2 ] == ' ' ) bPrevLineExtentsComment = true; @@ -568,7 +568,7 @@ eoln: nLine = nOldLine; nCol1 = nOldCol1; nCol2 = nOldCol2; - aSym = OUString("\n"); + aSym = "\n"; nColLock = 0; return true; } diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index bf5231a0a571..bc0519dfeb00 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -286,13 +286,13 @@ const OUString& SbiTokenizer::Symbol( SbiToken t ) switch( t ) { case NEG : - aSym = OUString("-"); + aSym = "-"; return aSym; case EOS : - aSym = OUString(":/CRLF"); + aSym = ":/CRLF"; return aSym; case EOLN : - aSym = OUString("CRLF"); + aSym = "CRLF"; return aSym; default: break; @@ -309,7 +309,7 @@ const OUString& SbiTokenizer::Symbol( SbiToken t ) const sal_Unicode *p = aSym.getStr(); if (*p <= ' ') { - aSym = OUString("???"); + aSym = "???"; } return aSym; } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 691c5ea5931a..083152b63fb0 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2729,7 +2729,7 @@ OUString implSetupWildcard( const OUString& rFileParam, SbiRTLData* pRTLData ) delete pRTLData->pWildCard; pRTLData->pWildCard = NULL; - pRTLData->sFullNameToBeChecked = OUString(); + pRTLData->sFullNameToBeChecked = ""; OUString aFileParam = rFileParam; sal_Int32 nLastWild = aFileParam.lastIndexOf( cWild1 ); @@ -2767,7 +2767,7 @@ OUString implSetupWildcard( const OUString& rFileParam, SbiRTLData* pRTLData ) if( nLastDelim < 0 ) { aPureFileName = aFileParam; - aFileParam = OUString(); + aFileParam = ""; } else { @@ -2941,11 +2941,11 @@ RTLFUNC(Dir) { if( pRTLData->nCurDirPos == -2 ) { - aPath = OUString("." ); + aPath = "."; } else if( pRTLData->nCurDirPos == -1 ) { - aPath = OUString(".." ); + aPath = ".."; } pRTLData->nCurDirPos++; } @@ -3057,11 +3057,11 @@ RTLFUNC(Dir) { if( pRTLData->nCurDirPos == -2 ) { - aPath = OUString("." ); + aPath = "."; } else if( pRTLData->nCurDirPos == -1 ) { - aPath = OUString(".." ); + aPath = ".."; } pRTLData->nCurDirPos++; } @@ -3825,7 +3825,7 @@ OUString getObjectTypeName( SbxVariable* pVar ) SbxBase* pObj = pVar->GetObject(); if( !pObj ) { - sRet = OUString("Nothing"); + sRet = "Nothing"; } else { diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 6cd204ef5855..442635eee117 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -2654,7 +2654,7 @@ void SbiRuntime::StepENDCASE() void SbiRuntime::StepSTDERROR() { pError = NULL; bError = true; - pInst->aErrorMsg = OUString(); + pInst->aErrorMsg = ""; pInst->nErr = 0L; pInst->nErl = 0; nError = 0L; @@ -2663,7 +2663,7 @@ void SbiRuntime::StepSTDERROR() void SbiRuntime::StepNOERROR() { - pInst->aErrorMsg = OUString(); + pInst->aErrorMsg = ""; pInst->nErr = 0L; pInst->nErl = 0; nError = 0L; @@ -3144,7 +3144,7 @@ void SbiRuntime::StepERRHDL( sal_uInt32 nOp1 ) StepJUMP( nOp1 ); pError = pCode; pCode = p; - pInst->aErrorMsg = OUString(); + pInst->aErrorMsg = ""; pInst->nErr = 0; pInst->nErl = 0; nError = 0; @@ -3174,7 +3174,7 @@ void SbiRuntime::StepRESUME( sal_uInt32 nOp1 ) if( nOp1 > 1 ) StepJUMP( nOp1 ); - pInst->aErrorMsg = OUString(); + pInst->aErrorMsg = ""; pInst->nErr = 0; pInst->nErl = 0; nError = 0; @@ -3398,7 +3398,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt PushVar( p ); StepARGV(); nOp1 = nOp1 | 0x8000; // indicate params are present - aName = OUString("Evaluate"); + aName = "Evaluate"; } if( bLocal ) { @@ -3954,7 +3954,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) } else if( xIndexAccess.is() ) { - sDefaultMethod = OUString( "getByIndex" ); + sDefaultMethod = "getByIndex"; } if ( !sDefaultMethod.isEmpty() ) { @@ -4183,7 +4183,7 @@ void SbiRuntime::StepCALL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) pArgs = refArgv; } DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, false ); - aLibName = OUString(); + aLibName = ""; if( nOp1 & 0x8000 ) { PopArgv(); @@ -4201,7 +4201,7 @@ void SbiRuntime::StepCALLC( sal_uInt32 nOp1, sal_uInt32 nOp2 ) pArgs = refArgv; } DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, true ); - aLibName = OUString(); + aLibName = ""; if( nOp1 & 0x8000 ) { PopArgv(); diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 70a2ce73f7ee..1190f2d0bc22 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -140,7 +140,7 @@ bool writeOasis2OOoLibraryElement( xml::sax::InputSource source; source.aInputStream = xInput; - source.sSystemId = OUString("virtual file"); + source.sSystemId = "virtual file"; xParser->parseStream( source ); @@ -468,9 +468,9 @@ Sequence< OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServiceName Sequence< OUString > SfxDialogLibraryContainer::getSupportedServiceNames_static() { Sequence< OUString > aServiceNames( 2 ); - aServiceNames[0] = OUString("com.sun.star.script.DocumentDialogLibraryContainer"); + aServiceNames[0] = "com.sun.star.script.DocumentDialogLibraryContainer"; // plus, for compatibility: - aServiceNames[1] = OUString("com.sun.star.script.DialogLibraryContainer"); + aServiceNames[1] = "com.sun.star.script.DialogLibraryContainer"; return aServiceNames; } diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 5ad7de4db706..2ce1cb97e243 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -594,11 +594,11 @@ static void createVariableURL( OUString& rStr, const OUString& rLibName, { if( bUser ) { - rStr = OUString("$(USER)/basic/"); + rStr = "$(USER)/basic/"; } else { - rStr = OUString("$(INST)/" LIBO_SHARE_FOLDER "/basic/"); + rStr = "$(INST)/" LIBO_SHARE_FOLDER "/basic/"; } rStr += rLibName; rStr += "/"; @@ -1049,20 +1049,20 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, OUString aCheckFileName; // Check if script.xlb exists - aCheckFileName = OUString("script"); + aCheckFileName = "script"; checkAndCopyFileImpl( aUserBasicStandardInetObj, aPrevUserBasicStandardInetObj, aCheckFileName, aXlbExtension, mxSFI ); // Check if dialog.xlb exists - aCheckFileName = OUString("dialog"); + aCheckFileName = "dialog"; checkAndCopyFileImpl( aUserBasicStandardInetObj, aPrevUserBasicStandardInetObj, aCheckFileName, aXlbExtension, mxSFI ); // Check if module1.xba exists OUString aXbaExtension("xba"); - aCheckFileName = OUString("Module1"); + aCheckFileName = "Module1"; checkAndCopyFileImpl( aUserBasicStandardInetObj, aPrevUserBasicStandardInetObj, aCheckFileName, aXbaExtension, mxSFI ); @@ -2027,7 +2027,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto xTargetLibrariesStor->dispose(); i_rStorage->removeElement( sTempTargetStorName ); xTargetLibrariesStor.clear(); - sTempTargetStorName = OUString(); + sTempTargetStorName = ""; // adjust target xTargetLibrariesStor = xSourceLibrariesStor; diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 65e9d02b83b8..4be3e13a6bbf 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -115,7 +115,7 @@ void SfxScriptLibraryContainer::clearLibraryPassword( const OUString& rLibraryNa SfxLibrary* pImplLib = getImplLib( rLibraryName ); pImplLib->mbDoc50Password = false; pImplLib->mbPasswordProtected = sal_False; - pImplLib->maPassword = OUString(); + pImplLib->maPassword = ""; } catch(const NoSuchElementException& ) {} } @@ -493,7 +493,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& { pImplLib->mbPasswordProtected = sal_False; pImplLib->mbPasswordVerified = sal_False; - pImplLib->maPassword = OUString(); + pImplLib->maPassword = ""; maModifiable.setModified( sal_True ); pImplLib->implSetModified( sal_True ); @@ -1215,9 +1215,9 @@ Sequence< OUString > SAL_CALL SfxScriptLibraryContainer::getSupportedServiceName Sequence< OUString > SfxScriptLibraryContainer::getSupportedServiceNames_static() { Sequence< OUString > aServiceNames( 2 ); - aServiceNames[0] = OUString("com.sun.star.script.DocumentScriptLibraryContainer" ); + aServiceNames[0] = "com.sun.star.script.DocumentScriptLibraryContainer"; // plus, for compatibility: - aServiceNames[1] = OUString("com.sun.star.script.ScriptLibraryContainer" ); + aServiceNames[1] = "com.sun.star.script.ScriptLibraryContainer"; return aServiceNames; } -- cgit v1.2.3