summaryrefslogtreecommitdiff
path: root/sc/inc/dptabsrc.hxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-07-24 10:53:33 +0200
committerEike Rathke <erack@redhat.com>2012-07-24 11:12:21 +0200
commit3536fcd999f16525f20a1fff5c2512b565511d7b (patch)
tree04207644167d26cb07b0b0242911945206496d36 /sc/inc/dptabsrc.hxx
parentdbbc38c174e8a924e2f26b9c21c84cccd17b8d08 (diff)
prevent crash in malformed pivot table loaded from .xls
ScDPMember::GetItemData() unconditionally returned a reference to a ScDPItemData pointer obtained through ScDPSource::GetItemDataById() ScDPTableData::GetMemberById() ScDPCache::GetItemDataById() that can be null for malformed entries. Changed ScDPMember::GetItemData() to return a pointer instead and adapted callers to check for null. 3.5.x in ScDPSource::GetItemDataById() had a check for null pointer and added an empty ScDPItemData element to the cache for this case and returned the pointer to that entry (marked as todo). This is not the case anymore. Change-Id: I241c232d7182f5d58e8531af540e69b26ab4888a
Diffstat (limited to 'sc/inc/dptabsrc.hxx')
-rw-r--r--sc/inc/dptabsrc.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index b69846b48f31..9fced306c11b 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -755,7 +755,7 @@ public:
rtl::OUString GetNameStr() const;
void FillItemData( ScDPItemData& rData ) const;
- const ScDPItemData& GetItemData() const;
+ const ScDPItemData* GetItemData() const;
SCROW GetItemDataId() const { return mnDataId; }
bool IsNamedItem(SCROW nIndex) const;