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

This class stores one cached value of a cached value list (used for instance in CRN, EXTERNNAME, tArray). More...

#include <xihelper.hxx>

Public Member Functions

 XclImpCachedValue (const XclImpCachedValue &)=delete
 delete copy constructor More...
 
const XclImpCachedValueoperator= (const XclImpCachedValue &)=delete
 delete copy-assignment operator More...
 
 XclImpCachedValue (XclImpStream &rStrm)
 Creates a cached value and reads contents from stream and stores it with its array address. More...
 
virtual ~XclImpCachedValue ()
 
sal_uInt8 GetType () const
 Returns the type of the cached value (EXC_CACHEDVAL_*). More...
 
const OUString & GetString () const
 Returns the cached string value, if this value is a string, else an empty string. More...
 
double GetValue () const
 Returns the cached number, if this value has number type, else 0.0. More...
 
bool GetBool () const
 Returns the cached Boolean value, if this value has Boolean type, else false. More...
 
sal_uInt8 GetXclError () const
 Returns the cached Calc error code, if this value has Error type, else 0. More...
 
FormulaError GetScError () const
 Returns the cached Calc error code, if this value has Error type, else 0. More...
 

Private Types

typedef ::std::unique_ptr< const ScTokenArrayScTokenArrayPtr
 

Private Attributes

OUString maStr
 
double mfValue
 Cached value is a string. More...
 
ScTokenArrayPtr mxTokArr
 Cached value is a double. More...
 
sal_uInt8 mnBoolErr
 Cached value is a formula or error code or Boolean. More...
 
sal_uInt8 mnType
 Boolean value or Excel error code. More...
 

Detailed Description

This class stores one cached value of a cached value list (used for instance in CRN, EXTERNNAME, tArray).

Definition at line 298 of file xihelper.hxx.

Member Typedef Documentation

◆ ScTokenArrayPtr

typedef ::std::unique_ptr< const ScTokenArray > XclImpCachedValue::ScTokenArrayPtr
private

Definition at line 323 of file xihelper.hxx.

Constructor & Destructor Documentation

◆ XclImpCachedValue() [1/2]

XclImpCachedValue::XclImpCachedValue ( const XclImpCachedValue )
delete

delete copy constructor

◆ XclImpCachedValue() [2/2]

XclImpCachedValue::XclImpCachedValue ( XclImpStream rStrm)
explicit

Creates a cached value and reads contents from stream and stores it with its array address.

Definition at line 777 of file xihelper.cxx.

References XclTools::ErrorToEnum(), EXC_CACHEDVAL_BOOL, EXC_CACHEDVAL_DOUBLE, EXC_CACHEDVAL_EMPTY, EXC_CACHEDVAL_ERROR, EXC_CACHEDVAL_STRING, maStr, mfValue, mnBoolErr, mnType, mxTokArr, SvStream::ReadDouble(), and rStrm.

◆ ~XclImpCachedValue()

XclImpCachedValue::~XclImpCachedValue ( )
virtual

Definition at line 811 of file xihelper.cxx.

Member Function Documentation

◆ GetBool()

bool XclImpCachedValue::GetBool ( ) const
inline

Returns the cached Boolean value, if this value has Boolean type, else false.

Definition at line 316 of file xihelper.hxx.

References EXC_CACHEDVAL_BOOL, mnBoolErr, and mnType.

◆ GetScError()

FormulaError XclImpCachedValue::GetScError ( ) const

Returns the cached Calc error code, if this value has Error type, else 0.

Definition at line 815 of file xihelper.cxx.

References EXC_CACHEDVAL_ERROR, XclTools::GetScErrorCode(), mnBoolErr, and mnType.

◆ GetString()

const OUString & XclImpCachedValue::GetString ( ) const
inline

Returns the cached string value, if this value is a string, else an empty string.

Definition at line 312 of file xihelper.hxx.

References maStr.

◆ GetType()

sal_uInt8 XclImpCachedValue::GetType ( ) const
inline

Returns the type of the cached value (EXC_CACHEDVAL_*).

Definition at line 310 of file xihelper.hxx.

References mnType.

◆ GetValue()

double XclImpCachedValue::GetValue ( ) const
inline

Returns the cached number, if this value has number type, else 0.0.

Definition at line 314 of file xihelper.hxx.

References mfValue.

◆ GetXclError()

sal_uInt8 XclImpCachedValue::GetXclError ( ) const
inline

Returns the cached Calc error code, if this value has Error type, else 0.

Definition at line 318 of file xihelper.hxx.

References EXC_CACHEDVAL_ERROR, EXC_ERR_NA, mnBoolErr, and mnType.

◆ operator=()

const XclImpCachedValue & XclImpCachedValue::operator= ( const XclImpCachedValue )
delete

delete copy-assignment operator

Member Data Documentation

◆ maStr

OUString XclImpCachedValue::maStr
private

Definition at line 325 of file xihelper.hxx.

Referenced by GetString(), and XclImpCachedValue().

◆ mfValue

double XclImpCachedValue::mfValue
private

Cached value is a string.

Definition at line 326 of file xihelper.hxx.

Referenced by GetValue(), and XclImpCachedValue().

◆ mnBoolErr

sal_uInt8 XclImpCachedValue::mnBoolErr
private

Cached value is a formula or error code or Boolean.

Definition at line 328 of file xihelper.hxx.

Referenced by GetBool(), GetScError(), GetXclError(), and XclImpCachedValue().

◆ mnType

sal_uInt8 XclImpCachedValue::mnType
private

Boolean value or Excel error code.

Definition at line 329 of file xihelper.hxx.

Referenced by GetBool(), GetScError(), GetType(), GetXclError(), and XclImpCachedValue().

◆ mxTokArr

ScTokenArrayPtr XclImpCachedValue::mxTokArr
private

Cached value is a double.

Definition at line 327 of file xihelper.hxx.

Referenced by XclImpCachedValue().


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