Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: SHGAPI.H
Link against: sheng.lib

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

Class CSheetEngine

class CSheetEngine : public CBase;

Description

Spreadsheet application engine.

Derivation

Members

Defined in CSheetEngine:
CSheetEngine(), Compress(), ConstructL(), ConstructL(), ConstructL(), ConstructL(), CreateCellFromTextL(), CurrentWorkSheet(), DisableUndoAndRedo(), EForceText, ERedoDataAvailable, EUndoDataAvailable, EndEditOperationL(), ExistsCircularDependency(), FormulaViewer(), GetAnyCircularDependency(), HasChanged(), IsRedoAvailable(), IsUndoAvailable(), LocaleHasChanged(), MarkUnchanged(), NameSet(), NewEmptyL(), NewL(), NewL(), NewL(), NewL(), NewLC(), RecalculateL(), RecalculationInProgress(), RecalculationNeeded(), RecalculationToBeDoneAutomatically(), RecalculationToBeDoneInBackground(), RedoOperationL(), Reset(), RestoreL(), SetCallBackAPI(), SetCurrentWorkSheet(), SetRecalculationToBeDoneAutomatically(), SetRecalculationToBeDoneInBackgroundL(), SetTemplateAdditionalDataL(), ShgCellAsText(), ShgCellAsText(), StartEditOperation(), StoreL(), SyntaxErrorPos(), TCleanupStackableRollBack, TemplateAdditionalData(), UndoOperationL(), WorkBook(), anonymous, anonymous, ~CSheetEngine()

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


Construction and destruction


~CSheetEngine()

virtual IMPORT_C ~CSheetEngine();

Description

Destructor.


NewL()

static IMPORT_C CSheetEngine *NewL();

Description

Allocates and constructs a new spreadsheet engine object.

Return value

CSheetEngine *

New spreadsheet engine object


NewLC()

static IMPORT_C CSheetEngine *NewLC();

Description

Allocates and constructs a new spreadsheet engine object, leaving the object on the cleanup stack.

Return value

CSheetEngine *

New spreadsheet engine object


NewL()

static IMPORT_C CSheetEngine *NewL(CShgCellAdditionalData *aAdditionalData);

Description

Allocates and constructs a new spreadsheet engine object, specifying additional cell formatting data.

Parameters

CShgCellAdditionalData *aAdditionalData

Additional cell formatting data

Return value

CSheetEngine *

New spreadsheet engine object


NewL()

static IMPORT_C CSheetEngine *NewL(CShgCellAdditionalData *aAdditionalData, const TDesC &aResourceFileName);

Description

Allocates and constructs a new spreadsheet engine object, specifying additional cell formatting data and a resource file.

The engine's resource file specifies text for formulae and errors.

Parameters

CShgCellAdditionalData *aAdditionalData

Additional cell formatting data

const TDesC &aResourceFileName

Resource file name

Return value

CSheetEngine *

New spreadsheet engine object


NewL()

static IMPORT_C CSheetEngine *NewL(const TDesC &aResourceFileName);

Description

Allocates and constructs a new spreadsheet engine object, specifying a resource file.

The engine's resource file specifies text for formulae and errors.

Parameters

const TDesC &aResourceFileName

Resource file name

Return value

CSheetEngine *

New spreadsheet engine object


CSheetEngine()

protected: IMPORT_C CSheetEngine();

Description

Default constructor.


ConstructL()

protected: IMPORT_C void ConstructL();

Description

Second-phase constructor.


ConstructL()

protected: IMPORT_C void ConstructL(CShgCellAdditionalData *aAdditionalData);

Description

Second-phase constructor, specifying a resource file.

Parameters

CShgCellAdditionalData *aAdditionalData

Resource file name


ConstructL()

protected: IMPORT_C void ConstructL(CShgCellAdditionalData *aAdditionalData, const TDesC &aResourceFileName);

Description

Second-phase constructor, specifying additional cell formatting data and a resource file.

Parameters

CShgCellAdditionalData *aAdditionalData

Additional cell formatting data

const TDesC &aResourceFileName

Resource file name


ConstructL()

protected: IMPORT_C void ConstructL(const TDesC &aResourceFileName);

Description

Second-phase constructor, specifying a resource file.

Parameters

const TDesC &aResourceFileName

Resource file name.

[Top]


Member functions


