[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Jun 11 07:22:30 PDT 2014


 sc/source/filter/inc/pivotcachebuffer.hxx |    2 +-
 sc/source/filter/oox/pivotcachebuffer.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 00265e96b3c1c5f865bb7cde2f4e260aa0668026
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Jun 10 06:12:32 2014 +0200

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/filter/inc/pivotcachebuffer.hxx b/sc/source/filter/inc/pivotcachebuffer.hxx
index 484e25f..d1ab42e 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 8b3c155..d2cfdb6 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;


More information about the Libreoffice-commits mailing list