diff options
author | Eike Rathke <erack@redhat.com> | 2019-09-06 13:53:28 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2019-09-06 17:26:44 +0200 |
commit | 4321d8c8b09fd880a18b4106cdd1f90acc18a861 (patch) | |
tree | 7369b58b983387a7554566724b96adf2f41aba73 /sc/source/core | |
parent | cc876706b1626078ee056c35f7dda1efcc315df9 (diff) |
Resolves: tdf#98844 calculate as shown with SUM() again
Change-Id: I0032bdb9a8f54baa2e599861e45691a255f45275
Reviewed-on: https://gerrit.libreoffice.org/78708
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/tool/interpr6.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx index cbeaa8a2443a..3a77be206acc 100644 --- a/sc/source/core/tool/interpr6.cxx +++ b/sc/source/core/tool/interpr6.cxx @@ -817,8 +817,12 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero ) if ( nGlobalError != FormulaError::NONE ) nGlobalError = FormulaError::NONE; } - else if ( ( eFunc == ifSUM || eFunc == ifCOUNT ) && mnSubTotalFlags == SubtotalFlags::NONE ) + else if (((eFunc == ifSUM && !bCalcAsShown) || eFunc == ifCOUNT ) + && mnSubTotalFlags == SubtotalFlags::NONE) { + // Use fast span set array method. + // ifSUM with bCalcAsShown has to use the slow bells and + // whistles ScValueIterator below. sc::RangeColumnSpanSet aSet( aRange ); if ( eFunc == ifSUM ) |