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

Represents a data item in a pivot cache containing data of any type. More...

#include <xepivot.hxx>

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

Public Member Functions

 XclExpPCItem (const OUString &rText)
 
 XclExpPCItem (double fValue, const OUString &rText=OUString())
 
 XclExpPCItem (const DateTime &rDateTime, const OUString &rText=OUString())
 
 XclExpPCItem (sal_Int16 nValue)
 
 XclExpPCItem (bool bValue, const OUString &rText)
 
sal_uInt16 GetTypeFlag () const
 
bool EqualsText (std::u16string_view rText) const
 
bool EqualsDouble (double fValue) const
 
bool EqualsDateTime (const DateTime &rDateTime) const
 
bool EqualsBool (bool bValue) const
 
- Public Member Functions inherited from XclExpRecord
 XclExpRecord (sal_uInt16 nRecId=EXC_ID_UNKNOWN, std::size_t nRecSize=0)
 
 XclExpRecord (XclExpRecord const &)=default
 
virtual ~XclExpRecord () override
 
sal_uInt16 GetRecId () const
 Returns the current record ID. More...
 
std::size_t GetRecSize () const
 Returns the current record size prediction. More...
 
void SetRecId (sal_uInt16 nRecId)
 Sets a new record ID. More...
 
void SetRecSize (std::size_t nRecSize)
 Sets a new record size prediction. More...
 
void AddRecSize (std::size_t nRecSize)
 Adds a size value to the record size prediction. More...
 
void SetRecHeader (sal_uInt16 nRecId, std::size_t nRecSize)
 Sets record ID and size with one call. More...
 
virtual void Save (XclExpStream &rStrm) override
 Writes the record header and calls WriteBody(). 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 ()
 
- Public Member Functions inherited from XclPCItem
 XclPCItem ()
 
virtual ~XclPCItem ()
 
 XclPCItem (XclPCItem const &)=default
 
 XclPCItem (XclPCItem &&)=default
 
XclPCItemoperator= (XclPCItem const &)=default
 
XclPCItemoperator= (XclPCItem &&)=default
 
void SetEmpty ()
 Sets the item to 'empty' type. More...
 
void SetText (const OUString &rText)
 Sets the item to 'text' type and adds the passed text. More...
 
void SetDouble (double fValue, const OUString &rText=OUString())
 Sets the item to 'double' type and adds the passed value. More...
 
void SetDateTime (const DateTime &rDateTime, const OUString &rText=OUString())
 Sets the item to 'date/time' type and adds the passed date. More...
 
void SetInteger (sal_Int16 nValue)
 Sets the item to 'integer' type and adds the passed value. More...
 
void SetError (sal_uInt16 nError)
 Sets the item to 'error' type and adds the passed Excel error code. More...
 
void SetBool (bool bValue, const OUString &rText=OUString())
 Sets the item to 'boolean' type and adds the passed Boolean value. More...
 
const OUString & ConvertToText () const
 Returns the text representation of the item. More...
 
bool IsEqual (const XclPCItem &rItem) const
 Returns true, if the passed term equals this item. More...
 
bool IsEmpty () const
 Returns true, if the item type is 'empty'. More...
 
const OUString * GetText () const
 Returns pointer to text, if the item type is 'text', otherwise 0. More...
 
const double * GetDouble () const
 Returns pointer to value, if the item type is 'double', otherwise 0. More...
 
const DateTimeGetDateTime () const
 Returns pointer to date, if the item type is 'date/time', otherwise 0. More...
 
const sal_Int16 * GetInteger () const
 Returns pointer to integer, if the item type is 'integer', otherwise 0. More...
 
const sal_uInt16 * GetError () const
 Returns pointer to error code, if the item type is 'error', otherwise 0. More...
 
const bool * GetBool () const
 Returns pointer to Boolean value, if the item type is 'boolean', otherwise 0. More...
 
XclPCItemType GetType () const
 Returns the type of the item. More...
 

