diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-26 18:42:19 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-27 00:07:15 -0400 |
commit | e45f3aa3580cb4ba05a778f192c60e42db8a3500 (patch) | |
tree | 496395d035c99ddac9c3b6e3825a59e6ca4800dd /sc/source/core/data/cellvalue.cxx | |
parent | aa054eff8ba5a1b7a3eb2a6814564317f0801f70 (diff) |
More on killing direct use of cell classes.
Change-Id: Ie2b6819652f330a493b7f9fe557736b27e402803
Diffstat (limited to 'sc/source/core/data/cellvalue.cxx')
-rw-r--r-- | sc/source/core/data/cellvalue.cxx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx index 5b853a32779a..e4f0c2e576b2 100644 --- a/sc/source/core/data/cellvalue.cxx +++ b/sc/source/core/data/cellvalue.cxx @@ -477,6 +477,38 @@ bool ScRefCellValue::hasNumeric() const return hasNumericImpl(meType, mpFormula); } +double ScRefCellValue::getValue() +{ + switch (meType) + { + case CELLTYPE_VALUE: + return mfValue; + case CELLTYPE_FORMULA: + return mpFormula->GetValue(); + default: + ; + } + return 0.0; +} + +OUString ScRefCellValue::getString() +{ + switch (meType) + { + case CELLTYPE_STRING: + return *mpString; + case CELLTYPE_EDIT: + if (mpEditText) + return ScEditUtil::GetString(*mpEditText); + break; + case CELLTYPE_FORMULA: + return mpFormula->GetString(); + default: + ; + } + return EMPTY_OUSTRING; +} + bool ScRefCellValue::isEmpty() const { return meType == CELLTYPE_NOTE || meType == CELLTYPE_NONE; |