diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-14 16:23:11 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-14 16:25:38 -0400 |
commit | b6b0b95bae845a2a59831f4e3ae63de3e54a2984 (patch) | |
tree | 87f6b12bc3d01390701454ab6aa77d25f0d00597 /formula/source | |
parent | 0c53ccd11f6a4318c29fd76cbc3de4e80dff769c (diff) |
Bail out of group calculation in case the array fetching fails.
Change-Id: Ibb7575eeb025fc025d05b147629113796185c5d3
Diffstat (limited to 'formula/source')
-rw-r--r-- | formula/source/core/api/vectortoken.cxx | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/formula/source/core/api/vectortoken.cxx b/formula/source/core/api/vectortoken.cxx index bd75efba9e98..c1ff94c82146 100644 --- a/formula/source/core/api/vectortoken.cxx +++ b/formula/source/core/api/vectortoken.cxx @@ -11,15 +11,34 @@ namespace formula { -VectorRefArray::VectorRefArray() : mpNumericArray(NULL), mpStringArray(NULL) {} -VectorRefArray::VectorRefArray( const double* pArray ) : mpNumericArray(pArray), mpStringArray(NULL) {} -VectorRefArray::VectorRefArray( rtl_uString** pArray ) : mpNumericArray(NULL), mpStringArray(pArray) {} +VectorRefArray::VectorRefArray() : + mpNumericArray(NULL), + mpStringArray(NULL), + mbValid(true) {} + +VectorRefArray::VectorRefArray( InitInvalid ) : + mpNumericArray(NULL), + mpStringArray(NULL), + mbValid(false) {} + +VectorRefArray::VectorRefArray( const double* pArray ) : + mpNumericArray(pArray), + mpStringArray(NULL), + mbValid(true) {} + +VectorRefArray::VectorRefArray( rtl_uString** pArray ) : + mpNumericArray(NULL), + mpStringArray(pArray), + mbValid(true) {} + VectorRefArray::VectorRefArray( const double* pNumArray, rtl_uString** pStrArray ) : - mpNumericArray(pNumArray), mpStringArray(pStrArray) {} + mpNumericArray(pNumArray), + mpStringArray(pStrArray), + mbValid(true) {} bool VectorRefArray::isValid() const { - return mpNumericArray || mpStringArray; + return mbValid; } SingleVectorRefToken::SingleVectorRefToken( const VectorRefArray& rArray, size_t nReqLength, size_t nArrayLength ) : |