summaryrefslogtreecommitdiff
path: root/include/formula
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-02-26 14:32:57 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-02-27 21:19:36 -0500
commit6ef6dd0122b8e44d8547ec31f40def42173e4e41 (patch)
tree56fbc756f7fdd0a1ef333d3b1231eb3e01c58fee /include/formula
parent95b401558466954453d490456be01beb6d747806 (diff)
Store the length of originally requested array size prior to trimming.
This change adds GetRequestedArrayLength() method to both single and double vector ref tokens, which returns the length of the requested array size prior to trimming of the trailing empty cell region. Change-Id: Iaba96fa2ea4ff3c8bccb0bc86fa4f1525e2f45fb
Diffstat (limited to 'include/formula')
-rw-r--r--include/formula/vectortoken.hxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/formula/vectortoken.hxx b/include/formula/vectortoken.hxx
index f04fef4e1b72..5fa596b57c00 100644
--- a/include/formula/vectortoken.hxx
+++ b/include/formula/vectortoken.hxx
@@ -52,15 +52,17 @@ struct FORMULA_DLLPUBLIC VectorRefArray
class FORMULA_DLLPUBLIC SingleVectorRefToken : public FormulaToken
{
VectorRefArray maArray;
+ size_t mnRequestedLength;
size_t mnArrayLength;
public:
- SingleVectorRefToken( const double* pArray, size_t nLength );
- SingleVectorRefToken( const VectorRefArray& rArray, size_t nLength );
+ SingleVectorRefToken( const double* pArray, size_t nReqLength, size_t nArrayLength );
+ SingleVectorRefToken( const VectorRefArray& rArray, size_t nReqLength, size_t nArrayLength );
virtual FormulaToken* Clone() const;
const VectorRefArray& GetArray() const;
+ size_t GetRequestedArrayLength() const;
size_t GetArrayLength() const;
};
@@ -72,7 +74,8 @@ class FORMULA_DLLPUBLIC DoubleVectorRefToken : public FormulaToken
{
std::vector<VectorRefArray> maArrays;
- size_t mnArrayLength; /// length of all arrays.
+ size_t mnRequestedLength; /// requested length of all arrays which include trailing empty region.
+ size_t mnArrayLength; /// length of all arrays which does not include trailing empty region.
size_t mnRefRowSize; /// original reference row size. The row size may
/// change as it goes down the array if either the
/// stard or end position is fixed.
@@ -82,11 +85,13 @@ class FORMULA_DLLPUBLIC DoubleVectorRefToken : public FormulaToken
public:
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 );
virtual FormulaToken* Clone() const;
const std::vector<VectorRefArray>& GetArrays() const;
+ size_t GetRequestedArrayLength() const;
size_t GetArrayLength() const;
size_t GetRefRowSize() const;
bool IsStartFixed() const;