diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-06-10 06:12:32 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-11 14:22:08 +0000 |
commit | 00265e96b3c1c5f865bb7cde2f4e260aa0668026 (patch) | |
tree | 4b4e662008e4ca79234ab6b1bc1f51da1f91bdce /sc | |
parent | 27f4335d431f8274a625424114d33d3134ad213e (diff) |
don't use temporary object
This avoids invalid memory access with fdo45268-1.xlsx
Change-Id: If141df14d7d747023c944c83c2d8957abe8b95ad
Reviewed-on: https://gerrit.libreoffice.org/9718
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
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; |