diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-06-10 06:12:32 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-06-10 18:25:20 +0200 |
commit | 4d7b2748d2a070572aa8c6cd6852b0b476dcfab1 (patch) | |
tree | 8a19b7760c7c2c97805d6ab8e098e679299fbebd /sc | |
parent | 6afdb6860b307b71e8eb509d813538641339456a (diff) |
don't use temporary object
This avoids invalid memory access with fdo45268-1.xlsx
Change-Id: If141df14d7d747023c944c83c2d8957abe8b95ad
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/inc/pivotcachebuffer.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/oox/pivotcachebuffer.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/inc/pivotcachebuffer.hxx b/sc/source/filter/inc/pivotcachebuffer.hxx index 484e25fd5b58..d1ab42eb6cd2 100644 --- a/sc/source/filter/inc/pivotcachebuffer.hxx +++ b/sc/source/filter/inc/pivotcachebuffer.hxx @@ -289,7 +289,7 @@ public: /** Returns the names of all shared or group items. */ void getCacheItemNames( ::std::vector< OUString >& orItemNames ) const; /** Returns shared or group items. */ - PivotCacheItemList getCacheItems() const; + const PivotCacheItemList& getCacheItems() const; /** Creates inplace numeric grouping settings. */ void convertNumericGrouping( diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx index 8b3c15559ab2..d2cfdb64a987 100644 --- a/sc/source/filter/oox/pivotcachebuffer.cxx +++ b/sc/source/filter/oox/pivotcachebuffer.cxx @@ -769,7 +769,7 @@ void PivotCacheField::getCacheItemNames( ::std::vector< OUString >& orItemNames maSharedItems.getCacheItemNames( orItemNames ); } -PivotCacheItemList PivotCacheField::getCacheItems() const +const PivotCacheItemList& PivotCacheField::getCacheItems() const { if( hasGroupItems() ) return maGroupItems; |