summaryrefslogtreecommitdiff
path: root/sc/inc/cellvalue.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-06-18 11:50:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-18 16:38:57 +0200
commita5d355fef3896f3109c74c153f2a34b82fe6be38 (patch)
tree6dd321ad8dfa8c4b70b3ba4cc373e9c4aed01ccd /sc/inc/cellvalue.hxx
parent634f13a722dc68b7a2df7518880ce4f9d5d89f19 (diff)
clean up Sc*CellValue
after my recent commits (*) make more fields private (*) rename fields (remove suffix "1") now that I am sure I got everything. Change-Id: I0f8b9b1a534181c8b66532f9da5a0d16aa049cf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/cellvalue.hxx')
-rw-r--r--sc/inc/cellvalue.hxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/inc/cellvalue.hxx b/sc/inc/cellvalue.hxx
index caf42d2c0155..5cf4cb3ba57d 100644
--- a/sc/inc/cellvalue.hxx
+++ b/sc/inc/cellvalue.hxx
@@ -30,8 +30,10 @@ struct ColumnBlockPosition;
*/
struct SC_DLLPUBLIC ScCellValue
{
+private:
/// bool is there to indicate CellType::NONE
std::variant<bool, double, svl::SharedString, EditTextObject*, ScFormulaCell*> maData;
+public:
ScCellValue();
ScCellValue( const ScRefCellValue& rCell );
@@ -102,17 +104,15 @@ struct SC_DLLPUBLIC ScCellValue
*/
struct SC_DLLPUBLIC ScRefCellValue
{
- /// bool is there to indicate CellType::NONE
- std::variant<bool, double, svl::SharedString, EditTextObject*, ScFormulaCell*> maData;
private:
CellType meType;
-public:
union {
- double mfValue1;
+ double mfValue;
const svl::SharedString* mpString;
- const EditTextObject* mpEditText1;
- ScFormulaCell* mpFormula1;
+ const EditTextObject* mpEditText;
+ ScFormulaCell* mpFormula;
};
+public:
ScRefCellValue();
ScRefCellValue( double fValue );
@@ -129,10 +129,10 @@ public:
void clear();
CellType getType() const { return meType; }
- double getDouble() const { assert(meType == CELLTYPE_VALUE); return mfValue1; }
+ double getDouble() const { assert(meType == CELLTYPE_VALUE); return mfValue; }
const svl::SharedString* getSharedString() const { assert(meType == CELLTYPE_STRING); return mpString; }
- const EditTextObject* getEditText() const { assert(meType == CELLTYPE_EDIT); return mpEditText1; }
- ScFormulaCell* getFormula() const { assert(meType == CELLTYPE_FORMULA); return mpFormula1; }
+ const EditTextObject* getEditText() const { assert(meType == CELLTYPE_EDIT); return mpEditText; }
+ ScFormulaCell* getFormula() const { assert(meType == CELLTYPE_FORMULA); return mpFormula; }
/**
* Take cell value from specified position in specified document.