summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/vectortoken.cxx29
1 files changed, 21 insertions, 8 deletions
diff --git a/formula/source/core/api/vectortoken.cxx b/formula/source/core/api/vectortoken.cxx
index 961eda6d60c9..57476f4fb512 100644
--- a/formula/source/core/api/vectortoken.cxx
+++ b/formula/source/core/api/vectortoken.cxx
@@ -22,15 +22,15 @@ bool VectorRefArray::isValid() const
return mpNumericArray || mpStringArray;
}
-SingleVectorRefToken::SingleVectorRefToken( const double* pArray, size_t nLength ) :
- FormulaToken(svSingleVectorRef, ocPush), maArray(pArray), mnArrayLength(nLength) {}
+SingleVectorRefToken::SingleVectorRefToken( const double* pArray, size_t nReqLength, size_t nArrayLength ) :
+ FormulaToken(svSingleVectorRef, ocPush), maArray(pArray), mnRequestedLength(nReqLength), mnArrayLength(nArrayLength) {}
-SingleVectorRefToken::SingleVectorRefToken( const VectorRefArray& rArray, size_t nLength ) :
- FormulaToken(svSingleVectorRef, ocPush), maArray(rArray), mnArrayLength(nLength) {}
+SingleVectorRefToken::SingleVectorRefToken( const VectorRefArray& rArray, size_t nReqLength, size_t nArrayLength ) :
+ FormulaToken(svSingleVectorRef, ocPush), maArray(rArray), mnRequestedLength(nReqLength), mnArrayLength(nArrayLength) {}
FormulaToken* SingleVectorRefToken::Clone() const
{
- return new SingleVectorRefToken(maArray, mnArrayLength);
+ return new SingleVectorRefToken(maArray, mnRequestedLength, mnArrayLength);
}
const VectorRefArray& SingleVectorRefToken::GetArray() const
@@ -38,19 +38,27 @@ const VectorRefArray& SingleVectorRefToken::GetArray() const
return maArray;
}
+size_t SingleVectorRefToken::GetRequestedArrayLength() const
+{
+ return mnRequestedLength;
+}
+
size_t SingleVectorRefToken::GetArrayLength() const
{
return mnArrayLength;
}
DoubleVectorRefToken::DoubleVectorRefToken(
- const std::vector<VectorRefArray>& rArrays, size_t nArrayLength, size_t nRefRowSize, bool bStartFixed, bool bEndFixed ) :
+ const std::vector<VectorRefArray>& rArrays, size_t nReqLength, size_t nArrayLength,
+ size_t nRefRowSize, bool bStartFixed, bool bEndFixed ) :
FormulaToken(svDoubleVectorRef, ocPush),
- maArrays(rArrays), mnArrayLength(nArrayLength), mnRefRowSize(nRefRowSize), mbStartFixed(bStartFixed), mbEndFixed(bEndFixed) {}
+ maArrays(rArrays), mnRequestedLength(nReqLength), mnArrayLength(nArrayLength),
+ mnRefRowSize(nRefRowSize), mbStartFixed(bStartFixed), mbEndFixed(bEndFixed) {}
FormulaToken* DoubleVectorRefToken::Clone() const
{
- return new DoubleVectorRefToken(maArrays, mnArrayLength, mnRefRowSize, mbStartFixed, mbEndFixed);
+ return new DoubleVectorRefToken(
+ maArrays, mnRequestedLength, mnArrayLength, mnRefRowSize, mbStartFixed, mbEndFixed);
}
const std::vector<VectorRefArray>& DoubleVectorRefToken::GetArrays() const
@@ -58,6 +66,11 @@ const std::vector<VectorRefArray>& DoubleVectorRefToken::GetArrays() const
return maArrays;
}
+size_t DoubleVectorRefToken::GetRequestedArrayLength() const
+{
+ return mnRequestedLength;
+}
+
size_t DoubleVectorRefToken::GetArrayLength() const
{
return mnArrayLength;