summaryrefslogtreecommitdiff
path: root/include/formula/FormulaCompiler.hxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-06-13 10:50:27 +0200
committerEike Rathke <erack@redhat.com>2014-06-13 14:21:34 +0200
commitc9d037e5e8e5850e9c69372580e7a506b573fc2a (patch)
treecf780f6dfdcf4111547e485cf1596f6dfe1ebe90 /include/formula/FormulaCompiler.hxx
parente2ae9f3e8cb625cd8a1f6c93b665a06672038fb6 (diff)
resolved fdo#79957 propagate ForceArray through jump tokens
ForceArray parameters weren't propagated and enforced to array arguments on svJump tokens (FormulaJumpToken), namely IF, CHOOSE, IFERROR and IFNA. Change-Id: Icf9074f11b826655a52858d778d9a0122d207aa4
Diffstat (limited to 'include/formula/FormulaCompiler.hxx')
-rw-r--r--include/formula/FormulaCompiler.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx
index 81277c9ee4bb..a4fd1af678c2 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -356,9 +356,9 @@ private:
static inline void ForceArrayOperator( FormulaTokenRef& rCurr, const FormulaTokenRef& rPrev )
{
- if ( rPrev && rPrev->HasForceArray() &&
- rCurr->GetType() == svByte && rCurr->GetOpCode() != ocPush
- && !rCurr->HasForceArray() )
+ if ( rPrev && rPrev->HasForceArray() && rCurr->GetOpCode() != ocPush &&
+ (rCurr->GetType() == svByte || rCurr->GetType() == svJump) &&
+ !rCurr->HasForceArray() )
rCurr->SetForceArray( true);
}