summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-06-10 06:12:32 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-06-10 06:41:17 +0200
commitde95cdd5768b4713a6c7f99716ddac7487dad288 (patch)
treedfbc1b67fd827e8c64e21712644bdde0d874bb02 /sc
parent3466cbc01ccad09bf852fdbc470744940c5c3054 (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.hxx2
-rw-r--r--sc/source/filter/oox/pivotcachebuffer.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/inc/pivotcachebuffer.hxx b/sc/source/filter/inc/pivotcachebuffer.hxx
index ffac9cff134a..a4e0746411a5 100644
--- a/sc/source/filter/inc/pivotcachebuffer.hxx
+++ b/sc/source/filter/inc/pivotcachebuffer.hxx
@@ -275,7 +275,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 7ece9148c4e5..b9a491f3d21a 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -749,7 +749,7 @@ void PivotCacheField::getCacheItemNames( ::std::vector< OUString >& orItemNames
maSharedItems.getCacheItemNames( orItemNames );
}
-PivotCacheItemList PivotCacheField::getCacheItems() const
+const PivotCacheItemList& PivotCacheField::getCacheItems() const
{
if( hasGroupItems() )
return maGroupItems;