diff options
author | Noel Power <noel.power@novell.com> | 2012-01-27 15:11:29 +0000 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-02-03 12:43:44 +0000 |
commit | 3d62ea9a928c4a814369d5b6c276ac78239aeeeb (patch) | |
tree | 54c4718e98657b418b3f371378a501d98ebfeeda /oox/inc | |
parent | 50be8ec9ed680c9b5b419d549e981c7a335b0257 (diff) |
import group field group name user captions fdo#45310
Diffstat (limited to 'oox/inc')
-rw-r--r-- | oox/inc/oox/xls/pivotcachebuffer.hxx | 10 | ||||
-rw-r--r-- | oox/inc/oox/xls/pivottablebuffer.hxx | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/oox/inc/oox/xls/pivotcachebuffer.hxx b/oox/inc/oox/xls/pivotcachebuffer.hxx index 5f73527648bc..b56de3017516 100644 --- a/oox/inc/oox/xls/pivotcachebuffer.hxx +++ b/oox/inc/oox/xls/pivotcachebuffer.hxx @@ -49,6 +49,9 @@ class WorksheetHelper; // ============================================================================ +typedef ::std::pair< sal_Int32, rtl::OUString > IdCaptionPair; +typedef ::std::vector< IdCaptionPair > IdCaptionPairList; + class PivotCacheItem { public: @@ -103,6 +106,9 @@ public: inline bool isUnused() const { return mbUnused; } private: +friend class PivotCacheItemList; + // #FIXME hack Sets the value of this item to the given string ( and overwrites type if necessary + void setStringValue( const rtl::OUString& sName ); ::com::sun::star::uno::Any maValue; /// Value of the item. sal_Int32 mnType; /// Value type (OOXML token identifier). bool mbUnused; @@ -131,6 +137,7 @@ public: const PivotCacheItem* getCacheItem( sal_Int32 nItemIdx ) const; /** Returns the names of all items. */ void getCacheItemNames( ::std::vector< ::rtl::OUString >& orItemNames ) const; + void applyItemCaptions( const IdCaptionPairList& vCaptions ); private: /** Creates and returns a new item at the end of the items list. */ @@ -262,6 +269,8 @@ public: void importPCDFRangePr( BiffInputStream& rStrm ); /** Imports the mapping between group items and base items from the PCDFDISCRETEPR record. */ void importPCDFDiscretePr( BiffInputStream& rStrm ); + /** Apply user Captions to imported group data */ + void applyItemCaptions( const IdCaptionPairList& vCaptions ); /** Returns true, if the field is based on source data, or false if it is grouped or calculated. */ inline bool isDatabaseField() const { return maFieldModel.mbDatabaseField; } @@ -318,7 +327,6 @@ public: void importPCItemIndex( BiffInputStream& rStrm, WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const; - private: /** Tries to write the passed value to the passed sheet position. */ void writeItemToSourceDataCell( WorksheetHelper& rSheetHelper, diff --git a/oox/inc/oox/xls/pivottablebuffer.hxx b/oox/inc/oox/xls/pivottablebuffer.hxx index f118476ccbb9..1d7c10cafa5e 100644 --- a/oox/inc/oox/xls/pivottablebuffer.hxx +++ b/oox/inc/oox/xls/pivottablebuffer.hxx @@ -49,6 +49,7 @@ struct PTFieldItemModel { sal_Int32 mnCacheItem; /// Index to shared item in pivot cache. sal_Int32 mnType; /// Type of the item. + rtl::OUString msCaption; /// User caption of the item bool mbShowDetails; /// True = show item details (items of child fields). bool mbHidden; /// True = item is hidden. |