INTEGRATION: CWS fieldoptions (1.2.360); FILE MERGED

2004/05/04 14:42:16 nn 1.2.360.8: #i23447# use field options API structs
2004/04/22 12:41:51 nn 1.2.360.7: #i23447# use DataPilotFieldReference API struct
2004/04/15 18:50:34 nn 1.2.360.6: RESYNC: (1.2-1.3); FILE MERGED
2004/03/18 13:35:09 nn 1.2.360.5: #i23447# field options in ScDPSaveData
2004/03/05 18:28:49 nn 1.2.360.4: #i23447# row field layout options
2004/02/19 11:04:04 nn 1.2.360.3: #i23447# AutoShow (continued)
2004/02/02 16:52:39 nn 1.2.360.2: #i23447# sorting (incomplete)
2004/01/16 19:35:09 nn 1.2.360.1: #i23447# handle options for displayed value
This commit is contained in:
Oliver Bolte 2004-06-04 12:55:54 +00:00
parent 5d43b78f4c
commit 1f219224f6

View file

@ -2,9 +2,9 @@
*
* $RCSfile: dptabsrc.hxx,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: hr $ $Date: 2004-04-13 12:22:54 $
* last change: $Author: obo $ $Date: 2004-06-04 13:55:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -62,6 +62,8 @@
#ifndef SC_DPTABSRC_HXX
#define SC_DPTABSRC_HXX
#include <vector>
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
@ -98,6 +100,21 @@
#ifndef _COM_SUN_STAR_SHEET_GENERALFUNCTION_HPP_
#include <com/sun/star/sheet/GeneralFunction.hpp>
#endif
#ifndef _COM_SUN_STAR_SHEET_DATAPILOTFIELDAUTOSHOWINFO_HPP_
#include <com/sun/star/sheet/DataPilotFieldAutoShowInfo.hpp>
#endif
#ifndef _COM_SUN_STAR_SHEET_DATAPILOTFIELDLAYOUTINFO_HPP_
#include <com/sun/star/sheet/DataPilotFieldLayoutInfo.hpp>
#endif
#ifndef _COM_SUN_STAR_SHEET_DATAPILOTFIELDLAYOUTMODE_HPP_
#include <com/sun/star/sheet/DataPilotFieldLayoutMode.hpp>
#endif
#ifndef _COM_SUN_STAR_SHEET_DATAPILOTFIELDREFERENCE_HPP_
#include <com/sun/star/sheet/DataPilotFieldReference.hpp>
#endif
#ifndef _COM_SUN_STAR_SHEET_DATAPILOTFIELDSORTINFO_HPP_
#include <com/sun/star/sheet/DataPilotFieldSortInfo.hpp>
#endif
#ifndef _COM_SUN_STAR_UTIL_XREFRESHABLE_HPP_
#include <com/sun/star/util/XRefreshable.hpp>
#endif
@ -130,7 +147,8 @@ class ScDPResultData;
struct ScDPItemData;
class ScDPTableData;
// --------------------------------------------------------------------
// ------------------------------------------------------------------------
// should be dynamic!
#define SC_DAPI_MAXFIELDS 256
@ -225,6 +243,8 @@ public:
ScDPDimensions* GetDimensionsObject();
void DumpState( ScDocument* pDoc, const ScAddress& rPos );
// XDimensionsSupplier
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
SAL_CALL getDimensions( )
@ -366,6 +386,8 @@ private:
USHORT nFunction; // enum GeneralFunction
String aName; // if empty, take from source
long nSourceDim; // >=0 if dup'ed
::com::sun::star::sheet::DataPilotFieldReference
aReferenceValue; // settings for "show data as" / "displayed value"
BOOL bHasSelectedPage;
String aSelectedPage;
ScDPItemData* pSelectedData; // internal, temporary, created from aSelectedPage
@ -452,6 +474,8 @@ public:
virtual void setUsedHierarchy(long nNew);
virtual BOOL isDuplicated() const;
const ::com::sun::star::sheet::DataPilotFieldReference& GetReferenceValue() const;
BOOL IsValidPage( const ScDPItemData& rData );
};
@ -588,6 +612,14 @@ private:
ScDPMembers* pMembers;
com::sun::star::uno::Sequence<com::sun::star::sheet::GeneralFunction> aSubTotals;
BOOL bShowEmpty;
::com::sun::star::sheet::DataPilotFieldSortInfo aSortInfo; // stored user settings
::com::sun::star::sheet::DataPilotFieldAutoShowInfo aAutoShowInfo; // stored user settings
::com::sun::star::sheet::DataPilotFieldLayoutInfo aLayoutInfo; // stored user settings
// valid only from result calculation:
::std::vector<sal_Int32> aGlobalOrder; // result of sorting by name or position
long nSortMeasure; // measure (index of data dimension) to sort by
long nAutoMeasure; // measure (index of data dimension) for AutoShow
BOOL bEnableLayout; // enabled only for row fields, not for the innermost one
public:
ScDPLevel( ScDPSource* pSrc, long nD, long nH, long nL );
@ -663,6 +695,29 @@ public:
virtual BOOL getShowEmpty() const;
virtual void setShowEmpty(BOOL bSet);
const ::com::sun::star::sheet::DataPilotFieldSortInfo& GetSortInfo() const { return aSortInfo; }
const ::com::sun::star::sheet::DataPilotFieldAutoShowInfo& GetAutoShow() const { return aAutoShowInfo; }
void EvaluateSortOrder();
void SetEnableLayout( BOOL bSet );
const ::std::vector<sal_Int32>& GetGlobalOrder() const { return aGlobalOrder; }
::std::vector<sal_Int32>& GetGlobalOrder() { return aGlobalOrder; }
long GetSortMeasure() const { return nSortMeasure; }
long GetAutoMeasure() const { return nAutoMeasure; }
BOOL IsOutlineLayout() const
{ return bEnableLayout &&
aLayoutInfo.LayoutMode !=
::com::sun::star::sheet::DataPilotFieldLayoutMode::TABULAR_LAYOUT; }
BOOL IsSubtotalsAtTop() const
{ return bEnableLayout &&
aLayoutInfo.LayoutMode ==
::com::sun::star::sheet::DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_TOP; }
BOOL IsAddEmpty() const { return bEnableLayout && aLayoutInfo.AddEmptyLines; }
//! number format (for data fields and date fields)
};
@ -739,6 +794,8 @@ public:
String GetNameStr() const;
void FillItemData( ScDPItemData& rData ) const;
sal_Int32 Compare( const ScDPMember& rOther ) const; // visible order
// XNamed
virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setName( const ::rtl::OUString& aName )