summaryrefslogtreecommitdiff
path: root/formula/source/ui/dlg
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-29 17:20:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-29 17:20:52 +0100
commit39a33a548b155d14a2ad8e87b54aaab5937fdb0a (patch)
tree0ac3576e0928c4543b87a3f08d80b2bdd5fddceb /formula/source/ui/dlg
parent1e8dc795559971eba4bdbaeff9c483ab56635b93 (diff)
Rewrite some (trivial) assignments inside if/while conditions: formula
Change-Id: I28d41341607abae82a3bc5d9cacdb70e7431be18
Diffstat (limited to 'formula/source/ui/dlg')
-rw-r--r--formula/source/ui/dlg/FormulaHelper.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index 4e6c6c816096..f6eae1381561 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -223,8 +223,12 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula,
if (nParPos > 0)
nParPos--;
}
- else if ( !(bFound = ( rFormula[nParPos] == '(' ) ) )
- nParPos--;
+ else
+ {
+ bFound = rFormula[nParPos] == '(';
+ if ( !bFound )
+ nParPos--;
+ }
}
}
else
@@ -238,8 +242,12 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula,
nParPos++;
nParPos++;
}
- else if ( !(bFound = ( rFormula[nParPos] == '(' ) ) )
- nParPos++;
+ else
+ {
+ bFound = rFormula[nParPos] == '(';
+ if ( !bFound )
+ nParPos++;
+ }
}
}