diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-29 14:28:08 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-29 14:28:08 +0100 |
commit | 3d41d6b157157dd55e62cf795bfba74990b79b0b (patch) | |
tree | 89e3cbcece6b746a54dd7a34fee1402f2d47681d /sc/inc/pivot.hxx | |
parent | d10477ee1ad60b8c8a47b89358108e860b58b15e (diff) | |
parent | ddea1bbc63a2a08b8c546f8cb1bf833671342f11 (diff) |
CWS-TOOLING: integrate CWS koheidatapilot03
Diffstat (limited to 'sc/inc/pivot.hxx')
-rw-r--r-- | sc/inc/pivot.hxx | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx index e77dd60f18bb..100463cb5542 100644 --- a/sc/inc/pivot.hxx +++ b/sc/inc/pivot.hxx @@ -53,6 +53,7 @@ #include "address.hxx" #include <vector> +#include <boost/shared_ptr.hpp> class SubTotal; #include "collect.hxx" @@ -69,7 +70,9 @@ class SvStream; class ScDocument; class ScUserListData; class ScProgress; -struct LabelData; +struct ScDPLabelData; + +typedef ::boost::shared_ptr<ScDPLabelData> ScDPLabelDataRef; // ----------------------------------------------------------------------- @@ -93,8 +96,7 @@ struct ScPivotParam SCCOL nCol; // Cursor Position / SCROW nRow; // bzw. Anfang des Zielbereiches SCTAB nTab; - LabelData** ppLabelArr; - SCSIZE nLabels; + ::std::vector<ScDPLabelDataRef> maLabelArray; PivotField aPageArr[PIVOT_MAXPAGEFIELD]; PivotField aColArr[PIVOT_MAXFIELD]; PivotField aRowArr[PIVOT_MAXFIELD]; @@ -115,10 +117,8 @@ struct ScPivotParam ScPivotParam& operator= ( const ScPivotParam& r ); BOOL operator== ( const ScPivotParam& r ) const; //UNUSED2009-05 void Clear (); - void ClearLabelData (); void ClearPivotArrays(); - void SetLabelData ( LabelData** ppLabArr, - SCSIZE nLab ); + void SetLabelData (const ::std::vector<ScDPLabelDataRef>& r); void SetPivotArrays ( const PivotField* pPageArr, const PivotField* pColArr, const PivotField* pRowArr, @@ -136,24 +136,45 @@ typedef PivotField PivotPageFieldArr[PIVOT_MAXPAGEFIELD]; //------------------------------------------------------------------------ -struct LabelData +struct ScDPLabelData { - String maName; /// Visible name of the dimension. + ::rtl::OUString maName; /// Original name of the dimension. + ::rtl::OUString maLayoutName; /// Layout name (display name) SCsCOL mnCol; USHORT mnFuncMask; /// Page/Column/Row subtotal function. sal_Int32 mnUsedHier; /// Used hierarchy. bool mbShowAll; /// true = Show all (also empty) results. bool mbIsValue; /// true = Sum or count in data field. + struct Member + { + ::rtl::OUString maName; + ::rtl::OUString maLayoutName; + bool mbVisible; + bool mbShowDetails; + + Member(); + + /** + * return the name that should be displayed in the dp dialogs i.e. + * when the layout name is present, use it, or else use the original + * name. + */ + ::rtl::OUString SC_DLLPUBLIC getDisplayName() const; + }; + ::std::vector<Member> maMembers; ::com::sun::star::uno::Sequence< ::rtl::OUString > maHiers; /// Hierarchies. - ::com::sun::star::uno::Sequence< ::rtl::OUString > maMembers; /// Members. - ::com::sun::star::uno::Sequence< sal_Bool > maVisible; /// Visibility of members. - ::com::sun::star::uno::Sequence< sal_Bool > maShowDet; /// Show details of members. ::com::sun::star::sheet::DataPilotFieldSortInfo maSortInfo; /// Sorting info. ::com::sun::star::sheet::DataPilotFieldLayoutInfo maLayoutInfo; /// Layout info. ::com::sun::star::sheet::DataPilotFieldAutoShowInfo maShowInfo; /// AutoShow info. - explicit LabelData( const String& rName, short nCol, bool bIsValue ); + explicit ScDPLabelData( const String& rName, short nCol, bool bIsValue ); + + /** + * return the name that should be displayed in the dp dialogs i.e. when + * the layout name is present, use it, or else use the original name. + */ + ::rtl::OUString SC_DLLPUBLIC getDisplayName() const; }; // ============================================================================ @@ -171,7 +192,6 @@ struct ScDPFuncData // ============================================================================ -typedef LabelData ScDPLabelData; typedef std::vector< ScDPLabelData > ScDPLabelDataVec; typedef std::vector< String > ScDPNameVec; |