From 6ca8d2c895d729510c8345db79db95016db5e3ba Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 13 Dec 2018 16:37:08 +0100 Subject: Add SUBTOTAL_FUNC_SELECTION_COUNT to ScFunctionData::update() and getResult() Change-Id: Ie72854a812c9ea73ded6a3e8ed8992dcc73f40ad Reviewed-on: https://gerrit.libreoffice.org/65112 Tested-by: Jenkins Reviewed-by: Eike Rathke --- sc/source/core/tool/subtotal.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sc/source') diff --git a/sc/source/core/tool/subtotal.cxx b/sc/source/core/tool/subtotal.cxx index ad657815b06c..44bec5477756 100644 --- a/sc/source/core/tool/subtotal.cxx +++ b/sc/source/core/tool/subtotal.cxx @@ -86,6 +86,9 @@ void ScFunctionData::update( double fNewVal ) case SUBTOTAL_FUNC_CNT2: ++nCount; break; + case SUBTOTAL_FUNC_SELECTION_COUNT: + nCount += fNewVal; + break; case SUBTOTAL_FUNC_AVE: if (!SubTotal::SafePlus(nVal, fNewVal)) bError = true; @@ -132,6 +135,7 @@ double ScFunctionData::getResult() { case SUBTOTAL_FUNC_CNT: case SUBTOTAL_FUNC_CNT2: + case SUBTOTAL_FUNC_SELECTION_COUNT: fRet = nCount; break; case SUBTOTAL_FUNC_SUM: -- cgit