summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpitemdata.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-03-09 12:51:07 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-03-09 13:31:27 -0500
commit57e531eff640c7e41bf14c54d02000f45d63d6c4 (patch)
tree172767a0ef23821850555d2c4734d082edde3d85 /sc/source/core/data/dpitemdata.cxx
parent8efa446a367546802545332db1bb68a77dc59e4c (diff)
Bit more organized & Error item has string too.
Diffstat (limited to 'sc/source/core/data/dpitemdata.cxx')
-rw-r--r--sc/source/core/data/dpitemdata.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx
index 2870a5c784b1..77c01b94c6de 100644
--- a/sc/source/core/data/dpitemdata.cxx
+++ b/sc/source/core/data/dpitemdata.cxx
@@ -248,14 +248,19 @@ ScDPItemData& ScDPItemData::operator= (const ScDPItemData& r)
sal_uInt8 ScDPItemData::GetCellType() const
{
- if (meType == Error)
- return SC_VALTYPE_ERROR;
- else if (meType == Empty)
- return SC_VALTYPE_EMPTY;
- else if ( IsValue())
- return SC_VALTYPE_VALUE;
- else
- return SC_VALTYPE_STRING;
+ switch (meType)
+ {
+ case Error:
+ return SC_VALTYPE_ERROR;
+ case Empty:
+ return SC_VALTYPE_EMPTY;
+ case Value:
+ return SC_VALTYPE_VALUE;
+ default:
+ ;
+ }
+
+ return SC_VALTYPE_STRING;
}
#if DEBUG_DP_ITEM_DATA
@@ -342,7 +347,7 @@ ScDPItemData::GroupValueAttr ScDPItemData::GetGroupValue() const
bool ScDPItemData::HasStringData() const
{
- return meType == String;
+ return meType == String || meType == Error;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */