sc/source/core/tool/interpr1.cxx | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
New commits: commit f7e552b202dc1d155f731e3da18737ea6c13e75f Author: Eike Rathke <er...@redhat.com> Date: Sat Dec 10 20:29:06 2011 +0100 fixed fdo#43700 ROWS(), COLUMNS() and SHEETS() don't work with external references diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 862e92b..a76d2b6 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -4174,6 +4174,20 @@ void ScInterpreter::ScColumns() } } break; + case svExternalSingleRef: + PopError(); + nVal++; + break; + case svExternalDoubleRef: + { + sal_uInt16 nFileId; + String aTabName; + ScComplexRefData aRef; + PopExternalDoubleRef( nFileId, aTabName, aRef); + nVal += static_cast<sal_uLong>(aRef.Ref2.nTab - aRef.Ref1.nTab + 1) * + static_cast<sal_uLong>(aRef.Ref2.nCol - aRef.Ref1.nCol + 1); + } + break; default: PopError(); SetError(errIllegalParameter); @@ -4218,6 +4232,20 @@ void ScInterpreter::ScRows() } } break; + case svExternalSingleRef: + PopError(); + nVal++; + break; + case svExternalDoubleRef: + { + sal_uInt16 nFileId; + String aTabName; + ScComplexRefData aRef; + PopExternalDoubleRef( nFileId, aTabName, aRef); + nVal += static_cast<sal_uLong>(aRef.Ref2.nTab - aRef.Ref1.nTab + 1) * + static_cast<sal_uLong>(aRef.Ref2.nRow - aRef.Ref1.nRow + 1); + } + break; default: PopError(); SetError(errIllegalParameter); @@ -4258,6 +4286,19 @@ void ScInterpreter::ScTables() PopError(); nVal++; break; + case svExternalSingleRef: + PopError(); + nVal++; + break; + case svExternalDoubleRef: + { + sal_uInt16 nFileId; + String aTabName; + ScComplexRefData aRef; + PopExternalDoubleRef( nFileId, aTabName, aRef); + nVal += static_cast<sal_uLong>(aRef.Ref2.nTab - aRef.Ref1.nTab + 1); + } + break; default: PopError(); SetError( errIllegalParameter ); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits