diff options
author | Eike Rathke <erack@redhat.com> | 2017-05-09 22:13:35 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-05-10 00:39:58 +0200 |
commit | f39e1b1079b04c8d14d3fa4a00d2cf519dba05a5 (patch) | |
tree | 531bad639e8f1f260b6fdc429e52dde81b87cd45 /formula | |
parent | 031bf555256f8f827b4f32124f88c4012d28dcd3 (diff) |
Change IsForceArrayParameter() to GetForceArrayParameter(), tdf#107724 prep
Change-Id: Icd3400e4ee1c69860908a2ad0ca6e52879f2f725
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 767f4da86a7a..039b41a0d3ea 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -2539,9 +2539,9 @@ void FormulaCompiler::LocalizeString( OUString& /*rName*/ ) const { } -bool FormulaCompiler::IsForceArrayParameter( const FormulaToken* /*pToken*/, sal_uInt16 /*nParam*/ ) const +formula::ParamClass FormulaCompiler::GetForceArrayParameter( const FormulaToken* /*pToken*/, sal_uInt16 /*nParam*/ ) const { - return false; + return ParamClass::Unknown; } void FormulaCompiler::ForceArrayOperator( FormulaTokenRef& rCurr ) @@ -2558,9 +2558,13 @@ void FormulaCompiler::ForceArrayOperator( FormulaTokenRef& rCurr ) return; } - if (nCurrentFactorParam && IsForceArrayParameter( pCurrentFactorToken.get(), - static_cast<sal_uInt8>(nCurrentFactorParam - 1))) - rCurr->SetInForceArray( true); + if (nCurrentFactorParam > 0) + { + formula::ParamClass eType = GetForceArrayParameter( pCurrentFactorToken.get(), + static_cast<sal_uInt8>(nCurrentFactorParam - 1)); + if (eType == ParamClass::ForceArray || eType == ParamClass::ReferenceOrForceArray) + rCurr->SetInForceArray( true); + } } void FormulaCompiler::CheckSetForceArrayParameter( FormulaTokenRef& rCurr, sal_uInt8 nParam ) |