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 (const OUString &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 SaveXml (XclExpXmlStream &rStrm)
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Member Functions

XclExpPTItemGetItemAcc (const OUString &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 voidoperator new (std::size_t nSize)
 
static voidoperator 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 252 of file xepivot.hxx.

Constructor & Destructor Documentation

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

Member Function Documentation

void XclExpPTField::AppendSubtotalItem ( sal_uInt16  nItemType)
private

Appends a special item describing a field subtotal entry.

Definition at line 1153 of file xepivot.cxx.

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

Referenced by AppendSubtotalItems().

void XclExpPTField::AppendSubtotalItems ( )
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 264 of file xepivot.hxx.

References maFieldInfo, and XclPTFieldInfo::mnCacheIdx.

Referenced by SetDataPropertiesFromDim(), and SetPropertiesFromDim().

OUString XclExpPTField::GetFieldName ( ) const
XclExpPTItem * XclExpPTField::GetItemAcc ( const OUString &  rName)
private
sal_uInt16 XclExpPTField::GetItemIndex ( const OUString &  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 961 of file xepivot.cxx.

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

sal_uInt16 XclExpPTField::GetLastDataInfoIndex ( ) const

Returns the index of the last inserted data info struct.

Definition at line 954 of file xepivot.cxx.

References maDataInfoVec.

void XclExpPTField::Save ( XclExpStream rStrm)
overridevirtual

Writes the entire pivot table field.

Reimplemented from XclExpRecordBase.

Definition at line 1132 of file xepivot.cxx.

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

void XclExpPTField::SetDataPropertiesFromDim ( const ScDPSaveDimension rSaveDim)
void XclExpPTField::SetPropertiesFromDim ( const ScDPSaveDimension rSaveDim)
void XclExpPTField::WriteSxdi ( XclExpStream rStrm,
sal_uInt16  nDataInfoIdx 
) const

Writes an SXDI records containing info about a data field.

Definition at line 1121 of file xepivot.cxx.

References XclExpStream::EndRecord(), EXC_ID_SXDI, maDataInfoVec, and XclExpStream::StartRecord().

void XclExpPTField::WriteSxpiEntry ( XclExpStream rStrm) const

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

Definition at line 1116 of file xepivot.cxx.

References maPageInfo.

void XclExpPTField::WriteSxvd ( XclExpStream rStrm) const
private

Writes the SXVD record introducing the field.

Definition at line 1159 of file xepivot.cxx.

References XclExpStream::EndRecord(), EXC_ID_SXVD, maFieldInfo, and XclExpStream::StartRecord().

Referenced by Save().

void XclExpPTField::WriteSxvdex ( XclExpStream rStrm) const
private

Writes the SXVDEX record containing additional settings.

Definition at line 1166 of file xepivot.cxx.

References XclExpStream::EndRecord(), EXC_ID_SXVDEX, maFieldExtInfo, and XclExpStream::StartRecord().

Referenced by Save().

Member Data Documentation

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

Page field info (entry in SXPI record).

Definition at line 313 of file xepivot.hxx.

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

XclPTFieldExtInfo XclExpPTField::maFieldExtInfo
private

General field info (SXVD record).

Definition at line 310 of file xepivot.hxx.

Referenced by SetPropertiesFromDim(), and WriteSxvdex().

XclPTFieldInfo XclExpPTField::maFieldInfo
private
XclExpRecordList< XclExpPTItem > XclExpPTField::maItemList
private

List of extended data field info (SXDI records).

Definition at line 315 of file xepivot.hxx.

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

XclPTPageFieldInfo XclExpPTField::maPageInfo
private

Extended field info (SXVDEX record).

Definition at line 311 of file xepivot.hxx.

Referenced by SetPropertiesFromDim(), and WriteSxpiEntry().

const XclExpPCField* XclExpPTField::mpCacheField
private

Parent pivot table containing this field.

Definition at line 308 of file xepivot.hxx.

Referenced by GetFieldName(), and XclExpPTField().

const XclExpPivotTable& XclExpPTField::mrPTable
private

Definition at line 307 of file xepivot.hxx.

Referenced by SetDataPropertiesFromDim(), and SetPropertiesFromDim().


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