summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpitemdata.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-03-05 13:49:05 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-03-09 11:13:29 -0500
commitdb60d94fc2ec8624653dddace5a934778fc2c7b4 (patch)
tree92d853aa4ac3bb4ff856d8b99296aa1541415d0d /sc/source/core/data/dpitemdata.cxx
parentf63490ca0fb365b419e143ffc694463d45865c74 (diff)
Fix the result hierarchy construction. Still lots of places remain broken.
Diffstat (limited to 'sc/source/core/data/dpitemdata.cxx')
-rw-r--r--sc/source/core/data/dpitemdata.cxx35
1 files changed, 35 insertions, 0 deletions
diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx
index b74eb85d9f1c..b710ed3b304c 100644
--- a/sc/source/core/data/dpitemdata.cxx
+++ b/sc/source/core/data/dpitemdata.cxx
@@ -93,6 +93,11 @@ ScDPItemData::~ScDPItemData()
delete mpString;
}
+ScDPItemData::Type ScDPItemData::GetType() const
+{
+ return meType;
+}
+
void ScDPItemData::SetString(const rtl::OUString& rS)
{
if (meType == String)
@@ -201,6 +206,35 @@ sal_uInt8 ScDPItemData::GetCellType() const
return SC_VALTYPE_STRING;
}
+#if DEBUG_DP_ITEM_DATA
+void ScDPItemData::Dump(const char* msg) const
+{
+ printf("--- (%s)\n", msg);
+ switch (meType)
+ {
+ case Empty:
+ printf("empty\n");
+ break;
+ case Error:
+ printf("error\n");
+ break;
+ case GroupValue:
+ printf("group value: group type = %d value = %d\n",
+ maGroupValue.mnGroupType, maGroupValue.mnValue);
+ break;
+ case String:
+ printf("string\n");
+ break;
+ case Value:
+ printf("value: %g\n", mfValue);
+ break;
+ default:
+ printf("unknown type\n");
+ }
+ printf("---\n");
+}
+#endif
+
bool ScDPItemData::IsEmpty() const
{
return meType == Empty;
@@ -216,6 +250,7 @@ rtl::OUString ScDPItemData::GetString() const
switch (meType)
{
case String:
+ case Error:
return *mpString;
case Value:
return rtl::OUString::valueOf(mfValue);