[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - formula/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Feb 27 15:16:50 UTC 2019
formula/source/core/api/FormulaCompiler.cxx | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 5f9104ef6f42d9d42ce3ec564affcba88889e76c
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Fri Feb 22 22:56:53 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Feb 27 16:16:26 2019 +0100
Resolves: tdf#123477 let array/matrix formula act as ForceArray on calls
... so the inheritance and checks introduced with
ParamClass::ReferenceOrRefArray work for those as well.
Change-Id: Ieb87f6a3df5a388f859eae4c5558cf282cd0cde3
Reviewed-on: https://gerrit.libreoffice.org/68236
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 1f97ce11178649a8d16aa4a1df277e1a3bd8ef1b)
Reviewed-on: https://gerrit.libreoffice.org/68238
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index f15ecbb9ddd5..51849f8caeb0 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -2700,11 +2700,20 @@ void FormulaCompiler::ForceArrayOperator( FormulaTokenRef const & rCurr )
// CheckSetForceArrayParameter() and later PutCode().
return;
- if (!pCurrentFactorToken || (pCurrentFactorToken.get() == rCurr.get()))
+ if (!(rCurr->GetOpCode() != ocPush && (rCurr->GetType() == svByte || rCurr->GetType() == svJump)))
return;
- if (!(rCurr->GetOpCode() != ocPush && (rCurr->GetType() == svByte || rCurr->GetType() == svJump)))
+ if (!pCurrentFactorToken || (pCurrentFactorToken.get() == rCurr.get()))
+ {
+ if (!pCurrentFactorToken && mbMatrixFlag)
+ {
+ // An array/matrix formula acts as ForceArray on all top level
+ // operators and function calls, so that can be inherited properly
+ // below.
+ rCurr->SetInForceArray( ParamClass::ForceArray);
+ }
return;
+ }
// Inherited parameter class.
const formula::ParamClass eForceType = pCurrentFactorToken->GetInForceArray();
More information about the Libreoffice-commits
mailing list