diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:25:09 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:26 +0100 |
commit | ca871abe3395f4a4ca406c8eb191722e0c0a311b (patch) | |
tree | 207f04d2146debd7c2f2a72d5e6794090ab49d57 /formula/source | |
parent | 9e3ced1956b71c4016dd28f7a718157194b30149 (diff) |
formula: Use appropriate OUString functions on string constants
Change-Id: I309d46f26a8c74b759add5c2d1edbbe37bc09365
Diffstat (limited to 'formula/source')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 14 | ||||
-rw-r--r-- | formula/source/ui/dlg/FormulaHelper.cxx | 2 | ||||
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 14 |
3 files changed, 15 insertions, 15 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 0e56d0e18fc0..9b7da1a98338 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1041,7 +1041,7 @@ bool FormulaCompiler::GetToken() if ( bAutoCorrect && !pStack ) { // don't merge stacked subroutine code into entered formula aCorrectedFormula += aCorrectedSymbol; - aCorrectedSymbol = ""; + aCorrectedSymbol.clear(); } bool bStop = false; if (pArr->GetCodeError() && mbStopOnError) @@ -1423,7 +1423,7 @@ void FormulaCompiler::Factor() SetError( errParameterExpected ); if ( bAutoCorrect && !pStack ) { - aCorrectedSymbol = ""; + aCorrectedSymbol.clear(); bCorrected = true; } } @@ -1442,7 +1442,7 @@ void FormulaCompiler::Factor() sal_Int32 nLen = aCorrectedFormula.getLength(); if ( nLen ) aCorrectedFormula = aCorrectedFormula.copy( 0, nLen - 1 ); - aCorrectedSymbol = ""; + aCorrectedSymbol.clear(); bCorrected = true; } } @@ -1649,8 +1649,8 @@ bool FormulaCompiler::CompileTokenArray() { if ( bAutoCorrect ) { - aCorrectedFormula = ""; - aCorrectedSymbol = ""; + aCorrectedFormula.clear(); + aCorrectedSymbol.clear(); } pArr->nRefs = 0; // count from start pArr->DelRPN(); @@ -1998,7 +1998,7 @@ OpCode FormulaCompiler::NextToken() { if ( eOp == eLastOp || eLastOp == ocOpen ) { // throw away duplicated operator - aCorrectedSymbol = ""; + aCorrectedSymbol.clear(); bCorrected = true; } else @@ -2136,7 +2136,7 @@ void FormulaCompiler::PushTokenArray( FormulaTokenArray* pa, bool bTemp ) if ( bAutoCorrect && !pStack ) { // don't merge stacked subroutine code into entered formula aCorrectedFormula += aCorrectedSymbol; - aCorrectedSymbol = ""; + aCorrectedSymbol.clear(); } FormulaArrayStack* p = new FormulaArrayStack; p->pNext = pStack; diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx index 38988e3f3dc5..73ef78243498 100644 --- a/formula/source/ui/dlg/FormulaHelper.cxx +++ b/formula/source/ui/dlg/FormulaHelper.cxx @@ -274,7 +274,7 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula, { nFStart = FUNC_NOTFOUND; if ( pFuncName ) - (*pFuncName) = ""; + pFuncName->clear(); } } while(bRepeat); diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index ef9307590969..095bf735788c 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -600,12 +600,12 @@ void FormulaDlg_Impl::UpdateValues() if ( CalcValue( pFuncDesc->getFormula( m_aArguments ), aStrResult ) ) m_pWndResult->SetText( aStrResult ); - aStrResult = ""; + aStrResult.clear(); if ( CalcValue(m_pHelper->getCurrentFormula(), aStrResult ) ) m_pWndFormResult->SetText( aStrResult ); else { - aStrResult = ""; + aStrResult.clear(); m_pWndFormResult->SetText( aStrResult ); } CalcStruct(pMEdit->GetText()); @@ -780,7 +780,7 @@ void FormulaDlg_Impl::FillDialog(bool nFlag) m_pWndFormResult->SetText( aStrResult ); else { - aStrResult = ""; + aStrResult.clear(); m_pWndFormResult->SetText( aStrResult ); } } @@ -1189,7 +1189,7 @@ void FormulaDlg_Impl::SaveArg( sal_uInt16 nEd ) for(sal_uInt16 i=nClearPos; i<nArgs; i++) { - m_aArguments[i] = ""; + m_aArguments[i].clear(); } } } @@ -1285,7 +1285,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl) m_pWndFormResult->SetText( aStrResult ); else { - aStrResult = ""; + aStrResult.clear(); m_pWndFormResult->SetText( aStrResult ); } CalcStruct(aString); @@ -1478,7 +1478,7 @@ void FormulaDlg_Impl::Update() { FormEditData* pData = m_pHelper->getFormEditData(); const OUString sExpression = pMEdit->GetText(); - aOldFormula = ""; + aOldFormula.clear(); UpdateTokenArray(sExpression); FormulaCursorHdl(m_pMEFormula); CalcStruct(sExpression); @@ -1897,7 +1897,7 @@ void FormEditData::Reset() aUniqueId=OString(); aSelection.Min()=0; aSelection.Max()=0; - aUndoStr = ""; + aUndoStr.clear(); } const FormEditData& FormEditData::operator=( const FormEditData& r ) |