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 (const OUString &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 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 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

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

Definition at line 37 of file xepivot.hxx.

Constructor & Destructor Documentation

XclExpPCItem::XclExpPCItem ( const OUString &  rText)
explicit

Definition at line 94 of file xepivot.cxx.

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

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

Definition at line 104 of file xepivot.cxx.

References mnTypeFlag, and XclPCItem::SetDouble().

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

Definition at line 112 of file xepivot.cxx.

References mnTypeFlag, and XclPCItem::SetDateTime().

XclExpPCItem::XclExpPCItem ( sal_Int16  nValue)
explicit

Definition at line 119 of file xepivot.cxx.

References XclPCItem::SetInteger().

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

Definition at line 126 of file xepivot.cxx.

References XclPCItem::SetBool().

Member Function Documentation

bool XclExpPCItem::EqualsBool ( bool  bValue) const

Definition at line 148 of file xepivot.cxx.

References XclPCItem::GetBool().

Referenced by XclExpPCField::InsertOrigBoolItem().

bool XclExpPCItem::EqualsDateTime ( const DateTime rDateTime) const

Definition at line 143 of file xepivot.cxx.

References XclPCItem::GetDateTime().

Referenced by XclExpPCField::InsertOrigDateTimeItem().

bool XclExpPCItem::EqualsDouble ( double  fValue) const

Definition at line 138 of file xepivot.cxx.

References XclPCItem::GetDouble().

Referenced by XclExpPCField::InsertOrigDoubleItem().

bool XclExpPCItem::EqualsText ( const OUString &  rText) const

Definition at line 133 of file xepivot.cxx.

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

Referenced by XclExpPCField::InsertOrigTextItem().

sal_uInt16 XclExpPCItem::GetTypeFlag ( ) const
inline

Definition at line 46 of file xepivot.hxx.

References mnTypeFlag.

Referenced by XclExpPCField::InsertOrigItem().

void XclExpPCItem::WriteBody ( XclExpStream rStrm)
overrideprivatevirtual

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

Usually this method will be overwritten by derived classes.

Reimplemented from XclExpRecord.

Definition at line 153 of file xepivot.cxx.

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

Member Data Documentation

sal_uInt16 XclExpPCItem::mnTypeFlag
private

Definition at line 57 of file xepivot.hxx.

Referenced by GetTypeFlag(), and XclExpPCItem().


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