sc/source/core/tool/interpr6.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
New commits: commit a985d4c2977ca23971f145b93a0155827bebfcdf Author: Winfried Donkers <winfrieddonk...@libreoffice.org> Date: Wed Apr 25 16:35:04 2018 +0200 Check if reference is to be ignored before counting. tdf#116706 related. Change-Id: If9f7326a411e537a5f797bcbe7d77af2c22ad352 Reviewed-on: https://gerrit.libreoffice.org/53454 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx index 4d5febc210e1..a9b48d061b3c 100644 --- a/sc/source/core/tool/interpr6.cxx +++ b/sc/source/core/tool/interpr6.cxx @@ -670,6 +670,13 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero ) return; } + if ( ( ( mnSubTotalFlags & SubtotalFlags::IgnoreFiltered ) && + pDok->RowFiltered( aAdr.Row(), aAdr.Tab() ) ) || + ( ( mnSubTotalFlags & SubtotalFlags::IgnoreHidden ) && + pDok->RowHidden( aAdr.Row(), aAdr.Tab() ) ) ) + { + break; + } if ( nGlobalError != FormulaError::NONE && ( eFunc == ifCOUNT2 || eFunc == ifCOUNT || ( mnSubTotalFlags & SubtotalFlags::IgnoreErrVal ) ) ) { @@ -678,13 +685,6 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero ) ++nCount; break; } - if ( ( ( mnSubTotalFlags & SubtotalFlags::IgnoreFiltered ) && - pDok->RowFiltered( aAdr.Row(), aAdr.Tab() ) ) || - ( ( mnSubTotalFlags & SubtotalFlags::IgnoreHidden ) && - pDok->RowHidden( aAdr.Row(), aAdr.Tab() ) ) ) - { - break; - } ScRefCellValue aCell(*pDok, aAdr); if (!aCell.isEmpty()) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits