sc/source/core/tool/interpr1.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit 40575c20ff9cd693b8a6d3627274ce6d745e0581 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Tue Sep 25 15:03:19 2012 -0400 Support opcodes 101 through 111 in SUBTOTAL. Excel 2007 supports them. So should we. Change-Id: I17253bc043bdcce451ee0a7ccf494ed0f84bf3cd diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 876748c..68269a3 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -6578,10 +6578,20 @@ void ScInterpreter::ScSubTotal() const FormulaToken* p = pStack[ sp - nParamCount ]; PushTempToken( *p ); int nFunc = (int) ::rtl::math::approxFloor( GetDouble() ); + bool bIncludeHidden = true; + if (nFunc > 100) + { + // For opcodes 101 through 111, we need to skip hidden cells. + // Other than that these opcodes are identical to 1 through 11. + bIncludeHidden = false; + nFunc -= 100; + } + if( nFunc < 1 || nFunc > 11 ) PushIllegalArgument(); // simulate return on stack, not SetError(...) else { + // TODO: Make use of bIncludeHidden flag. Then it's false, we do need to skip hidden cells. cPar = nParamCount - 1; glSubTotal = true; switch( nFunc ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits