diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-29 19:19:48 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-30 13:10:44 -0400 |
commit | e38d20c1e1146f2510f8482ea82fd0af3be67325 (patch) | |
tree | 2fb8c4ebf12f34bbd0f182c902b656a43a8d6719 /formula | |
parent | f07601a255eaad729fdb2fffc36336a4cd364501 (diff) |
Handle range references for group calculation. This is still untested.
Change-Id: I1eb1c217db66615028faa85720838579056dc150
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/vectortoken.cxx | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/formula/source/core/api/vectortoken.cxx b/formula/source/core/api/vectortoken.cxx index e016fd3700b0..74339397448b 100644 --- a/formula/source/core/api/vectortoken.cxx +++ b/formula/source/core/api/vectortoken.cxx @@ -12,11 +12,11 @@ namespace formula { SingleVectorRefToken::SingleVectorRefToken( const double* pArray, size_t nLength ) : - FormulaToken(svSingleVectorRef, ocPush), mpArray(pArray), mnLength(nLength) {} + FormulaToken(svSingleVectorRef, ocPush), mpArray(pArray), mnArrayLength(nLength) {} FormulaToken* SingleVectorRefToken::Clone() const { - return new SingleVectorRefToken(mpArray, mnLength); + return new SingleVectorRefToken(mpArray, mnArrayLength); } const double* SingleVectorRefToken::GetArray() const @@ -24,19 +24,19 @@ const double* SingleVectorRefToken::GetArray() const return mpArray; } -size_t SingleVectorRefToken::GetLength() const +size_t SingleVectorRefToken::GetArrayLength() const { - return mnLength; + return mnArrayLength; } DoubleVectorRefToken::DoubleVectorRefToken( - const std::vector<const double*>& rArrays, size_t nRowSize, bool bAbsStart, bool bAbsEnd ) : + const std::vector<const double*>& rArrays, size_t nArrayLength, size_t nRefRowSize, bool bStartFixed, bool bEndFixed ) : FormulaToken(svDoubleVectorRef, ocPush), - maArrays(rArrays), mnRowSize(nRowSize), mbAbsStart(bAbsStart), mbAbsEnd(bAbsEnd) {} + maArrays(rArrays), mnArrayLength(nArrayLength), mnRefRowSize(nRefRowSize), mbStartFixed(bStartFixed), mbEndFixed(bEndFixed) {} FormulaToken* DoubleVectorRefToken::Clone() const { - return new DoubleVectorRefToken(maArrays, mnRowSize, mbAbsStart, mbAbsEnd); + return new DoubleVectorRefToken(maArrays, mnArrayLength, mnRefRowSize, mbStartFixed, mbEndFixed); } const std::vector<const double*>& DoubleVectorRefToken::GetArrays() const @@ -44,6 +44,26 @@ const std::vector<const double*>& DoubleVectorRefToken::GetArrays() const return maArrays; } +size_t DoubleVectorRefToken::GetArrayLength() const +{ + return mnArrayLength; +} + +size_t DoubleVectorRefToken::GetRefRowSize() const +{ + return mnRefRowSize; +} + +bool DoubleVectorRefToken::IsStartFixed() const +{ + return mbStartFixed; +} + +bool DoubleVectorRefToken::IsEndFixed() const +{ + return mbEndFixed; +} + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |