LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XclExpPTField Class Reference

#include <xepivot.hxx>

Inheritance diagram for XclExpPTField:
[legend]
Collaboration diagram for XclExpPTField:
[legend]

Public Member Functions

 XclExpPTField (const XclExpPivotTable &rPTable, sal_uInt16 nCacheIdx)
 
OUString GetFieldName () const
 Returns the name of this field. More...
 
sal_uInt16 GetFieldIndex () const
 Returns the pivot table field list index of this field. More...
 
sal_uInt16 GetLastDataInfoIndex () const
 Returns the index of the last inserted data info struct. More...
 
sal_uInt16 GetItemIndex (std::u16string_view rName, sal_uInt16 nDefaultIdx) const
 Returns the list index of an item by its name. More...
 
void SetPropertiesFromDim (const ScDPSaveDimension &rSaveDim)
 Fills this field with row/column/page properties from the passed save dimension. More...
 
void SetDataPropertiesFromDim (const ScDPSaveDimension &rSaveDim)
 Fills this field with data field properties from the passed save dimension. More...
 
void AppendSubtotalItems ()
 Appends special items describing the field subtotal entries. More...
 
void WriteSxpiEntry (XclExpStream &rStrm) const
 Writes an entry for an SXPI record containing own page field info. More...
 
void WriteSxdi (XclExpStream &rStrm, sal_uInt16 nDataInfoIdx) const
 Writes an SXDI records containing info about a data field. More...
 
virtual void Save (XclExpStream &rStrm) override
 Writes the entire pivot table field. More...
 
- Public Member Functions inherited from XclExpRecordBase
 XclExpRecordBase ()
 
 XclExpRecordBase (XclExpRecordBase const &)
 
 XclExpRecordBase (XclExpRecordBase &&)
 
XclExpRecordBaseoperator= (XclExpRecordBase const &)
 
XclExpRecordBaseoperator= (XclExpRecordBase &&) noexcept
 
virtual ~XclExpRecordBase ()
 
virtual void Save (XclExpStream &rStrm)
 Overwrite this method to do any operation while saving the record. More...
 
virtual void SaveXml (XclExpXmlStream &rStrm)
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Member Functions

XclExpPTItemGetItemAcc (std::u16string_view rName)
 Returns an item by its name. More...
 
void AppendSubtotalItem (sal_uInt16 nItemType)
 Appends a special item describing a field subtotal entry. More...
 
void WriteSxvd (XclExpStream &rStrm) const
 Writes the SXVD record introducing the field. More...
 
void WriteSxvdex (XclExpStream &rStrm) const
 Writes the SXVDEX record containing additional settings. More...
 

Private Attributes

const XclExpPivotTablemrPTable
 
const XclExpPCFieldmpCacheField
 Parent pivot table containing this field. More...
 
XclPTFieldInfo maFieldInfo
 The referred pivot cache field. More...
 
XclPTFieldExtInfo maFieldExtInfo
 General field info (SXVD record). More...
 
XclPTPageFieldInfo maPageInfo
 Extended field info (SXVDEX record). More...
 
std::vector< XclPTDataFieldInfomaDataInfoVec
 Page field info (entry in SXPI record). More...
 
XclExpRecordList< XclExpPTItemmaItemList
 List of extended data field info (SXDI records). More...
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Definition at line 251 of file xepivot.hxx.

Constructor & Destructor Documentation

◆ XclExpPTField()

XclExpPTField::XclExpPTField ( const XclExpPivotTable rPTable,
sal_uInt16  nCacheIdx 
)
explicit

Member Function Documentation

◆ AppendSubtotalItem()

void XclExpPTField::AppendSubtotalItem ( sal_uInt16  nItemType)
private

Appends a special item describing a field subtotal entry.

Definition at line 1158 of file xepivot.cxx.

References XclExpRecordList< RecType >::AppendNewRecord(), EXC_SXVI_DEFAULT_CACHE, maFieldInfo, maItemList, and XclPTFieldInfo::mnItemCount.

Referenced by AppendSubtotalItems().

◆ AppendSubtotalItems()

void XclExpPTField::AppendSubtotalItems ( )

◆ GetFieldIndex()

sal_uInt16 XclExpPTField::GetFieldIndex ( ) const
inline

Returns the pivot table field list index of this field.

The field index is always equal to cache index.

Definition at line 263 of file xepivot.hxx.

References maFieldInfo, and XclPTFieldInfo::mnCacheIdx.

Referenced by SetDataPropertiesFromDim(), XclExpPivotTable::SetFieldPropertiesFromDim(), and SetPropertiesFromDim().

◆ GetFieldName()

OUString XclExpPTField::GetFieldName ( ) const

Returns the name of this field.

Definition at line 954 of file xepivot.cxx.

