LibreOffice Module sc (master) 1
|
Represents a data item of any type in a pivot cache. More...
#include <xlpivot.hxx>
Public Member Functions | |
XclPCItem () | |
virtual | ~XclPCItem () |
XclPCItem (XclPCItem const &)=default | |
XclPCItem (XclPCItem &&)=default | |
XclPCItem & | operator= (XclPCItem const &)=default |
XclPCItem & | operator= (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 DateTime * | GetDateTime () 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 Attributes | |
XclPCItemType | meType |
OUString | maText |
Type of the item. More... | |
DateTime | maDateTime |
Text representation of the item. More... | |
union { | |
double mfValue | |
sal_Int16 mnValue | |
Value of a floating-point item. More... | |
sal_uInt16 mnError | |
Value of an integer item. More... | |
bool mbValue | |
Error code of an error item. More... | |
}; | |
Value of a date/time item. More... | |
Represents a data item of any type in a pivot cache.
Supposed as base class for import and export.
Definition at line 366 of file xlpivot.hxx.
|
explicit |
Definition at line 45 of file xlpivot.cxx.
|
virtual |
Definition at line 51 of file xlpivot.cxx.
|
default |
|
default |
|
inline |
Returns the text representation of the item.
Definition at line 393 of file xlpivot.hxx.
References maText.
Referenced by XclExpPCField::GetItemIndex(), and XclExpPTItem::GetItemName().
const bool * XclPCItem::GetBool | ( | ) | const |
Returns pointer to Boolean value, if the item type is 'boolean', otherwise 0.
Definition at line 160 of file xlpivot.cxx.
References EXC_PCITEM_BOOL, mbValue, and meType.
Referenced by XclExpPCItem::EqualsBool(), XclImpPTItem::GetItemName(), XclExpPCItem::WriteBody(), and XclImpPCItem::WriteToSource().
const DateTime * XclPCItem::GetDateTime | ( | ) | const |
Returns pointer to date, if the item type is 'date/time', otherwise 0.
Definition at line 145 of file xlpivot.cxx.
References EXC_PCITEM_DATETIME, maDateTime, and meType.
Referenced by XclExpPCItem::EqualsDateTime(), XclImpPTItem::GetItemName(), XclExpPCItem::WriteBody(), and XclImpPCItem::WriteToSource().
const double * XclPCItem::GetDouble | ( | ) | const |
Returns pointer to value, if the item type is 'double', otherwise 0.
Definition at line 140 of file xlpivot.cxx.
References EXC_PCITEM_DOUBLE, meType, and mfValue.
Referenced by XclExpPCItem::EqualsDouble(), XclImpPTItem::GetItemName(), XclExpPCItem::WriteBody(), and XclImpPCItem::WriteToSource().
const sal_uInt16 * XclPCItem::GetError | ( | ) | const |
Returns pointer to error code, if the item type is 'error', otherwise 0.
Definition at line 155 of file xlpivot.cxx.
References EXC_PCITEM_ERROR, meType, and mnError.
Referenced by XclImpPCItem::WriteToSource().
const sal_Int16 * XclPCItem::GetInteger | ( | ) | const |
Returns pointer to integer, if the item type is 'integer', otherwise 0.
Definition at line 150 of file xlpivot.cxx.
References EXC_PCITEM_INTEGER, meType, and mnValue.
Referenced by XclImpPTItem::GetItemName(), XclExpPCItem::WriteBody(), and XclImpPCItem::WriteToSource().
const OUString * XclPCItem::GetText | ( | ) | const |
Returns pointer to text, if the item type is 'text', otherwise 0.
Definition at line 135 of file xlpivot.cxx.
References EXC_PCITEM_ERROR, EXC_PCITEM_TEXT, maText, and meType.
Referenced by XclExpPCItem::EqualsText(), XclImpPTItem::GetItemName(), XclExpPCItem::WriteBody(), and XclImpPCItem::WriteToSource().
XclPCItemType XclPCItem::GetType | ( | ) | const |
Returns the type of the item.
Definition at line 165 of file xlpivot.cxx.
References meType.
Referenced by XclImpPTItem::GetItemName().
bool XclPCItem::IsEmpty | ( | ) | const |
Returns true, if the item type is 'empty'.
Definition at line 130 of file xlpivot.cxx.
References EXC_PCITEM_EMPTY, and meType.
Referenced by XclExpPCItem::EqualsText(), and XclExpPCItem::WriteBody().
bool XclPCItem::IsEqual | ( | const XclPCItem & | rItem | ) | const |
Returns true, if the passed term equals this item.
Definition at line 113 of file xlpivot.cxx.
References EXC_PCITEM_BOOL, EXC_PCITEM_DATETIME, EXC_PCITEM_DOUBLE, EXC_PCITEM_EMPTY, EXC_PCITEM_ERROR, EXC_PCITEM_INTEGER, EXC_PCITEM_INVALID, EXC_PCITEM_TEXT, maDateTime, maText, mbValue, meType, mfValue, mnError, and mnValue.
Referenced by operator==().
void XclPCItem::SetBool | ( | bool | bValue, |
const OUString & | rText = OUString() |
||
) |
Sets the item to 'boolean' type and adds the passed Boolean value.
Definition at line 106 of file xlpivot.cxx.
References EXC_PCITEM_BOOL, maText, mbValue, and meType.
Referenced by XclImpPCItem::ReadSxboolean(), and XclExpPCItem::XclExpPCItem().
void XclPCItem::SetDateTime | ( | const DateTime & | rDateTime, |
const OUString & | rText = OUString() |
||
) |
Sets the item to 'date/time' type and adds the passed date.
Definition at line 74 of file xlpivot.cxx.
References EXC_PCITEM_DATETIME, maDateTime, maText, and meType.
Referenced by XclImpPCItem::ReadSxdatetime(), and XclExpPCItem::XclExpPCItem().
void XclPCItem::SetDouble | ( | double | fValue, |
const OUString & | rText = OUString() |
||
) |
Sets the item to 'double' type and adds the passed value.
Definition at line 67 of file xlpivot.cxx.
References EXC_PCITEM_DOUBLE, maText, meType, and mfValue.
Referenced by XclImpPCItem::ReadSxdouble(), and XclExpPCItem::XclExpPCItem().
void XclPCItem::SetEmpty | ( | ) |
Sets the item to 'empty' type.
Definition at line 55 of file xlpivot.cxx.
References EXC_PCITEM_EMPTY, maText, and meType.
Referenced by XclImpPCItem::ReadSxempty(), and XclExpPCItem::XclExpPCItem().
void XclPCItem::SetError | ( | sal_uInt16 | nError | ) |
Sets the item to 'error' type and adds the passed Excel error code.
Definition at line 88 of file xlpivot.cxx.
References EXC_PCITEM_ERROR, maText, meType, and mnError.
Referenced by XclImpPCItem::ReadSxerror().
void XclPCItem::SetInteger | ( | sal_Int16 | nValue | ) |
Sets the item to 'integer' type and adds the passed value.
Definition at line 81 of file xlpivot.cxx.
References EXC_PCITEM_INTEGER, maText, meType, mnValue, and nValue.
Referenced by XclImpPCItem::ReadSxinteger(), and XclExpPCItem::XclExpPCItem().
void XclPCItem::SetText | ( | const OUString & | rText | ) |
Sets the item to 'text' type and adds the passed text.
Definition at line 61 of file xlpivot.cxx.
References EXC_PCITEM_TEXT, maText, and meType.
Referenced by XclImpPCItem::ReadSxstring(), and XclExpPCItem::XclExpPCItem().
union { ... } XclPCItem::@5 |
Value of a date/time item.
|
private |
Text representation of the item.
Definition at line 419 of file xlpivot.hxx.
Referenced by GetDateTime(), IsEqual(), and SetDateTime().
|
private |
Type of the item.
Definition at line 418 of file xlpivot.hxx.
Referenced by ConvertToText(), GetText(), IsEqual(), SetBool(), SetDateTime(), SetDouble(), SetEmpty(), SetError(), SetInteger(), and SetText().
bool XclPCItem::mbValue |
Error code of an error item.
Definition at line 425 of file xlpivot.hxx.
|
private |
Definition at line 417 of file xlpivot.hxx.
Referenced by GetBool(), GetDateTime(), GetDouble(), GetError(), GetInteger(), GetText(), GetType(), IsEmpty(), IsEqual(), SetBool(), SetDateTime(), SetDouble(), SetEmpty(), SetError(), SetInteger(), and SetText().
double XclPCItem::mfValue |
Definition at line 422 of file xlpivot.hxx.
Referenced by GetDouble(), IsEqual(), and SetDouble().
sal_uInt16 XclPCItem::mnError |
Value of an integer item.
Definition at line 424 of file xlpivot.hxx.
Referenced by GetError(), IsEqual(), and SetError().
sal_Int16 XclPCItem::mnValue |
Value of a floating-point item.
Definition at line 423 of file xlpivot.hxx.
Referenced by GetInteger(), IsEqual(), and SetInteger().