From 1fd0ab0c53e73b50857e5bfed4b307468202354f Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 10 Jul 2013 19:34:34 -0400 Subject: Move these methods out of ScColumn since they don't operate on column. Change-Id: I1a03b9b18dd236138306fd545e961a5443e22bc8 --- sc/inc/sharedformula.hxx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'sc/inc/sharedformula.hxx') diff --git a/sc/inc/sharedformula.hxx b/sc/inc/sharedformula.hxx index fcab6d7dba0d..6767d4a2c151 100644 --- a/sc/inc/sharedformula.hxx +++ b/sc/inc/sharedformula.hxx @@ -11,6 +11,7 @@ #define SC_SHAREDFORMULA_HXX #include "formulacell.hxx" +#include "mtvelements.hxx" namespace sc { @@ -18,6 +19,10 @@ class SharedFormulaUtil { public: + /** + * Group formula cells stored in the passed container. The formula cells + * in the container are assumed to be all non-shared. + */ template static void groupFormulaCells(const _Iter& itBeg, const _Iter& itEnd) { @@ -49,6 +54,25 @@ public: pCur->SetCellGroup(xGroup); } } + + /** + * Split existing shared formula range at specified position. The cell at + * specified position becomes the top cell of the lower shared formula + * range after this call. This method does nothing if the cell at + * specified position is not a formula cell. + * + * @param aPos position of cell to examine. + */ + static void splitFormulaCellGroup(const CellStoreType::position_type& aPos); + + /** + * Merge with an existing formula group (if any) located immediately above + * if the cell at specified position is a formula cell, and its formula + * tokens are identical to that of the above formula group. + * + * @param aPos position of cell to examine. + */ + static void joinFormulaCellAbove(const CellStoreType::position_type& aPos); }; } -- cgit v1.2.3