diff options
author | Eike Rathke <erack@redhat.com> | 2018-03-06 18:41:56 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-26 08:31:42 +0200 |
commit | f12023c185b0dff258c871b9f026906bb53edee3 (patch) | |
tree | 41032e35ae7c41d1e791926e55699edc103fdc4a /formula | |
parent | 4e136b5d0d8fb5bf4712cffbda71979b8c02c3a4 (diff) |
Resolves: tdf#116100 fewer array of references cases, tdf#58874 related
In particular if in any ForceArray context use the matrix result
instead of the array of references list.
(cherry picked from commit cfc6cf5177f8df23af35c4509c0276a19de56cce)
Change-Id: I72328a690760637f6d31fadba447641c64711a67
Reviewed-on: https://gerrit.libreoffice.org/50842
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
(cherry picked from commit b52ca1a7cf9e3652ebd433753b6642b6f5124d1f)
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 6 | ||||
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 0ee613dcd8f0..715a2608c7ea 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -2606,9 +2606,11 @@ void FormulaCompiler::ForceArrayOperator( FormulaTokenRef const & rCurr ) else if (eType == formula::ParamClass::ReferenceOrForceArray) { // Inherit further only if the return class of the nested function is - // not Reference. + // not Reference. Else flag as suppressed. if (GetForceArrayParameter( rCurr.get(), SAL_MAX_UINT16) != ParamClass::Reference) rCurr->SetInForceArray( eType); + else + rCurr->SetInForceArray( formula::ParamClass::SuppressedReferenceOrForceArray); return; } @@ -2622,6 +2624,8 @@ void FormulaCompiler::ForceArrayOperator( FormulaTokenRef const & rCurr ) { if (GetForceArrayParameter( rCurr.get(), SAL_MAX_UINT16) != ParamClass::Reference) rCurr->SetInForceArray( eType); + else + rCurr->SetInForceArray( formula::ParamClass::SuppressedReferenceOrForceArray); } } } diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 1a7505ac06f8..c98167ea54bc 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -762,6 +762,7 @@ void FormulaDlg_Impl::MakeTree( StructPage* _pTree, SvTreeListEntry* pParent, co case ParamClass::Array: case ParamClass::ForceArray: case ParamClass::ReferenceOrForceArray: + case ParamClass::SuppressedReferenceOrForceArray: ; // nothing, only as array/matrix // no default to get compiler warning } |