diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:20:44 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:23 +0100 |
commit | 39ddeb53c04f7a8410a5146e2ce7b4acf204ad2b (patch) | |
tree | baa06f2e6f9ebabee235b7673a19e415cec5e4b1 /basic/source | |
parent | d9e2c2704466caaef52bdabf2689220ce6fa1cf7 (diff) |
basic: Use appropriate OUString functions on string constants
Change-Id: I43f99ba6759b0f8f633af784beaec583dbab0b9e
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/classes/sb.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 2 | ||||
-rw-r--r-- | basic/source/comp/dim.cxx | 6 | ||||
-rw-r--r-- | basic/source/comp/exprtree.cxx | 2 | ||||
-rw-r--r-- | basic/source/comp/scanner.cxx | 2 | ||||
-rw-r--r-- | basic/source/comp/symtbl.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/inputbox.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 8 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 12 | ||||
-rw-r--r-- | basic/source/sbx/sbxobj.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxvalue.cxx | 2 | ||||
-rw-r--r-- | basic/source/uno/namecont.cxx | 4 | ||||
-rw-r--r-- | basic/source/uno/scriptcont.cxx | 4 |
13 files changed, 25 insertions, 25 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 4f16e2ad9063..4d6c9a35f662 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1672,7 +1672,7 @@ void StarBASIC::MakeErrorText( SbError nId, const OUString& aMsg ) } else { - GetSbData()->aErrMsg = ""; + GetSbData()->aErrMsg.clear(); } } diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 80cbb6ea7e28..227796166367 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4371,7 +4371,7 @@ public: }; ModuleInvocationProxy::ModuleInvocationProxy( const OUString& aPrefix, SbxObjectRef xScopeObj ) - : m_aPrefix( aPrefix + OUString( "_" ) ) + : m_aPrefix( aPrefix + "_" ) , m_xScopeObj( xScopeObj ) , m_aListeners( m_aMutex ) { diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index 2142324f4662..8a1e9ae9f16e 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -881,8 +881,8 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl ) Error( SbERR_UNEXPECTED, _CDECL_ ); } pDef->SetCdecl( false ); - pDef->GetLib() = ""; - pDef->GetAlias() = ""; + pDef->GetLib().clear(); + pDef->GetAlias().clear(); } else if( pDef->GetLib().isEmpty() ) { @@ -896,7 +896,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl ) Error( SbERR_UNEXPECTED, _CDECL_ ); } pDef->SetCdecl( false ); - pDef->GetAlias() = ""; + pDef->GetAlias().clear(); } // Brackets? if( Peek() == LPAREN ) diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index c01a729125d9..14c6cc65f97b 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -1031,7 +1031,7 @@ SbiParameters::SbiParameters( SbiParser* p, bool bStandaloneExpression, bool bPa OUString aName; while( !bError ) { - aName = ""; + aName.clear(); // missing argument if( eTok == COMMA ) { diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 7708bc91ee1d..8a893f0b65aa 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -210,7 +210,7 @@ bool SbiScanner::NextSym() sal_Unicode buf[ BUF_SIZE ], *p = buf; eScanType = SbxVARIANT; - aSym = ""; + aSym.clear(); bHash = bSymbol = bNumber = bSpaces = false; // read in line? diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index 9cef215bec82..bb094e6079cf 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -500,7 +500,7 @@ SbiConstDef::SbiConstDef( const OUString& rName ) void SbiConstDef::Set( double n, SbxDataType t ) { - aVal = ""; nVal = n; eType = t; + aVal.clear(); nVal = n; eType = t; } void SbiConstDef::Set( const OUString& n ) diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx index 884600d6ed2a..c15127d45146 100644 --- a/basic/source/runtime/inputbox.cxx +++ b/basic/source/runtime/inputbox.cxx @@ -132,7 +132,7 @@ IMPL_LINK_INLINE_START( SvRTLInputBox, CancelHdl, Button *, pButton ) { (void)pButton; - aText=""; + aText.clear(); EndDialog( 0 ); return 0; } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index f27e77146407..6bf3a936aef0 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2717,7 +2717,7 @@ OUString implSetupWildcard( const OUString& rFileParam, SbiRTLData* pRTLData ) delete pRTLData->pWildCard; pRTLData->pWildCard = NULL; - pRTLData->sFullNameToBeChecked = ""; + pRTLData->sFullNameToBeChecked.clear(); OUString aFileParam = rFileParam; sal_Int32 nLastWild = aFileParam.lastIndexOf( cWild1 ); @@ -2755,7 +2755,7 @@ OUString implSetupWildcard( const OUString& rFileParam, SbiRTLData* pRTLData ) if( nLastDelim < 0 ) { aPureFileName = aFileParam; - aFileParam = ""; + aFileParam.clear(); } else { @@ -2940,7 +2940,7 @@ RTLFUNC(Dir) else if( pRTLData->nCurDirPos >= pRTLData->aDirSeq.getLength() ) { pRTLData->aDirSeq.realloc( 0 ); - aPath = ""; + aPath.clear(); break; } else @@ -3061,7 +3061,7 @@ RTLFUNC(Dir) { delete pRTLData->pDir; pRTLData->pDir = NULL; - aPath = ""; + aPath.clear(); break; } diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index ec6b1f5e4b6c..85f35491cb1d 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -2653,7 +2653,7 @@ void SbiRuntime::StepENDCASE() void SbiRuntime::StepSTDERROR() { pError = NULL; bError = true; - pInst->aErrorMsg = ""; + pInst->aErrorMsg.clear(); pInst->nErr = 0L; pInst->nErl = 0; nError = 0L; @@ -2662,7 +2662,7 @@ void SbiRuntime::StepSTDERROR() void SbiRuntime::StepNOERROR() { - pInst->aErrorMsg = ""; + pInst->aErrorMsg.clear(); pInst->nErr = 0L; pInst->nErl = 0; nError = 0L; @@ -3143,7 +3143,7 @@ void SbiRuntime::StepERRHDL( sal_uInt32 nOp1 ) StepJUMP( nOp1 ); pError = pCode; pCode = p; - pInst->aErrorMsg = ""; + pInst->aErrorMsg.clear(); pInst->nErr = 0; pInst->nErl = 0; nError = 0; @@ -3173,7 +3173,7 @@ void SbiRuntime::StepRESUME( sal_uInt32 nOp1 ) if( nOp1 > 1 ) StepJUMP( nOp1 ); - pInst->aErrorMsg = ""; + pInst->aErrorMsg.clear(); pInst->nErr = 0; pInst->nErl = 0; nError = 0; @@ -4182,7 +4182,7 @@ void SbiRuntime::StepCALL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) pArgs = refArgv; } DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, false ); - aLibName = ""; + aLibName.clear(); if( nOp1 & 0x8000 ) { PopArgv(); @@ -4200,7 +4200,7 @@ void SbiRuntime::StepCALLC( sal_uInt32 nOp1, sal_uInt32 nOp2 ) pArgs = refArgv; } DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, true ); - aLibName = ""; + aLibName.clear(); if( nOp1 & 0x8000 ) { PopArgv(); diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 8d413208c0b1..dfe6d9966e16 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -802,7 +802,7 @@ static bool CollectAttrs( const SbxBase* p, OUString& rRes ) } else { - rRes = ""; + rRes.clear(); return false; } } diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 9b44890d54db..278000254646 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -416,7 +416,7 @@ const OUString& SbxValue::GetCoreString() const } else { - ((SbxValue*) this)->aToolString = ""; + ((SbxValue*) this)->aToolString.clear(); } return aToolString; } diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index f9a5fd50bd1f..20d2dfbff1c7 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1852,7 +1852,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto if ( bInplaceStorage ) { // create a temporary target storage - const OUStringBuffer aTempTargetNameBase = maLibrariesDir + OUString( "_temp_" ); + const OUStringBuffer aTempTargetNameBase = maLibrariesDir + "_temp_"; sal_Int32 index = 0; do { @@ -2070,7 +2070,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto xTargetLibrariesStor->dispose(); i_rStorage->removeElement( sTempTargetStorName ); xTargetLibrariesStor.clear(); - sTempTargetStorName = ""; + sTempTargetStorName.clear(); // adjust target xTargetLibrariesStor = xSourceLibrariesStor; diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 4bf45cf30e87..43da15a09699 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -118,7 +118,7 @@ void SfxScriptLibraryContainer::clearLibraryPassword( const OUString& rLibraryNa SfxLibrary* pImplLib = getImplLib( rLibraryName ); pImplLib->mbDoc50Password = false; pImplLib->mbPasswordProtected = false; - pImplLib->maPassword = ""; + pImplLib->maPassword.clear(); } catch(const NoSuchElementException& ) {} } @@ -495,7 +495,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& { pImplLib->mbPasswordProtected = false; pImplLib->mbPasswordVerified = false; - pImplLib->maPassword = ""; + pImplLib->maPassword.clear(); maModifiable.setModified( true ); pImplLib->implSetModified( true ); |