diff options
author | Eike Rathke <erack@redhat.com> | 2017-05-12 17:48:53 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-05-12 17:54:36 +0200 |
commit | 534746c99e88270ec766aeb12970a282a0a16520 (patch) | |
tree | 3ceec49c4763a5ffb8b3195a3c35d826cf3dc2d3 /include | |
parent | c882c60f54cc90740a674eed8c47bde0e9959652 (diff) |
Introduce and check FormulaTokenArray::mbFinalized to not add further tokens
Obviously after FormulaTokenArray::Assign() or the copy-ctor for that matter,
new tokens can not be added anymore to the shrunk code array. We don't do it,
but ensure that it isn't done in future..
Change-Id: Ibc0115f9f38e9745028a7459c61408c188783d03
Diffstat (limited to 'include')
-rw-r--r-- | include/formula/tokenarray.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx index 39e326b63ade..f7a8228a0d0e 100644 --- a/include/formula/tokenarray.hxx +++ b/include/formula/tokenarray.hxx @@ -125,9 +125,10 @@ protected: sal_uInt16 nIndex; // Current step index FormulaError nError; // Error code ScRecalcMode nMode; // Flags to indicate when to recalc this code - bool bHyperLink; // If HYPERLINK() occurs in the formula. - bool mbFromRangeName; // If this array originates from a named expression - bool mbShareable; // Whether or not it can be shared with adjacent cells. + bool bHyperLink :1; // If HYPERLINK() occurs in the formula. + bool mbFromRangeName :1; // If this array originates from a named expression + bool mbShareable :1; // Whether or not it can be shared with adjacent cells. + bool mbFinalized :1; // Whether code arrays have their final used size and no more tokens can be added. protected: void Assign( const FormulaTokenArray& ); |