summaryrefslogtreecommitdiff
path: root/formula/source/core/api/token.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-06-03 15:57:12 +0200
committerEike Rathke <erack@redhat.com>2022-06-03 17:21:22 +0200
commit6079bf6879c4baf144b68ef459d825412ecea697 (patch)
treee845117086e771c70a8cfd8b039e67a9a1304f4a /formula/source/core/api/token.cxx
parentf30af7b3516d783d717745b63134499ea0d049fc (diff)
Add binary operators to ForceArrayReturn handling, tdf#149378 follow-up
So ={1;2} or =-{1;2} or ={1;2}+3 or ={1;2}+{3;4} or ={1;2}+A1 are propagated. But ={1;2}+A1:A2 is not because the range reference should be implicit intersection not to be forced to array mode unless user says so. This also adds low level ocPush with svMatrix returning always ParamClass::ForceArrayReturn in FormulaToken::GetInForceArray() so any derived like ScMatrixToken inherit that. Change-Id: Ida24414a795d6609bf01e361f96438f9e7f7f66c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135360 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'formula/source/core/api/token.cxx')
-rw-r--r--formula/source/core/api/token.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 87b0fb67ca98..2ca7af78f963 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -175,7 +175,7 @@ void FormulaToken::SetByte( sal_uInt8 )
ParamClass FormulaToken::GetInForceArray() const
{
// ok to be called for any derived class
- return ParamClass::Unknown;
+ return (eOp == ocPush && eType == svMatrix) ? ParamClass::ForceArrayReturn : ParamClass::Unknown;
}
void FormulaToken::SetInForceArray( ParamClass )