diff options
author | Eike Rathke <erack@redhat.com> | 2011-12-10 20:29:06 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-12-10 20:29:58 +0100 |
commit | f7e552b202dc1d155f731e3da18737ea6c13e75f (patch) | |
tree | 39329ea2f0ac174ffa5dfee34120b348c390e392 | |
parent | 3d5e50860ea9375acad9c42f2aefbbf6d7a1866e (diff) |
fixed fdo#43700 ROWS(), COLUMNS() and SHEETS() don't work with external references
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 862e92b05670..a76d2b6c2526 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 ); |