NewEmptyL()

static IMPORT_C CSheetEngine *NewEmptyL(const CSheetEngine *aSheetEngine);

Description

Allocates and constructs a new spreadsheet engine object, specifying an existing spreadsheet engine as a template.

Parameters

const CSheetEngine *aSheetEngine

Existing spreadsheet to act as a template

Return value

CSheetEngine *

New spreadsheet engine object


SetCallBackAPI()

IMPORT_C void SetCallBackAPI(MShgCallBackAPI *aCallBackAPI);

Description

Sets a callback object, so that the engine can inform the client of events.

Parameters

MShgCallBackAPI *aCallBackAPI

Client-implemented callback object


Reset()

IMPORT_C void Reset();

Description

Resets the engine to default values.


LocaleHasChanged()

IMPORT_C void LocaleHasChanged();

Description

Informs the engine that the system locale has changed.


Compress()

IMPORT_C void Compress();

Description

Attempts to compress all data storage.


HasChanged()

IMPORT_C TBool HasChanged() const;

Description

Tests if the engine has performed updates that the client (e.g. UI) may need to get.

Once all updates have been processed, use MarkUnchanged() to reset the changed flag.

Return value

TBool

True if engine data has changed


MarkUnchanged()

IMPORT_C void MarkUnchanged();

Description

Reset the engine's changed flag.


StoreL()

IMPORT_C TStreamId StoreL(CStreamStore &aStore) const;

Description

Stores the engine.

Parameters

CStreamStore &aStore

Store to write to

Return value

TStreamId

ID of the root stream of the store


RestoreL()

IMPORT_C void RestoreL(const CStreamStore &aStore, TStreamId aId);

Description

Restores the engine.

Parameters

const CStreamStore &aStore

Store to read from

TStreamId aId

ID of the root stream of the store


CreateCellFromTextL()

IMPORT_C TShgError CreateCellFromTextL(TShgCell &aCell, const TDesC &aText, const CShgWorkSheet *aWorkSheet);

Description

Initialises a cell with content specified in a descriptor.

The function attempts to parse the descriptor content to set the cell type and content.

Parameters

TShgCell &aCell

Cell to set. On return, the cell initialised with data parsed from aText

const TDesC &aText

Text to parse

const CShgWorkSheet *aWorkSheet

Optional worksheet to use for calculating cell value, if a formula is specified

Return value

TShgError

Sheet engine error code


ShgCellAsText()

IMPORT_C void ShgCellAsText(TDes &aDes, const TShgCell &aShgCell) const;

Description

Gets the cell contents as a descriptor.

Parameters

TDes &aDes

On return, cell contents as a string

const TShgCell &aShgCell

Cell to read


ShgCellAsText()

IMPORT_C void ShgCellAsText(TDes &aDes, const TShgCell &aShgCell, TInt aWorkSheetNo) const;

Description

Gets the cell contents as a descriptor, specifying the cell's work sheet.

Parameters

TDes &aDes

On return, cell contents as a string

const TShgCell &aShgCell

Cell to read

TInt aWorkSheetNo

Cell's work sheet


SetRecalculationToBeDoneAutomatically()

IMPORT_C void SetRecalculationToBeDoneAutomatically(TBool aRecalculationToBeDoneAutomatically);

Description

Sets whether the engine should automatically recalculate the spreadsheet when required.

Parameters

TBool aRecalculationToBeDoneAutomatically

True if the engine should automatically recalculate the spreadsheet


RecalculationToBeDoneAutomatically()

IMPORT_C TBool RecalculationToBeDoneAutomatically() const;

Description

Tests if the engine automatically recalculates the spreadsheet when required.

Return value

TBool

True if the engine automatically recalculates the spreadsheet


SetRecalculationToBeDoneInBackgroundL()

IMPORT_C void SetRecalculationToBeDoneInBackgroundL(TBool aRecalculationToBeDoneInBackground);

Description

Sets whether the engine should recalculate the spreadsheet in the background, as a low priority active object, or synchronously.

Parameters

TBool aRecalculationToBeDoneInBackground

True if the engine should recalculate the spreadsheet in the background


RecalculationToBeDoneInBackground()

IMPORT_C TBool RecalculationToBeDoneInBackground() const;

Description

Tests if the engine recalculates the spreadsheet in the background, as a low priority active object, or synchronously.

