[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sc/source

Eike Rathke (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 17 08:56:24 UTC 2019


 sc/source/core/tool/interpr6.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 9b600f1aeb861219bf70a2941e3899ee545eff98
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Fri Sep 6 13:53:28 2019 +0200
Commit:     Xisco FaulĂ­ <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 17 10:55:50 2019 +0200

    Resolves: tdf#98844 calculate as shown with SUM() again
    
    Change-Id: I0032bdb9a8f54baa2e599861e45691a255f45275
    Reviewed-on: https://gerrit.libreoffice.org/78708
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 4321d8c8b09fd880a18b4106cdd1f90acc18a861)
    Reviewed-on: https://gerrit.libreoffice.org/78728
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index 466cbb307f12..8fab8eaabacd 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 )


More information about the Libreoffice-commits mailing list