summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dociter.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-03-25 09:30:57 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-03-26 01:41:17 -0400
commit0e9e3be6f51436c1e5bf1481a434a85e334c09ea (patch)
tree6e04594b107ba5730d5d24506d508da0fe8e435a /sc/source/core/data/dociter.cxx
parent459729627600fb057265479261ade74a55cd48d5 (diff)
More on ScCellIterator usage migration.
Change-Id: I4ee6b1b3ae110ebfb59a84d6e9fd509ce38ca28c
Diffstat (limited to 'sc/source/core/data/dociter.cxx')
-rw-r--r--sc/source/core/data/dociter.cxx26
1 files changed, 25 insertions, 1 deletions
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 8e503b84486d..fb39c8ade1a7 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1166,6 +1166,20 @@ ScFormulaCell* ScCellIterator::getFormulaCell()
return mpCurFormula;
}
+double ScCellIterator::getValue() const
+{
+ switch (meCurType)
+ {
+ case CELLTYPE_VALUE:
+ return mfCurValue;
+ case CELLTYPE_FORMULA:
+ return mpCurFormula->GetValue();
+ default:
+ ;
+ }
+ return 0.0;
+}
+
bool ScCellIterator::hasString() const
{
switch (meCurType)
@@ -1199,7 +1213,17 @@ bool ScCellIterator::hasNumeric() const
bool ScCellIterator::isEmpty() const
{
- return meCurType == CELLTYPE_NOTE || meCurType == CELLTYPE_NONE;
+ switch (meCurType)
+ {
+ case CELLTYPE_NOTE:
+ case CELLTYPE_NONE:
+ return true;
+ case CELLTYPE_FORMULA:
+ return mpCurFormula->IsEmpty();
+ default:
+ ;
+ }
+ return false;
}
namespace {