From 39a33a548b155d14a2ad8e87b54aaab5937fdb0a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 29 Nov 2016 17:20:52 +0100 Subject: Rewrite some (trivial) assignments inside if/while conditions: formula Change-Id: I28d41341607abae82a3bc5d9cacdb70e7431be18 --- formula/source/ui/dlg/FormulaHelper.cxx | 16 ++++++++++++---- 1 file 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++; + } } } -- cgit