From 16af091a3339f6d00fe273f9dc5f155126e58881 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Thu, 26 Jan 2012 14:28:36 +0000 Subject: fix corrupted group field entries in xlsx imported pivot table fdo#45268 --- oox/inc/oox/xls/pivotcachebuffer.hxx | 6 ++++++ oox/inc/oox/xls/pivottablebuffer.hxx | 1 + 2 files changed, 7 insertions(+) (limited to 'oox/inc') diff --git a/oox/inc/oox/xls/pivotcachebuffer.hxx b/oox/inc/oox/xls/pivotcachebuffer.hxx index 208fbd432a20..5f73527648bc 100644 --- a/oox/inc/oox/xls/pivotcachebuffer.hxx +++ b/oox/inc/oox/xls/pivotcachebuffer.hxx @@ -99,10 +99,13 @@ public: inline const ::com::sun::star::uno::Any& getValue() const { return maValue; } /** Returns the string representation of the item. */ ::rtl::OUString getName() const; + /** Returns true if the item is unused. */ + inline bool isUnused() const { return mbUnused; } private: ::com::sun::star::uno::Any maValue; /// Value of the item. sal_Int32 mnType; /// Value type (OOXML token identifier). + bool mbUnused; }; // ---------------------------------------------------------------------------- @@ -285,6 +288,8 @@ public: const PivotCacheItem* getCacheItem( sal_Int32 nItemIdx ) const; /** Returns the names of all shared or group items. */ void getCacheItemNames( ::std::vector< ::rtl::OUString >& orItemNames ) const; + /** Returns shared or group items. */ + PivotCacheItemList getCacheItems() const; /** Creates inplace numeric grouping settings. */ void convertNumericGrouping( @@ -295,6 +300,7 @@ public: /** Creates a new grouped DataPilot field and returns its name. */ ::rtl::OUString createParentGroupField( const ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDataPilotField >& rxBaseDPField, + const PivotCacheField& rBaseCacheField, PivotCacheGroupItemVector& orItemNames ) const; /** Writes the title of the field into the passed sheet at the passed address. */ diff --git a/oox/inc/oox/xls/pivottablebuffer.hxx b/oox/inc/oox/xls/pivottablebuffer.hxx index 25c7bb104998..f118476ccbb9 100644 --- a/oox/inc/oox/xls/pivottablebuffer.hxx +++ b/oox/inc/oox/xls/pivottablebuffer.hxx @@ -170,6 +170,7 @@ public: /** Finalizes the grouped field after import. */ void finalizeParentGroupingImport( const ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDataPilotField >& rxBaseDPField, + const PivotCacheField& rBaseCacheField, PivotCacheGroupItemVector& orItemNames ); /** Returns the name of the DataPilot field in the fields collection. */ -- cgit