summaryrefslogtreecommitdiff
path: root/sc/inc/cellvalue.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-03-25 23:22:18 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-03-26 01:41:20 -0400
commit0451d6e37d8a046e2de6408bcdc65057179b7eab (patch)
tree5fe9dcc497ea83392e298efc0ffe4b04077e93da /sc/inc/cellvalue.hxx
parent04a04dd7915f82186dd0ec5d277bbccb3b19d15f (diff)
Get the whole change tracking code entirely ScBaseCell-free!
This took me a whole day.... Change-Id: Ida757b1efa284fc9d071a225f45666c340ba89ea
Diffstat (limited to 'sc/inc/cellvalue.hxx')
-rw-r--r--sc/inc/cellvalue.hxx27
1 files changed, 21 insertions, 6 deletions
diff --git a/sc/inc/cellvalue.hxx b/sc/inc/cellvalue.hxx
index 16af46fc4c12..9dd3a9a72247 100644
--- a/sc/inc/cellvalue.hxx
+++ b/sc/inc/cellvalue.hxx
@@ -15,12 +15,13 @@
class ScDocument;
class ScFormulaCell;
class EditTextObject;
+class ScBaseCell;
/**
* Store arbitrary cell value of any kind. It only stores cell value and
* nothing else.
*/
-struct ScCellValue
+struct SC_DLLPUBLIC ScCellValue
{
CellType meType;
union {
@@ -45,10 +46,24 @@ struct ScCellValue
*/
void assign( const ScDocument& rDoc, const ScAddress& rPos );
+ void assign( const ScCellValue& rOther, ScDocument& rDestDoc, int nCloneFlags = SC_CLONECELL_DEFAULT );
+
+ /**
+ * TODO: Remove this later.
+ */
+ void assign( const ScBaseCell& rCell );
+
/**
* Set cell value at specified position in specified document.
*/
- void commit( ScDocument& rDoc, const ScAddress& rPos );
+ void commit( ScDocument& rDoc, const ScAddress& rPos ) const;
+
+ /**
+ * Set cell value at specified position in specified document. But unlike
+ * commit(), this method sets the original value to the document without
+ * copying. After this call, the value gets cleared.
+ */
+ void release( ScDocument& rDoc, const ScAddress& rPos );
bool hasString() const;
@@ -57,11 +72,11 @@ struct ScCellValue
bool isEmpty() const;
bool equalsWithoutFormat( const ScCellValue& r ) const;
-};
-// TODO: temporary workaround. To be removed later.
-class ScBaseCell;
-ScBaseCell* getHackedBaseCell( ScDocument* pDoc, const ScCellValue& rVal );
+ ScCellValue& operator= ( const ScCellValue& r );
+
+ void swap( ScCellValue& r );
+};
#endif