Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <SHGFMVWR.H>
Link against: sheng.lib
This item is not part of the S60 5th Edition SDK

Class CShgFormulaViewer

Interface status: deprecated

class CShgFormulaViewer : public CBase;

Description

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

Derivation

Members

Defined in CShgFormulaViewer:

Inherited from CBase:


Construction and destruction


~CShgFormulaViewer()

Interface status: deprecated Inherited from: CShgFormulaViewer

virtual ~CShgFormulaViewer();

Description

Destructor.


NewL(const CShgNameSet *,const CShgWorkBook *,CSheetEngine *,const TDesC &)

Interface status: deprecated Inherited from: CShgFormulaViewer

IMPORT_C static 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 TDesC16 &aResourceFile

Resource file from which to read localised strings for formula tokens

Return value

CShgFormulaViewer *

New formula viewer object

[Top]


Member functions


InitWithTokenFormula(const TCellRef &,const TDesC8 *)

Interface status: deprecated Inherited from: CShgFormulaViewer

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(const TCellRef &,const TDesC &)

Interface status: deprecated Inherited from: CShgFormulaViewer

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 TDesC16 &aText

Formula text


GetTextFormulaL()

Interface status: deprecated Inherited from: CShgFormulaViewer

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 TPtrC16

Text representation of a formula


GetTokenFormulaL(TShgError &)

Interface status: deprecated Inherited from: CShgFormulaViewer

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()const

Interface status: deprecated Inherited from: CShgFormulaViewer

inline CShgFormulaEvaluator* FormulaEvaluator() const;

Description

Gets a formula evaluator object.

Return value

CShgFormulaEvaluator *

Formula evaluator object


FirstFunctionNo()const

Interface status: deprecated Inherited from: CShgFormulaViewer

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()const

Interface status: deprecated Inherited from: CShgFormulaViewer

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(TFormulaToken)const

Interface status: deprecated Inherited from: CShgFormulaViewer

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 TPtrC16

String name for aToken


FunctionType(TFormulaToken)const

Interface status: deprecated Inherited from: CShgFormulaViewer

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

CShgFormulaViewer::TFunctionType

Type of aToken


NoArguments(TFormulaToken)const

Interface status: deprecated Inherited from: CShgFormulaViewer

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

Interface status: deprecated Inherited from: CShgFormulaViewer

n/a

Description

Character definition.

EFormulaEqualsSign

Character for the formula equals sign.


Enum TFunctionType

Interface status: deprecated Inherited from: CShgFormulaViewer

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

Interface status: deprecated Inherited from: CShgFormulaViewer

const TUint8 sSkipToken[256]={
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,0x80|2,2,2,2,2,2,2,2,2,2,10,
        6,4,4,0,0,0x80|6,0x80|2,0x80|8,0x80|14,0x80|14,2,6,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,
        };

Description


sFunction

Interface status: deprecated Inherited from: CShgFormulaViewer