Private Member Functions

virtual void WriteBody (XclExpStream &rStrm) override
 Writes the body of the record (without record header). More...
 

Private Attributes

sal_uInt16 mnTypeFlag
 

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)
 
virtual void WriteBody (XclExpStream &rStrm)
 Writes the body of the record (without record header). More...
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Represents a data item in a pivot cache containing data of any type.

Definition at line 36 of file xepivot.hxx.

Constructor & Destructor Documentation

◆ XclExpPCItem() [1/5]

XclExpPCItem::XclExpPCItem ( const OUString &  rText)
explicit

Definition at line 96 of file xepivot.cxx.

References XclPCItem::SetEmpty(), and XclPCItem::SetText().

◆ XclExpPCItem() [2/5]

XclExpPCItem::XclExpPCItem ( double  fValue,
const OUString &  rText = OUString() 
)
explicit

Definition at line 106 of file xepivot.cxx.

References mnTypeFlag, and XclPCItem::SetDouble().

◆ XclExpPCItem() [3/5]

XclExpPCItem::XclExpPCItem ( const DateTime rDateTime,
const OUString &  rText = OUString() 
)
explicit

Definition at line 114 of file xepivot.cxx.

References mnTypeFlag, and XclPCItem::SetDateTime().

◆ XclExpPCItem() [4/5]

XclExpPCItem::XclExpPCItem ( sal_Int16  nValue)
explicit

Definition at line 121 of file xepivot.cxx.

References nValue, and XclPCItem::SetInteger().

◆ XclExpPCItem() [5/5]

XclExpPCItem::XclExpPCItem ( bool  bValue,
const OUString &  rText 
)
explicit

Definition at line 128 of file xepivot.cxx.

References XclPCItem::SetBool().

Member Function Documentation

◆ EqualsBool()

bool XclExpPCItem::EqualsBool ( bool  bValue) const

Definition at line 150 of file xepivot.cxx.

References XclPCItem::GetBool().

Referenced by XclExpPCField::InsertOrigBoolItem().

◆ EqualsDateTime()

bool XclExpPCItem::EqualsDateTime ( const DateTime rDateTime) const

Definition at line 145 of file xepivot.cxx.

References XclPCItem::GetDateTime().

Referenced by XclExpPCField::InsertOrigDateTimeItem().

◆ EqualsDouble()

bool XclExpPCItem::EqualsDouble ( double  fValue) const

Definition at line 140 of file xepivot.cxx.

References XclPCItem::GetDouble().

Referenced by XclExpPCField::InsertOrigDoubleItem().

◆ EqualsText()

bool XclExpPCItem::EqualsText ( std::u16string_view  rText) const

Definition at line 135 of file xepivot.cxx.

References XclPCItem::GetText(), and XclPCItem::IsEmpty().

Referenced by XclExpPCField::InsertOrigTextItem().

◆ GetTypeFlag()

sal_uInt16 XclExpPCItem::GetTypeFlag ( ) const
inline

Definition at line 45 of file xepivot.hxx.

References mnTypeFlag.

Referenced by XclExpPCField::InsertOrigItem().

◆ WriteBody()

void XclExpPCItem::WriteBody ( XclExpStream rStrm)
overrideprivatevirtual

Writes the body of the record (without record header).

@descr Usually this method will be overwritten by derived classes.

Reimplemented from XclExpRecord.

Definition at line 155 of file xepivot.cxx.

References XclPCItem::GetBool(), XclPCItem::GetDateTime(), XclPCItem::GetDouble(), XclPCItem::GetInteger(), XclPCItem::GetText(), XclPCItem::IsEmpty(), and rStrm.

Member Data Documentation

◆ mnTypeFlag

sal_uInt16 XclExpPCItem::mnTypeFlag
private

Definition at line 56 of file xepivot.hxx.

Referenced by GetTypeFlag(), and XclExpPCItem().


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