Return value

TBool

True if the engine recalculates the spreadsheet in the background


RecalculateL()

IMPORT_C void RecalculateL();

Description

Recalculates the spreadsheet.

This can be a synchronous or asynchronous operation, depending on the value of RecalculationToBeDoneInBackground().


RecalculationNeeded()

IMPORT_C TBool RecalculationNeeded() const;

Description

Tests if the spreadsheet needs recalculating.

Return value

TBool

True if the spreadsheet needs recalculating


RecalculationInProgress()

IMPORT_C TBool RecalculationInProgress() const;

Description

Tests if a background recalculation is in progress.

Return value

TBool

True if a background recalculation is in progress


ExistsCircularDependency()

IMPORT_C TBool ExistsCircularDependency() const;

Description

Tests if circular dependency exists between cells.

Return value

TBool

True if a circular dependency exists between cells


GetAnyCircularDependency()

IMPORT_C void GetAnyCircularDependency(TBool &aKnown, TInt &aWorkSheetNo, TCellRef &aCoord) const;

Description

Finds a cell causing a circular dependency.

Parameters

TBool &aKnown

On return, true if a circular dependency cell was found

TInt &aWorkSheetNo

On return, the worksheet containing the cell

TCellRef &aCoord

On return, the cell causing the circular dependency


DisableUndoAndRedo()

IMPORT_C void DisableUndoAndRedo();

Description

Sets the engine to not provide support for undoing and redoing operations.


IsUndoAvailable()

IMPORT_C TBool IsUndoAvailable() const;

Description

Tests if the engine supports undo.

Return value

TBool

True if the engine supports undo


IsRedoAvailable()

IMPORT_C TBool IsRedoAvailable() const;

Description

Tests if the engine supports redo.

Return value

TBool

True if the engine supports redo


NameSet()

IMPORT_C CShgNameSet *NameSet() const;

Description

Gets the engine's name set.

Return value

CShgNameSet *

Name set


SetCurrentWorkSheet()

IMPORT_C void SetCurrentWorkSheet(const TDesC &aName);

Description

Sets the engine's current worksheet.

Parameters

const TDesC &aName

Name of the worksheet to make current


CurrentWorkSheet()

IMPORT_C CShgWorkSheet *CurrentWorkSheet() const;

Description

Gets the engine's current worksheet.

Return value

CShgWorkSheet *

Engine's current worksheet


WorkBook()

IMPORT_C CShgWorkBook *WorkBook() const;

Description

Gets the engine's workbook.

Return value

CShgWorkBook *

Engine's workbook


SyntaxErrorPos()

IMPORT_C TInt SyntaxErrorPos() const;

Description

Gets the position where a formula syntax error has been detected.

Return value

TInt

Position where a syntax error has been detected


FormulaViewer()

IMPORT_C CShgFormulaViewer *FormulaViewer() const;

Description

Gets the engine's formula viewer.

Return value

CShgFormulaViewer *

Engine's formula viewer


SetTemplateAdditionalDataL()

IMPORT_C void SetTemplateAdditionalDataL(CShgCellAdditionalData *aData);

Description

Sets default additional cell formatting data.

Parameters

CShgCellAdditionalData *aData

Additional cell formatting data


TemplateAdditionalData()

IMPORT_C const CShgCellAdditionalData *TemplateAdditionalData() const;

Description

Gets default additional cell formatting data.

Return value

const CShgCellAdditionalData *

Additional cell formatting data


UndoOperationL()

IMPORT_C void UndoOperationL();

Description

Undoes the last edit operation.


RedoOperationL()

IMPORT_C void RedoOperationL();

Description

Redoes the last edit operation.


StartEditOperation()

IMPORT_C void StartEditOperation();

Description

Marks the start of an edit operation.


EndEditOperationL()

IMPORT_C TShgError EndEditOperationL(TShgError aShgError);

Description

Marks the end of an edit operation.

Parameters

TShgError aShgError

Any error that occurred as part of the edit operation

Return value

TShgError

Same as aShgError

[Top]


Member classes


Class TCleanupStackableRollBack

class TCleanupStackableRollBack : public TCleanupItem;

Description

Derivation

[Top]


Member enumerations


Enum anonymous

n/a

Description

EForceText


Enum anonymous

n/a

Description

EUndoDataAvailable

ERedoDataAvailable