diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-15 14:56:44 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-18 23:22:39 -0400 |
commit | 7586151cbea2d3b93b42a42aa8dd157e75ca4f60 (patch) | |
tree | d36752372db3648e011ca6c078897a8ddf832d78 /include/formula | |
parent | 3164924fac45a377b3620ca68e7658be19999359 (diff) |
Allow vector array tokens to store both numeric and string values.
This is achieved by storing two physical arrays in each vector
reference array.
Change-Id: Iafb9e57b86e57e75eed8ff692a6d882c2049f710
Diffstat (limited to 'include/formula')
-rw-r--r-- | include/formula/vectortoken.hxx | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/include/formula/vectortoken.hxx b/include/formula/vectortoken.hxx index 9bc82f345e33..54043b114990 100644 --- a/include/formula/vectortoken.hxx +++ b/include/formula/vectortoken.hxx @@ -14,14 +14,28 @@ namespace formula { +/** + * Single unit of vector reference consists of two physical arrays. + * + * <p>If the whole data array consists of only numeric values, mpStringArray + * will be NULL, and NaN values in the numeric array represent empty + * cells.</p> + * + * <p>If the whole data array consists of only string values, mpNumericArray + * will be NULL, and NULL values in the string array represent empty + * cells.</p> + * + * <p>If the data array consists of numeric and string values, then both + * mpNumericArray and mpStringArray will be non-NULL, and a string cell will + * be represented by a non-NULL pointer value in the string array. If the + * string value is NULL, check the corresponding value in the numeric array. + * If the value in the numeric array is NaN, it's an empty cell, otherwise + * it's a numeric cell.</p> + */ struct FORMULA_DLLPUBLIC VectorRefArray { - union { - const double* mpNumericArray; - rtl_uString** mpStringArray; - }; - - bool mbNumeric; + const double* mpNumericArray; + rtl_uString** mpStringArray; VectorRefArray(); VectorRefArray( const double* pArray ); |