summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorPierre-André Jacquod <pjacquod@alumni.ethz.ch>2011-10-03 14:30:43 +0200
committerPierre-André Jacquod <pjacquod@alumni.ethz.ch>2011-10-07 15:57:55 +0200
commitfaeb15dd32c689f1e00716fedb4229af856706b3 (patch)
tree8f57274bacbea3aa7a0024c13c20ada300756286 /formula
parentcbc1c6f0824f95a8d271edfdf4a6fe522388042b (diff)
cppcheck reduce scope of var in formula/..formula.cxx
Diffstat (limited to 'formula')
-rw-r--r--formula/source/ui/dlg/formula.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index ab9026e24418..f82ee9bd8d16 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -478,8 +478,6 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
const sal_Unicode sep = m_pHelper->getFunctionManager()->getSingleToken(IFunctionManager::eSep);
xub_StrLen nFuncPos=STRING_NOTFOUND; //@ Testwise
- xub_StrLen nPrevFuncPos=1;
- short nBracketCount=0;
sal_Bool bFlag=sal_False;
String aFormString = pMEdit->GetText();
m_aFormulaHelper.GetCharClass()->toUpper( aFormString );
@@ -495,6 +493,8 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
{
xub_StrLen nTokPos=1;
xub_StrLen nOldTokPos=1;
+ xub_StrLen nPrevFuncPos = 1;
+ short nBracketCount = 0;
while ( pIter != pEnd )
{
const sal_Int32 eOp = pIter->OpCode;
@@ -508,7 +508,8 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
aBtnMatrix.Check();
}
- if ( eOp == m_aSpecialOpCodes[sheet::FormulaMapGroupSpecialOffset::PUSH].Token.OpCode || eOp == m_aSpecialOpCodes[sheet::FormulaMapGroupSpecialOffset::SPACES].Token.OpCode )
+ if ( eOp == m_aSpecialOpCodes[sheet::FormulaMapGroupSpecialOffset::PUSH].Token.OpCode ||
+ eOp == m_aSpecialOpCodes[sheet::FormulaMapGroupSpecialOffset::SPACES].Token.OpCode )
{
const xub_StrLen n1=aFormString.Search(sep, nTokPos);
const xub_StrLen n2=aFormString.Search(')',nTokPos);