[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source
Eike Rathke
erack at kemper.freedesktop.org
Sat Dec 10 11:30:26 PST 2011
sc/source/core/tool/interpr1.cxx | 41 +++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
New commits:
commit f7e552b202dc1d155f731e3da18737ea6c13e75f
Author: Eike Rathke <erack at 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 );
More information about the Libreoffice-commits
mailing list