From e944d9510404d8c67b3867d7cd9f313fd5091004 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 17 Oct 2016 23:19:23 -0400 Subject: tdf#93894: Prohibit grouping when certain token types are present. For instance, column / row label tokens don't work correctly in grouped cells with the current implementation. Change-Id: Idf86312ef15fbfd4382aa90ee6d131c671a80683 --- include/formula/tokenarray.hxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/formula') diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx index 1c6ed2256f79..cdb4e34e58c1 100644 --- a/include/formula/tokenarray.hxx +++ b/include/formula/tokenarray.hxx @@ -127,6 +127,7 @@ protected: 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. protected: void Assign( const FormulaTokenArray& ); @@ -190,6 +191,16 @@ public: void SetFromRangeName( bool b ) { mbFromRangeName = b; } bool IsFromRangeName() const { return mbFromRangeName; } + void SetShareable( bool b ) { mbShareable = b; } + + /** + * Check if this token array is shareable between multiple adjacent + * formula cells. Certain tokens may not function correctly when shared. + * + * @return true if the token array is shareable, false otherwise. + */ + bool IsShareable() const { return mbShareable; } + void Clear(); void DelRPN(); FormulaToken* First() { nIndex = 0; return Next(); } -- cgit