Kaydet (Commit) f2ac4ff6 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#51266: Properly set pivot item 'empty' on empty cells.

Or else it would re-use the last non-empty cell value which is wrong.

Change-Id: I3feab09a54e93150a7b6a9e9b4b540327f2ab5c5
üst a54230f3
...@@ -89,6 +89,7 @@ public: ...@@ -89,6 +89,7 @@ public:
~ScDPItemData(); ~ScDPItemData();
Type GetType() const; Type GetType() const;
void SetEmpty();
void SetString(const rtl::OUString& rS); void SetString(const rtl::OUString& rS);
void SetString(const rtl::OUString* pS); void SetString(const rtl::OUString* pS);
void SetValue(double fVal); void SetValue(double fVal);
......
...@@ -161,6 +161,8 @@ void initFromCell( ...@@ -161,6 +161,8 @@ void initFromCell(
{ {
rData.SetString(rCache.InternString(aDocStr)); rData.SetString(rCache.InternString(aDocStr));
} }
else
rData.SetEmpty();
} }
void getItemValue( void getItemValue(
......
...@@ -138,6 +138,12 @@ ScDPItemData::Type ScDPItemData::GetType() const ...@@ -138,6 +138,12 @@ ScDPItemData::Type ScDPItemData::GetType() const
return static_cast<Type>(meType); return static_cast<Type>(meType);
} }
void ScDPItemData::SetEmpty()
{
DisposeString();
meType = Empty;
}
void ScDPItemData::SetString(const rtl::OUString& rS) void ScDPItemData::SetString(const rtl::OUString& rS)
{ {
DisposeString(); DisposeString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment