Kaydet (Commit) e9c4ee99 authored tarafından Noel Grandin's avatar Noel Grandin

remove unnecessary use of OUString constructor in BASIC module

Change-Id: Iee86ce9200285647d5031cb2f89266a52704dd44
üst 03995a6b
......@@ -3620,7 +3620,7 @@ SbxVariable* SbUnoService::Find( const OUString& rName, SbxClassType )
{
if( xCtor->isDefaultConstructor() )
{
aName = OUString("create");
aName = "create";
}
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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
{
......
......@@ -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();
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment