Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: SHGFMVWR.H
Link against: sheng.lib

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

Class CShgFormulaViewer

class CShgFormulaViewer : public CBase;

Description

Handles conversion of formula tokens (TFormulaToken) into localised strings suitable for display to users.

Derivation

Members

Defined in CShgFormulaViewer:
EFnDatabase, EFnDateAndTime, EFnError, EFnFinancial, EFnInformation, EFnLogical, EFnLookUp, EFnMathematical, EFnStatistical, EFnText, EFormulaEqualsSign, FirstFunctionNo(), FormulaEvaluator(), FunctionName(), FunctionType(), GetTextFormulaL(), GetTokenFormulaL(), InitWithTextFormula(), InitWithTokenFormula(), LastFunctionNo(), NewL(), NoArguments(), TFunctionType, anonymous, sFunction, sSkipToken, ~CShgFormulaViewer()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


~CShgFormulaViewer()

virtual ~CShgFormulaViewer();

Description

Destructor.


NewL()

static IMPORT_C CShgFormulaViewer *NewL(const CShgNameSet *aNameSet, const CShgWorkBook *aWorkBook, CSheetEngine *aSheetEngine, const TDesC &aResourceFile);

Description

Allocates and constructs a new formula viewer.

Parameters

const CShgNameSet *aNameSet

Name set to use

const CShgWorkBook *aWorkBook

Workbook to use

CSheetEngine *aSheetEngine

Spreadsheet engine to use

const TDesC &aResourceFile

Resource file from which to read localised strings for formula tokens

Return value

CShgFormulaViewer *

New formula viewer object

[Top]


Member functions


InitWithTokenFormula()

IMPORT_C void InitWithTokenFormula(const TCellRef &aCell, const TDesC8 *aFormula);

Description

Initialises the viewer with formula data.

!! this is very inefficient

!! unfortunately size of this is being used as a flag!!!

Parameters

const TCellRef &aCell

Position to use to resolve relative cell references

const TDesC8 *aFormula

Formula data


InitWithTextFormula()

IMPORT_C void InitWithTextFormula(const TCellRef &aCell, const TDesC &aText);

Description

Initialises the viewer with text data.

Parameters

const TCellRef &aCell

Position to use to resolve relative cell references

const TDesC &aText

Formula text


GetTextFormulaL()

IMPORT_C const TPtrC GetTextFormulaL();

Description

Gets a text representation of a formula.

The function converts formula data to text if necessary.

Return value

const TPtrC

Text representation of a formula


GetTokenFormulaL()

IMPORT_C const TPtrC8 GetTokenFormulaL(TShgError &aError);

Description

Gets a token representation of a formula.

The function converts formula data to tokens if necessary.

Parameters

TShgError &aError

On return, EShgNoError if function succeeds

Return value

const TPtrC8

Token representation of a formula


FormulaEvaluator()

inline CShgFormulaEvaluator *FormulaEvaluator() const;

Description

Gets a formula evaluator object.

Return value

CShgFormulaEvaluator *

Formula evaluator object


FirstFunctionNo()

IMPORT_C TInt FirstFunctionNo() const;

Description

Gets the first token (as ordered in TFormulaToken) that represents a function.

Return value

TInt

First function token


LastFunctionNo()

IMPORT_C TInt LastFunctionNo() const;

Description

Gets the last token (as ordered in TFormulaToken) that represents a function.

Return value

TInt

Last function token


FunctionName()

IMPORT_C const TPtrC FunctionName(TFormulaToken aToken) const;

Description

Gets a localised string for a specified formula token.

Parameters

TFormulaToken aToken

Formula token

Return value

const TPtrC

String name for aToken


FunctionType()

IMPORT_C TFunctionType FunctionType(TFormulaToken aToken) const;

Description

Gets the type (financial, statistical, etc.) of a specified function.

Parameters

TFormulaToken aToken

Function formula token

Return value

TFunctionType

Type of aToken


NoArguments()

IMPORT_C TInt NoArguments(TFormulaToken aToken) const;

Description

Gets the number of arguments required for a specified function.

Parameters

TFormulaToken aToken

Function formula token

Return value

TInt

Number of arguments required for aFunction

[Top]


Member enumerations


Enum anonymous

n/a

Description

Character definition.

EFormulaEqualsSign

Character for the formula equals sign.


Enum TFunctionType

TFunctionType

Description

Types of function.

EFnError

Error.

EFnFinancial

Financial.

EFnDateAndTime

Date/time.

EFnMathematical

Mathematical.

EFnStatistical

Statistical.

EFnLookUp

Look-up.

EFnText

Text.

EFnLogical

Logical.

EFnInformation

Information.

EFnDatabase

Database.

[Top]


Member data


sSkipToken

const TUint8 sSkipToken;

Description


sFunction

const CShgFormulaEvaluator::TFunction sFunction;

Description