summaryrefslogtreecommitdiff
path: root/sc/inc/sharedformula.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-07-10 19:34:34 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-07-11 00:25:38 -0400
commit1fd0ab0c53e73b50857e5bfed4b307468202354f (patch)
treee280e158dce2b6674267aa486c38a61a5e30e9ea /sc/inc/sharedformula.hxx
parent0797dd8714413f8319515df9831a86703b589558 (diff)
Move these methods out of ScColumn since they don't operate on column.
Change-Id: I1a03b9b18dd236138306fd545e961a5443e22bc8
Diffstat (limited to 'sc/inc/sharedformula.hxx')
-rw-r--r--sc/inc/sharedformula.hxx24
1 files changed, 24 insertions, 0 deletions
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 <b>non-shared</b>.
+ */
template<typename _Iter>
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);
};
}