const CShgFormulaEvaluator::TFunction sFunction[ETokLastArrayFn+1]={

    {&ShgFormula::FnNoAction,   0,   0,   0,   0},
    {&ShgFormula::FnOpCompareL, 0, 0, 0, 0},
    {&ShgFormula::FnOpCompareL, 0, 0, 0, 0},
    {&ShgFormula::FnOpCompareL, 0, 0, 0, 0},
    {&ShgFormula::FnOpCompareL, 0, 0, 0, 0},
    {&ShgFormula::FnOpCompareL, 0, 0, 0, 0},
    {&ShgFormula::FnOpCompareL, 0, 0, 0, 0},
    {&ShgFormula::FnOpAddL,     0, 0, 0, 0},
    {&ShgFormula::FnOpSubtractL,0,  0,    0,  0},
    {&ShgFormula::FnOpMultiplyL,0,  0,    0,  0},
    {&ShgFormula::FnOpDivideL,  0,    0,  0,    0},
    {&ShgFormula::FnOpPowerL,   0,   0,   0,   0},
    {&ShgFormula::FnNoAction,   0,   0,   0,   0},
    {&ShgFormula::FnOpUnaryMinusL,  0,    0,  0,    0},
    {&ShgFormula::FnOpLogicalNotL,  0,    0,  0,    0},
    {&ShgFormula::FnOpLogicalAndL,  0,    0,  0,    0},
    {&ShgFormula::FnOpLogicalOrL,   0,   0,   0,   0},
    {&ShgFormula::FnOpConcatenateL, 0, 0, 0, 0},

    {&ShgFormula::FnNoAction,   0,   0,   0,   0},
    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},
    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},
    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},

    {&ShgFormula::FnNoAction,   0,   0,   0,   0},
    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},
    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},
    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},
    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},
    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},
    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},
    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},

    {&ShgFormula::FnDmBadCodeL, 0, 0, 0, 0},

    {&ShgFormula::FnCnRealL,    0,  0,    0,  0},
    {&ShgFormula::FnCnIntL,     0, 0, 0, 0},
    {&ShgFormula::FnCnInt8L,    0,  0,    0,  0},
    {&ShgFormula::FnCnInt16L,   0,   0,   0,   0},
    {&ShgFormula::FnCnNullL,    0,  0,    0,  0},
    {&ShgFormula::FnCnArrayL,   0,   0,   0,   0},
    {&ShgFormula::FnCnNameL,    0,  0,    0,  0},
    {&ShgFormula::FnCnTextL,    0,  0,    0,  0},
    {&ShgFormula::FnCnCellL,    0,  0,    0,  0},
    {&ShgFormula::FnCnRangeL,   0,   0,   0,   0},

    {&ShgFormula::FnStatRangeL, 0, 0, 0, 0},
    {&ShgFormula::FnStatLitL,   0,   0,   0,   0},
    {&ShgFormula::FnStatEndL,   0,   0xff,    0x02,   0},


    {&ShgFormula::FnErrNullL,   EFnError,        0,  0x00, 0},    
    {&ShgFormula::FnErrDivByZeroL,EFnError,     0, 0x00,  0},   
    {&ShgFormula::FnErrValueL,  EFnError,     0, 0x00,  0},   
    {&ShgFormula::FnErrRefL,    EFnError,       0,   0x00,    0}, 
    {&ShgFormula::FnErrNameL,   EFnError,        0,  0x00, 0},    
    {&ShgFormula::FnErrNumL,    EFnError,       0,   0x00,    0}, 
    {&ShgFormula::FnErrNaL,     EFnError,      0,    0x00,   0},  


    {&ShgFormula::FnFalseL,     EFnLogical,        0,  0x00, 0},    
    {&ShgFormula::FnIfL,        EFnLogical,     3, 0x00,  0},   
    {&ShgFormula::FnTrueL,      EFnLogical,       0,   0x00,    0}, 


    {&ShgFormula::FnCellL,      EFnInformation,   2,   0x04,    0}, 
    {&ShgFormula::FnErrorTypeL, EFnInformation,    1,  0x00, 0},    
    {&ShgFormula::FnIsBlankL,   EFnInformation,  1,    0x00,   0},  
    {&ShgFormula::FnIsErrL,     EFnInformation,    1,  0x00, 0},    
    {&ShgFormula::FnIsErrorL,   EFnInformation,  1,    0x00,   0},  
    {&ShgFormula::FnIsLogicalL, EFnInformation,    1,  0x00, 0},    
    {&ShgFormula::FnIsNaL,      EFnInformation,   1,   0x00,    0}, 
    {&ShgFormula::FnIsNonTextL, EFnInformation,    1,  0x00, 0},    
    {&ShgFormula::FnIsNumberL,  EFnInformation,   1,   0x00,    0}, 
    {&ShgFormula::FnIsTextL,    EFnInformation, 1, 0x00,  0},   
    {&ShgFormula::FnNL,         EFnInformation,    1,  0x01, 0},    
    {&ShgFormula::FnTypeL,      EFnInformation,   1,   0x00,    0}, 


    {&ShgFormula::FnAddressL,   EFnLookUp,       2,   0x00,    0}, 
    {&ShgFormula::FnColumnL,    EFnLookUp,      1,    0x01,   0},  
    {&ShgFormula::FnColumnsL,   EFnLookUp,       1,   0x01,    0}, 
    {&ShgFormula::FnHLookUpL,   EFnLookUp,       3,   0x04,    0}, 
    {&ShgFormula::FnIndexL,     EFnLookUp,     3, 0x01,  0},   
    {&ShgFormula::FnIndirectL,  EFnLookUp,        1,  0x00, 0},    
    {&ShgFormula::FnLookUpL,    EFnLookUp,      3,    0x14,   0},  
    {&ShgFormula::FnOffsetL,    EFnLookUp,      3,    0x01,   0},  
    {&ShgFormula::FnRowL,       EFnLookUp,       1,   0x01,    0}, 
    {&ShgFormula::FnRowsL,      EFnLookUp,        1,  0x01, 0},    
    {&ShgFormula::FnVLookUpL,   EFnLookUp,       3,   0x04,    0}, 



    {&ShgFormula::FnCharL,      EFnText,      1,    0x00,   0},  
    {&ShgFormula::FnCodeL,      EFnText,      1,    0x00,   0},  
    {&ShgFormula::FnExactL,     EFnText,       2,   0x00,    0}, 
    {&ShgFormula::FnFindL,      EFnText,      3,    0x00,   0},  
    {&ShgFormula::FnLeftL,      EFnText,      2,    0x00,   0},  
    {&ShgFormula::FnLengthL,    EFnText,        1,  0x00, 0},    
    {&ShgFormula::FnLowerL,     EFnText,       1,   0x00,    0}, 
    {&ShgFormula::FnMidL,       EFnText,     3, 0x00,  0},   
    {&ShgFormula::FnProperL,    EFnText,        1,  0x00, 0},    
    {&ShgFormula::FnReplaceL,   EFnText,     4, 0x00,  0},   
    {&ShgFormula::FnRepeatL,    EFnText,        2,  0x00, 0},    
    {&ShgFormula::FnRightL,     EFnText,       2,   0x00,    0}, 
    {&ShgFormula::FnStringL,    EFnText,        2,  0x00, 0},    
    {&ShgFormula::FnTL,         EFnInformation,    1,  0x01, 0},    
    {&ShgFormula::FnTrimL,      EFnText,      1,    0x00,   0},  
    {&ShgFormula::FnUpperL,     EFnText,       1,   0x00,    0}, 
    {&ShgFormula::FnValueL,     EFnText,       1,   0x00,    0}, 


    {&ShgFormula::FnDateL,      EFnDateAndTime,   3,   0x00,    0}, 
    {&ShgFormula::FnDateValueL, EFnDateAndTime,    1,  0x00, 0},    
    {&ShgFormula::FnDayL,       EFnDateAndTime,  1,    0x00,   0},  
    {&ShgFormula::FnHourL,      EFnDateAndTime,   1,   0x00,    0}, 
    {&ShgFormula::FnMinuteL,    EFnDateAndTime, 1, 0x00,  0},   
    {&ShgFormula::FnMonthL,     EFnDateAndTime,    1,  0x00, 0},    
    {&ShgFormula::FnNowL,       EFnDateAndTime,  0,    0x00,   0},  
    {&ShgFormula::FnSecondL,    EFnDateAndTime, 1, 0x00,  0},   
    {&ShgFormula::FnTodayL,     EFnDateAndTime,    0,  0x00, 0},    
    {&ShgFormula::FnTimeL,      EFnDateAndTime,   3,   0x00,    0}, 
    {&ShgFormula::FnTimeValueL, EFnDateAndTime,    1,  0x00, 0},    
    {&ShgFormula::FnYearL,      EFnDateAndTime,   1,   0x00,    0}, 


    {&ShgFormula::FnAbsL,       EFnMathematical,1,   0x00,    0}, 
    {&ShgFormula::FnACosL,      EFnMathematical,1,    0x00,   0},  
    {&ShgFormula::FnASinL,      EFnMathematical,1,    0x00,   0},  
    {&ShgFormula::FnATanL,      EFnMathematical,1,    0x00,   0},  
    {&ShgFormula::FnATan2L,     EFnMathematical,2, 0x00,  0},   
    {&ShgFormula::FnCosL,       EFnMathematical,1,   0x00,    0}, 
    {&ShgFormula::FnDegreesL,   EFnMathematical,1,   0x00,    0}, 
    {&ShgFormula::FnExpL,       EFnMathematical,1,   0x00,    0}, 
    {&ShgFormula::FnFactL,      EFnMathematical,1,    0x00,   0},  
    {&ShgFormula::FnIntL,       EFnMathematical,1,   0x00,    0}, 
    {&ShgFormula::FnLnL,        EFnMathematical,1,  0x00, 0},    
    {&ShgFormula::FnLog10L,     EFnMathematical,1, 0x00,  0},   
    {&ShgFormula::FnModL,       EFnMathematical,2,   0x00,    0}, 
    {&ShgFormula::FnPiL,        EFnMathematical,0,  0x00, 0},    
    {&ShgFormula::FnRadiansL,   EFnMathematical,1,   0x00,    0}, 
    {&ShgFormula::FnRandL,      EFnMathematical,0,    0x00,   0},  
    {&ShgFormula::FnRoundL,     EFnMathematical,2, 0x00,  0},   
    {&ShgFormula::FnSignL,      EFnMathematical,1,    0x00,   0},  
    {&ShgFormula::FnSinL,       EFnMathematical,1,   0x00,    0}, 
    {&ShgFormula::FnSqrtL,      EFnMathematical,1,    0x00,   0},  
    {&ShgFormula::FnSumProductL,EFnMathematical,2,  0x05, 0},    
    {&ShgFormula::FnTanL,       EFnMathematical,1,   0x00,    0}, 
    {&ShgFormula::FnTruncL,     EFnMathematical,1, 0x00,  0},   


    {&ShgFormula::FnCTermL,     EFnFinancial,  3,    0x00,   0},  
    {&ShgFormula::FnDdbL,       EFnFinancial,    4,  0x00, 0},    
    {&ShgFormula::FnFvL,        EFnFinancial,   3,   0x00,    0}, 
    {&ShgFormula::FnIrrL,       EFnFinancial,    2,  0x04, 0},    
    {&ShgFormula::FnNpvL,       EFnFinancial,    2,  0x08, 0},    
    {&ShgFormula::FnPmtL,       EFnFinancial,    3,  0x00, 0},    
    {&ShgFormula::FnPvL,        EFnFinancial,   3,   0x00,    0}, 
    {&ShgFormula::FnRateL,      EFnFinancial, 3, 0x00,  0},   
    {&ShgFormula::FnSlnL,       EFnFinancial,    3,  0x00, 0},    
    {&ShgFormula::FnSydL,       EFnFinancial,    4,  0x00, 0},    
    {&ShgFormula::FnTermL,      EFnFinancial, 3, 0x00,  0},   


    {&ShgFormula::FnCombinL,    EFnStatistical, 2,  0x00, 0},    
    {&ShgFormula::FnPermutL,    EFnStatistical, 2,  0x00, 0},    


    {&ShgFormula::FnOpPowerL,   EFnMathematical, 2, 0,     0}, 


    {&ShgFormula::FnAverageBeginL,  EFnStatistical,   0xff,    0x02,   0},  
    {&ShgFormula::FnChooseBeginL,   EFnStatistical,  0xff, 0x00,  0},   
    {&ShgFormula::FnCountBeginL,    EFnStatistical, 0xff,  0x02, 0},    
    {&ShgFormula::FnCountABeginL,   EFnStatistical,  0xff, 0x02,  0},   
    {&ShgFormula::FnCountBlankBeginL,EFnStatistical,0xff,   0x02,    0}, 
    {&ShgFormula::FnMaxBeginL,      EFnStatistical,   0xff,    0x02,   0},  
    {&ShgFormula::FnMinBeginL,      EFnStatistical,   0xff,    0x02,   0},  
    {&ShgFormula::FnProductBeginL,  EFnStatistical,   0xff,    0x02,   0},  
    {&ShgFormula::FnStdevPBeginL,   EFnStatistical,  0xff, 0x02,  0},   
    {&ShgFormula::FnStdevBeginL,    EFnStatistical, 0xff,  0x02, 0},    
    {&ShgFormula::FnSumBeginL,      EFnStatistical,   0xff,    0x02,   0},  
    {&ShgFormula::FnSumSqBeginL,    EFnStatistical, 0xff,  0x02,     0}, 
    {&ShgFormula::FnVarPBeginL,     EFnStatistical,    0xff,   0x02,    0},  
    {&ShgFormula::FnVarBeginL,      EFnStatistical,   0xff,    0x02,   0},   


    
    };

Description