25#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
26#include <rtl/ustring.hxx>
33#include <unordered_map>
34#include <unordered_set>
38 class XDimensionsSupplier;
39 struct DataPilotFieldReference;
40 struct DataPilotFieldSortInfo;
41 struct DataPilotFieldAutoShowInfo;
42 struct DataPilotFieldLayoutInfo;
79 void SetName(
const OUString& rNew );
85 void WriteToSource(
const css::uno::Reference<css::uno::XInterface>& xMember,
86 sal_Int32 nPosition );
89 void Dump(
int nIndent = 0)
const;
109 std::unique_ptr<css::sheet::DataPilotFieldSortInfo>
pSortInfo;
111 std::unique_ptr<css::sheet::DataPilotFieldLayoutInfo>
pLayoutInfo;
118 std::unordered_map<OUString, std::unique_ptr<ScDPSaveMember>>
maMemberHash;
131 void AddMember(std::unique_ptr<ScDPSaveMember> pMember);
143 {
return bIsDataLayout; }
145 void SetName(
const OUString& rNew );
148 void SetSubTotals(std::vector<ScGeneralFunction> && rFuncs);
150 {
return maSubTotalFuncs.size(); }
153 {
return maSubTotalFuncs[
nIndex]; }
155 bool HasShowEmpty()
const;
156 void SetShowEmpty(
bool bSet);
158 {
return bool(nShowEmptyMode); }
160 void SetRepeatItemLabels(
bool bSet);
162 {
return bRepeatItemLabels; }
166 {
return nFunction; }
170 {
return nUsedHierarchy; }
172 void SetLayoutName(
const OUString& rName);
173 const std::optional<OUString> & GetLayoutName()
const;
174 void RemoveLayoutName();
175 void SetSubtotalName(
const OUString& rName);
176 const std::optional<OUString> & GetSubtotalName()
const;
177 void RemoveSubtotalName();
179 bool IsMemberNameInUse(
const OUString& rName)
const;
182 {
return pReferenceValue.get(); }
184 void SetReferenceValue(
const css::sheet::DataPilotFieldReference* pNew);
187 {
return pSortInfo.get(); }
189 void SetSortInfo(
const css::sheet::DataPilotFieldSortInfo* pNew);
191 {
return pAutoShowInfo.get(); }
193 void SetAutoShowInfo(
const css::sheet::DataPilotFieldAutoShowInfo* pNew);
195 {
return pLayoutInfo.get(); }
197 void SetLayoutInfo(
const css::sheet::DataPilotFieldLayoutInfo* pNew);
199 void SetCurrentPage(
const OUString* pPage );
200 OUString GetCurrentPage()
const;
203 {
return nOrientation; }
218 void SetMemberPosition(
const OUString& rName, sal_Int32 nNewPos );
220 void WriteToSource(
const css::uno::Reference<css::uno::XInterface>& xDim );
222 void UpdateMemberVisibility(
const std::unordered_map< OUString, bool>& rData);
224 bool HasInvisibleMember()
const;
226 void RemoveObsoleteMembers(
const MemberSetType& rMembers);
229 void Dump(
int nIndent = 0)
const;
238 typedef std::vector<std::unique_ptr<ScDPSaveDimension>>
DimsType;
290 css::sheet::DataPilotFieldOrientation eOrientation,
291 std::vector<const ScDPSaveDimension*>& rDims)
const;
350 void WriteToSource(
const css::uno::Reference<css::sheet::XDimensionsSupplier>& xSource );
std::vector< OUString > maMemberList
This class has to do with handling exclusively grouped dimensions? TODO: Find out what this class doe...
std::unordered_map< OUString, size_t > DimOrderType
void RemoveAllGroupDimensions(const OUString &rSrcDimName, std::vector< OUString > *pDeletedNames=nullptr)
void WriteToSource(const css::uno::Reference< css::sheet::XDimensionsSupplier > &xSource)
SC_DLLPUBLIC void SetIgnoreEmptyRows(bool bSet)
ScDPSaveDimension * GetInnermostDimension(css::sheet::DataPilotFieldOrientation nOrientation)
void RemoveDuplicateNameCount(const OUString &rName)
bool operator==(const ScDPSaveData &r) const
SC_DLLPUBLIC ScDPSaveDimension * GetExistingDimensionByName(std::u16string_view rName) const
const DimOrderType & GetDimensionSortOrder() const
Get sort order map to sort row and column dimensions in order of appearance.
bool GetDrillDown() const
SC_DLLPUBLIC void GetAllDimensionsByOrientation(css::sheet::DataPilotFieldOrientation eOrientation, std::vector< const ScDPSaveDimension * > &rDims) const
Get all dimensions in a given orientation.
SC_DLLPUBLIC void SetExpandCollapse(bool bSet)
ScDPSaveData & operator=(const ScDPSaveData &r)
bool GetFilterButton() const
SC_DLLPUBLIC ScDPSaveDimension * GetNewDimensionByName(const OUString &rName)
bool GetIgnoreEmptyRows() const
ScDPSaveDimension * GetFirstDimension(css::sheet::DataPilotFieldOrientation eOrientation)
void SetPosition(ScDPSaveDimension *pDim, tools::Long nNew)
SC_DLLPUBLIC bool HasInvisibleMember(std::u16string_view rDimName) const
Check whether a dimension has one or more invisible members.
ScDPSaveDimension * DuplicateDimension(std::u16string_view rName)
std::unique_ptr< DimOrderType > mpDimOrder
bool GetRepeatIfEmpty() const
sal_uInt16 nIgnoreEmptyMode
SC_DLLPUBLIC const std::optional< OUString > & GetGrandTotalName() const
void CheckDuplicateName(ScDPSaveDimension &rDim)
SC_DLLPUBLIC void SetRepeatIfEmpty(bool bSet)
DupNameCountType maDupNameCounts
SC_DLLPUBLIC void SetFilterButton(bool bSet)
void RemoveDimensionByName(const OUString &rName)
bool GetColumnGrand() const
bool GetExpandCollapse() const
SC_DLLPUBLIC void SetGrandTotalName(const OUString &rName)
SC_DLLPUBLIC ScDPSaveDimension * GetDataLayoutDimension()
std::optional< OUString > mpGrandTotalName
ScDPSaveDimension * AppendNewDimension(const OUString &rName, bool bDataLayout)
Append a new original dimension.
std::vector< std::unique_ptr< ScDPSaveDimension > > DimsType
void AddDimension(ScDPSaveDimension *pDim)
SC_DLLPUBLIC void SetRowGrand(bool bSet)
SC_DLLPUBLIC void SetColumnGrand(bool bSet)
SC_DLLPUBLIC ScDPSaveDimension * GetExistingDataLayoutDimension() const
void SyncAllDimensionMembers(ScDPTableData *pData)
const DimsType & GetDimensions() const
const ScDPDimensionSaveData * GetExistingDimensionData() const
std::unordered_map< OUString, size_t > DupNameCountType
SC_DLLPUBLIC ScDPDimensionSaveData * GetDimensionData()
SC_DLLPUBLIC void SetDimensionData(const ScDPDimensionSaveData *pNew)
SC_DLLPUBLIC tools::Long GetDataDimensionCount() const
void BuildAllDimensionMembers(ScDPTableData *pData)
SC_DLLPUBLIC ScDPSaveDimension * GetDimensionByName(const OUString &rName)
Get a dimension object by its name.
sal_uInt16 nColumnGrandMode
SC_DLLPUBLIC void SetDrillDown(bool bSet)
bool mbDimensionMembersBuilt
if true, all dimensions already have all of their member instances created.
std::unique_ptr< ScDPDimensionSaveData > pDimensionData
keep track of number of duplicates in each name.
sal_uInt16 nRepeatEmptyMode
SC_DLLPUBLIC ~ScDPSaveData()
SC_DLLPUBLIC ScDPSaveData()
tools::Long nUsedHierarchy
std::optional< OUString > mpSubtotalName
const css::sheet::DataPilotFieldSortInfo * GetSortInfo() const
bool bSubTotalDefault
at level
sal_uInt16 nShowEmptyMode
std::unique_ptr< css::sheet::DataPilotFieldLayoutInfo > pLayoutInfo
tools::Long GetUsedHierarchy() const
std::vector< ScGeneralFunction > maSubTotalFuncs
at level
std::unordered_set< OUString > MemberSetType
bool bRepeatItemLabels
at level
ScGeneralFunction GetSubTotalFunc(tools::Long nIndex) const
std::unique_ptr< css::sheet::DataPilotFieldAutoShowInfo > pAutoShowInfo
ScGeneralFunction nFunction
void SetDupFlag(bool bSet)
css::sheet::DataPilotFieldOrientation GetOrientation() const
std::unique_ptr< css::sheet::DataPilotFieldSortInfo > pSortInfo
std::unordered_map< OUString, std::unique_ptr< ScDPSaveMember > > maMemberHash
const css::sheet::DataPilotFieldLayoutInfo * GetLayoutInfo() const
const css::sheet::DataPilotFieldAutoShowInfo * GetAutoShowInfo() const
std::unique_ptr< css::sheet::DataPilotFieldReference > pReferenceValue
css::sheet::DataPilotFieldOrientation nOrientation
std::optional< OUString > mpLayoutName
ScGeneralFunction GetFunction() const
tools::Long GetSubTotalsCount() const
const css::sheet::DataPilotFieldReference * GetReferenceValue() const
const MemberList & GetMembers() const
void Dump(int nIndent=0) const
std::vector< ScDPSaveMember * > MemberList
bool GetRepeatItemLabels() const
bool IsDataLayout() const
const OUString & GetName() const
bool GetShowEmpty() const
void SetName(const OUString &rNew)
SC_DLLPUBLIC void SetIsVisible(bool bSet)
const OUString & GetName() const
std::optional< OUString > mpLayoutName
void WriteToSource(const css::uno::Reference< css::uno::XInterface > &xMember, sal_Int32 nPosition)
SC_DLLPUBLIC bool HasShowDetails() const
bool GetShowDetails() const
SC_DLLPUBLIC bool HasIsVisible() const
bool GetIsVisible() const
void Dump(int nIndent=0) const
SC_DLLPUBLIC void SetLayoutName(const OUString &rName)
ScDPSaveMember(OUString aName)
bool operator==(const ScDPSaveMember &r) const
sal_uInt16 nShowDetailsMode
SC_DLLPUBLIC const std::optional< OUString > & GetLayoutName() const
SC_DLLPUBLIC void SetShowDetails(bool bSet)
Base class that abstracts different data source types of a datapilot table.
ScGeneralFunction
the css::sheet::GeneralFunction enum is extended by constants in GeneralFunction2,...
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)