diff options
-rw-r--r-- | sc/inc/dpitemdata.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/dpcache.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpitemdata.cxx | 6 |
3 files changed, 9 insertions, 0 deletions
diff --git a/sc/inc/dpitemdata.hxx b/sc/inc/dpitemdata.hxx index 67f4af20300d..e294de8c412f 100644 --- a/sc/inc/dpitemdata.hxx +++ b/sc/inc/dpitemdata.hxx @@ -89,6 +89,7 @@ public: ~ScDPItemData(); Type GetType() const; + void SetEmpty(); void SetString(const rtl::OUString& rS); void SetString(const rtl::OUString* pS); void SetValue(double fVal); diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 742b6eb7a654..9163dde2f934 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -161,6 +161,8 @@ void initFromCell( { rData.SetString(rCache.InternString(aDocStr)); } + else + rData.SetEmpty(); } void getItemValue( diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx index 1bcc3a6ecb9a..1641572f087e 100644 --- a/sc/source/core/data/dpitemdata.cxx +++ b/sc/source/core/data/dpitemdata.cxx @@ -138,6 +138,12 @@ ScDPItemData::Type ScDPItemData::GetType() const return static_cast<Type>(meType); } +void ScDPItemData::SetEmpty() +{ + DisposeString(); + meType = Empty; +} + void ScDPItemData::SetString(const rtl::OUString& rS) { DisposeString(); |