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 28 of file dpitemdata.hxx.

Member Enumeration Documentation

◆ Type

Enumerator
GroupValue 
RangeStart 
Value 
String 
Error 
Empty 

Definition at line 33 of file dpitemdata.hxx.

Constructor & Destructor Documentation

◆ ScDPItemData() [1/4]

ScDPItemData::ScDPItemData ( )

Definition at line 74 of file dpitemdata.cxx.

References Empty, and meType.

◆ ScDPItemData() [2/4]

ScDPItemData::ScDPItemData ( const ScDPItemData r)

◆ ScDPItemData() [3/4]

ScDPItemData::ScDPItemData ( const OUString &  rStr)

Definition at line 113 of file dpitemdata.cxx.

References meType, mpString, pData, and String.

◆ ScDPItemData() [4/4]

ScDPItemData::ScDPItemData ( sal_Int32  nGroupType,
sal_Int32  nValue 
)

◆ ~ScDPItemData()

ScDPItemData::~ScDPItemData ( )

Definition at line 126 of file dpitemdata.cxx.

References DisposeString().

Member Function Documentation

◆ Compare()

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

◆ DisposeString()

void ScDPItemData::DisposeString ( )
private

◆ GetCellType()

ScDPValue::Type ScDPItemData::GetCellType ( ) const

◆ GetGroupValue()

ScDPItemData::GroupValueAttr ScDPItemData::GetGroupValue ( ) const

◆ GetString()

OUString ScDPItemData::GetString ( ) const

◆ GetType()

Type ScDPItemData::GetType ( ) const
inline

Definition at line 67 of file dpitemdata.hxx.

References meType.

Referenced by ScDPResultMember::FillMemberResults(), and ScDPCache::GetFormattedString().

◆ GetValue()

double ScDPItemData::GetValue ( ) const

◆ HasStringData()

bool ScDPItemData::HasStringData ( ) const

Definition at line 366 of file dpitemdata.cxx.

References Error, meType, and String.

Referenced by ScDPCache::ValidQuery().

◆ IsCaseInsEqual()

bool ScDPItemData::IsCaseInsEqual ( const ScDPItemData r) const

◆ IsEmpty()

bool ScDPItemData::IsEmpty ( ) const

Definition at line 317 of file dpitemdata.cxx.

References Empty, and meType.

Referenced by ScDPCache::ValidQuery().

◆ IsValue()

bool ScDPItemData::IsValue ( ) const

◆ operator<()

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

Definition at line 232 of file dpitemdata.cxx.

References Compare().

◆ operator=()

ScDPItemData & ScDPItemData::operator= ( const ScDPItemData r)

◆ operator==()

bool ScDPItemData::operator== ( const ScDPItemData r) const

◆ SetEmpty()

void ScDPItemData::SetEmpty ( )

Definition at line 131 of file dpitemdata.cxx.

References DisposeString(), Empty, and meType.

◆ SetErrorStringInterned()

void ScDPItemData::SetErrorStringInterned ( rtl_uString *  pS)

Definition at line 181 of file dpitemdata.cxx.

References Error, meType, pS, and SetStringInterned().

◆ SetRangeFirst()

void ScDPItemData::SetRangeFirst ( )

Definition at line 167 of file dpitemdata.cxx.

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

Referenced by ScDPSaveNumGroupDimension::AddToCache().

◆ SetRangeLast()

void ScDPItemData::SetRangeLast ( )

Definition at line 174 of file dpitemdata.cxx.

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

Referenced by ScDPSaveNumGroupDimension::AddToCache().

◆ SetRangeStart()

void ScDPItemData::SetRangeStart ( double  fVal)

◆ SetString()

void ScDPItemData::SetString ( const OUString &  rS)

Definition at line 137 of file dpitemdata.cxx.

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

◆ SetStringInterned()

void ScDPItemData::SetStringInterned ( rtl_uString *  pS)

Definition at line 145 of file dpitemdata.cxx.

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

Referenced by SetErrorStringInterned().

◆ SetValue()

void ScDPItemData::SetValue ( double  fVal)

Definition at line 153 of file dpitemdata.cxx.

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

Referenced by ScDPObject::GetFormattedString().

Friends And Related Function Documentation

◆ ScDPCache

friend class ScDPCache
friend

Definition at line 30 of file dpitemdata.hxx.

Member Data Documentation

◆ 

union { ... } ScDPItemData::@27

◆ DateFirst

const sal_Int32 ScDPItemData::DateFirst = -1
static

Definition at line 35 of file dpitemdata.hxx.

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

◆ DateLast

const sal_Int32 ScDPItemData::DateLast = 10000
static

Definition at line 36 of file dpitemdata.hxx.

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

◆ maGroupValue

GroupValueAttr ScDPItemData::maGroupValue

◆ mbStringInterned

bool ScDPItemData::mbStringInterned
private

Definition at line 53 of file dpitemdata.hxx.

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

◆ meType

sal_uInt8 ScDPItemData::meType
private

◆ mfValue

double ScDPItemData::mfValue

◆ mpString

rtl_uString* ScDPItemData::mpString

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