LibreOffice Module sc (master)  1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
ScDPItemData Class Reference

When assigning a string value, you can also assign an interned string whose life-cycle is managed by the pivot cache that it belongs to. More...

#include <dpitemdata.hxx>

Collaboration diagram for ScDPItemData:
[legend]

Classes

struct  GroupValueAttr
 

Public Types

enum  Type {
  GroupValue = 0,
  RangeStart = 1,
  Value = 2,
  String = 3,
  Error = 4,
  Empty = 5
}
 

Public Member Functions

 ScDPItemData ()
 
 ScDPItemData (const ScDPItemData &r)
 
 ScDPItemData (const OUString &rStr)
 
 ScDPItemData (sal_Int32 nGroupType, sal_Int32 nValue)
 
 ~ScDPItemData ()
 
Type GetType () const
 
void SetEmpty ()
 
void SetString (const OUString &rS)
 
void SetStringInterned (rtl_uString *pS)
 
void SetValue (double fVal)
 
void SetRangeStart (double fVal)
 
void SetRangeFirst ()
 
void SetRangeLast ()
 
void SetErrorStringInterned (rtl_uString *pS)
 
bool IsCaseInsEqual (const ScDPItemData &r) const
 
bool operator== (const ScDPItemData &r) const
 
bool operator< (const ScDPItemData &r) const
 
ScDPItemDataoperator= (const ScDPItemData &r)
 
bool IsEmpty () const
 
bool IsValue () const
 
OUString GetString () const
 
double GetValue () const
 
GroupValueAttr GetGroupValue () const
 
bool HasStringData () const
 
ScDPValue::Type GetCellType () const
 

Static Public Member Functions

static sal_Int32 Compare (const ScDPItemData &rA, const ScDPItemData &rB)
 

Static Public Attributes

static const sal_Int32 DateFirst = -1
 
static const sal_Int32 DateLast = 10000
 

Private Member Functions

void DisposeString ()
 

Private Attributes

union {
   rtl_uString *   mpString
 
   GroupValueAttr   maGroupValue
 
   double   mfValue
 
}; 
 
sal_uInt8 meType:3
 
bool mbStringInterned:1
 

Friends

class ScDPCache
 

Detailed Description

When assigning a string value, you can also assign an interned string whose life-cycle is managed by the pivot cache that it belongs to.

Those methods that take a string pointer assume that the string is interned.

Do make sure that an item with an interned string won't persist after the pivot cache has been destroyed or reloaded.

Definition at line 29 of file dpitemdata.hxx.

Member Enumeration Documentation

Enumerator
GroupValue 
RangeStart 
Value 
String 
Error 
Empty 

Definition at line 34 of file dpitemdata.hxx.

Constructor & Destructor Documentation

ScDPItemData::ScDPItemData ( )

Definition at line 74 of file dpitemdata.cxx.

References Empty, and meType.

ScDPItemData::ScDPItemData ( const ScDPItemData r)
ScDPItemData::ScDPItemData ( const OUString &  rStr)

Definition at line 113 of file dpitemdata.cxx.

References meType, mpString, pData, and String.

ScDPItemData::ScDPItemData ( sal_Int32  nGroupType,
sal_Int32  nValue 
)
ScDPItemData::~ScDPItemData ( )

Definition at line 126 of file dpitemdata.cxx.

References DisposeString().

Member Function Documentation

sal_Int32 ScDPItemData::Compare ( const ScDPItemData rA,
const ScDPItemData rB 
)
static
void ScDPItemData::DisposeString ( )
private
ScDPValue::Type ScDPItemData::GetCellType ( ) const
ScDPItemData::GroupValueAttr ScDPItemData::GetGroupValue ( ) const
OUString ScDPItemData::GetString ( ) const
Type ScDPItemData::GetType ( ) const
inline
double ScDPItemData::GetValue ( ) const
bool ScDPItemData::HasStringData ( ) const

Definition at line 366 of file dpitemdata.cxx.

References Error, meType, and String.

Referenced by ScDPMembers::ScDPMembers(), and ScDPCache::ValidQuery().

bool ScDPItemData::IsCaseInsEqual ( const ScDPItemData r) const
bool ScDPItemData::IsEmpty ( ) const

Definition at line 317 of file dpitemdata.cxx.

References Empty, and meType.

Referenced by ScDPCache::InitFromDataBase(), and ScDPCache::ValidQuery().

bool ScDPItemData::IsValue ( ) const
bool ScDPItemData::operator< ( const ScDPItemData r) const

Definition at line 232 of file dpitemdata.cxx.

References Compare().

ScDPItemData & ScDPItemData::operator= ( const ScDPItemData r)
bool ScDPItemData::operator== ( const ScDPItemData r) const
void ScDPItemData::SetEmpty ( )

Definition at line 131 of file dpitemdata.cxx.

References DisposeString(), Empty, and meType.

Referenced by ScDPCache::InitFromDataBase().

void ScDPItemData::SetErrorStringInterned ( rtl_uString *  pS)

Definition at line 181 of file dpitemdata.cxx.

References Error, meType, and SetStringInterned().

void ScDPItemData::SetRangeFirst ( )

Definition at line 167 of file dpitemdata.cxx.

References DisposeString(), meType, mfValue, and RangeStart.

Referenced by ScDPSaveNumGroupDimension::AddToCache().

void ScDPItemData::SetRangeLast ( )

Definition at line 174 of file dpitemdata.cxx.

References DisposeString(), meType, mfValue, and RangeStart.

Referenced by ScDPSaveNumGroupDimension::AddToCache().

void ScDPItemData::SetRangeStart ( double  fVal)
void ScDPItemData::SetString ( const OUString &  rS)

Definition at line 137 of file dpitemdata.cxx.

References DisposeString(), meType, mpString, and String.

Referenced by ScDPSaveGroupItem::ConvertElementsToItems().

void ScDPItemData::SetStringInterned ( rtl_uString *  pS)

Definition at line 145 of file dpitemdata.cxx.

References DisposeString(), mbStringInterned, meType, mpString, and String.

Referenced by SetErrorStringInterned().

void ScDPItemData::SetValue ( double  fVal)

Friends And Related Function Documentation

friend class ScDPCache
friend

Definition at line 31 of file dpitemdata.hxx.

Member Data Documentation

union { ... }
const sal_Int32 ScDPItemData::DateFirst = -1
static

Definition at line 36 of file dpitemdata.hxx.

Referenced by ScDPUtil::getDateGroupName(), and ScDPUtil::getDatePartValue().

const sal_Int32 ScDPItemData::DateLast = 10000
static

Definition at line 37 of file dpitemdata.hxx.

Referenced by ScDPUtil::getDateGroupName(), and ScDPUtil::getDatePartValue().

GroupValueAttr ScDPItemData::maGroupValue
bool ScDPItemData::mbStringInterned
private

Definition at line 54 of file dpitemdata.hxx.

Referenced by DisposeString(), operator=(), ScDPItemData(), and SetStringInterned().

sal_uInt8 ScDPItemData::meType
private
double ScDPItemData::mfValue
rtl_uString* ScDPItemData::mpString

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