summaryrefslogtreecommitdiff
path: root/nlpsolver
diff options
context:
space:
mode:
Diffstat (limited to 'nlpsolver')
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
index 16bb7e861605..e1386a6e52c3 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
@@ -246,8 +246,10 @@ public abstract class BaseNLPSolver extends WeakBase
RowInfo currentRow = null;
int lastSheet = -1, lastRow = -1;
for (int i = 0; i < m_variableCount; i++) {
- if (lastSheet == m_variables[i].Sheet && lastRow == m_variables[i].Row &&
- currentRow != null && currentRow.EndCol == m_variables[i].Column - 1)
+ boolean match = lastSheet == m_variables[i].Sheet &&
+ lastRow == m_variables[i].Row;
+ assert !match || currentRow != null;
+ if (match && currentRow.EndCol == m_variables[i].Column - 1)
currentRow.EndCol++;
else {
currentRow = new RowInfo(m_variables[i].Sheet, m_variables[i].Row);