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:06 +0100 |
commit | 53b3df94dbd44b220f6531fe1cf2c83f3b1849d0 (patch) | |
tree | 9089fe42d48a70c444df9e60effa843b342362e2 /sc | |
parent | 91d4fe75eed800fd37211555b09cac0af3b1d640 (diff) |
fixed fdo#43700 ROWS(), COLUMNS() and SHEETS() don't work with external references
Diffstat (limited to 'sc')
-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 ); |