References XclExpPCField::GetFieldName(), and mpCacheField.

Referenced by XclExpPivotTable::GetFieldAcc(), SetDataPropertiesFromDim(), and SetPropertiesFromDim().

◆ GetItemAcc()

XclExpPTItem * XclExpPTField::GetItemAcc ( std::u16string_view  rName)
private

◆ GetItemIndex()

sal_uInt16 XclExpPTField::GetItemIndex ( std::u16string_view  rName,
sal_uInt16  nDefaultIdx 
) const

Returns the list index of an item by its name.

Parameters
nDefaultIdxThis value will be returned, if the item could not be found.

Definition at line 966 of file xepivot.cxx.

References XclExpPTItem::GetItemName(), XclExpRecordList< RecType >::GetRecord(), XclExpRecordList< RecType >::GetSize(), maItemList, and nPos.

◆ GetLastDataInfoIndex()

sal_uInt16 XclExpPTField::GetLastDataInfoIndex ( ) const

Returns the index of the last inserted data info struct.

Definition at line 959 of file xepivot.cxx.

References maDataInfoVec.

◆ Save()

void XclExpPTField::Save ( XclExpStream rStrm)
overridevirtual

Writes the entire pivot table field.

Reimplemented from XclExpRecordBase.

Definition at line 1137 of file xepivot.cxx.

References maItemList, rStrm, XclExpRecordList< RecType >::Save(), WriteSxvd(), and WriteSxvdex().

◆ SetDataPropertiesFromDim()

void XclExpPTField::SetDataPropertiesFromDim ( const ScDPSaveDimension rSaveDim)

◆ SetPropertiesFromDim()

void XclExpPTField::SetPropertiesFromDim ( const ScDPSaveDimension rSaveDim)

◆ WriteSxdi()

void XclExpPTField::WriteSxdi ( XclExpStream rStrm,
sal_uInt16  nDataInfoIdx 
) const

Writes an SXDI records containing info about a data field.

Definition at line 1126 of file xepivot.cxx.

References EXC_ID_SXDI, maDataInfoVec, and rStrm.

◆ WriteSxpiEntry()

void XclExpPTField::WriteSxpiEntry ( XclExpStream rStrm) const

Writes an entry for an SXPI record containing own page field info.

Definition at line 1121 of file xepivot.cxx.

References maPageInfo, and rStrm.

◆ WriteSxvd()

void XclExpPTField::WriteSxvd ( XclExpStream rStrm) const
private

Writes the SXVD record introducing the field.

Definition at line 1164 of file xepivot.cxx.

References EXC_ID_SXVD, maFieldInfo, and rStrm.

Referenced by Save().

◆ WriteSxvdex()

void XclExpPTField::WriteSxvdex ( XclExpStream rStrm) const
private

Writes the SXVDEX record containing additional settings.

Definition at line 1171 of file xepivot.cxx.

References EXC_ID_SXVDEX, maFieldExtInfo, and rStrm.

Referenced by Save().

Member Data Documentation

◆ maDataInfoVec

std::vector< XclPTDataFieldInfo > XclExpPTField::maDataInfoVec
private

Page field info (entry in SXPI record).

Definition at line 312 of file xepivot.hxx.

Referenced by GetLastDataInfoIndex(), SetDataPropertiesFromDim(), and WriteSxdi().

◆ maFieldExtInfo

XclPTFieldExtInfo XclExpPTField::maFieldExtInfo
private

General field info (SXVD record).

Definition at line 309 of file xepivot.hxx.

Referenced by SetPropertiesFromDim(), and WriteSxvdex().

◆ maFieldInfo

XclPTFieldInfo XclExpPTField::maFieldInfo
private

◆ maItemList

XclExpRecordList< XclExpPTItem > XclExpPTField::maItemList
private

List of extended data field info (SXDI records).

Definition at line 314 of file xepivot.hxx.

Referenced by AppendSubtotalItem(), GetItemAcc(), GetItemIndex(), Save(), and XclExpPTField().

◆ maPageInfo

XclPTPageFieldInfo XclExpPTField::maPageInfo
private

Extended field info (SXVDEX record).

Definition at line 310 of file xepivot.hxx.

Referenced by SetPropertiesFromDim(), and WriteSxpiEntry().

◆ mpCacheField

const XclExpPCField* XclExpPTField::mpCacheField
private

Parent pivot table containing this field.

Definition at line 307 of file xepivot.hxx.

Referenced by GetFieldName(), and XclExpPTField().

◆ mrPTable

const XclExpPivotTable& XclExpPTField::mrPTable
private

Definition at line 306 of file xepivot.hxx.

Referenced by SetDataPropertiesFromDim(), and SetPropertiesFromDim().


The documentation for this class was generated from the following files: