»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Application Engines SHENG »
CShgWorkSheet
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 CShgWorkSheet : public CBase, public MShgCellReader;
Description
A spreadsheet engine worksheet.
Derivation
MShgCellReader
- Interface to read a specified cell
CBase
- Base class for all classes to be instantiated on the heap
CShgWorkSheet
- A spreadsheet engine worksheet
Members
Defined in CShgWorkSheet
:
AddCellInsideEditOperationL()
, BottomRight()
, CellWasChangedByLastEditOperation()
, ClearL()
, ClearL()
, CopyL()
, CopyL()
, DefaultAdditionalData()
, DeleteCellInsideEditOperationL()
, EClearAdditionalData
, EClearAll
, EClearContents
, EDeleteCellsInRangeObliterated
, EDisallowCellsInRangeObliterated
, EPasteActionAdd
, EPasteActionDivide
, EPasteActionMultiply
, EPasteActionOverwrite
, EPasteActionSubtract
, EPasteAdditionalData
, EPasteAll
, EPasteFormula
, EPasteValue
, ESearchDirectionBackwards
, ESearchDirectionForwards
, ESearchOrderByColumn
, ESearchOrderByRow
, ESearchThroughAll
, ESearchThroughFormulae
, ESearchThroughValues
, EShiftHorizontally
, EShiftVertically
, ESortOrientationLeftToRight
, ESortOrientationTopToBottom
, EffectiveCharFormat()
, EffectiveCharFormatRead()
, EffectiveNumberFormat()
, EffectiveNumberFormatRead()
, EffectiveParaFormat()
, EffectiveParaFormatRead()
, GridLay()
, GridTable()
, IsAnyCellInRangeProtected()
, IsCellProtected()
, IsLocked()
, Lock()
, MShgReadCell()
, Name()
, PasteL()
, ProtectL()
, ProtectL()
, ReadFormulaCellTextL()
, ReadShgCell()
, SSortKey
, SearchL()
, SearchL()
, SetCellL()
, SetNameL()
, SetShowZeros()
, SheetEngine()
, ShiftCellsL()
, ShowZeros()
, SortL()
, TClearParameters
, TPasteAction
, TPasteWhat
, TSearchDirection
, TSearchOrder
, TSearchThroughWhat
, TShiftDirection
, TShiftRule
, TSortOrientation
, UpdateAdditionalDataL()
, UpdateAdditionalDataL()
, WorkSheetNo()
, ~CShgWorkSheet()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Construction and destruction
virtual ~CShgWorkSheet();
Description
Destructor.
IMPORT_C TShgError SortL(const TRangeRef &aRangeRef, const CArrayFix< SSortKey > *aArrayOfSortKeys, TSortOrientation aSortOrientation);
Description
Sorts a range of cells.
Parameters
const TRangeRef &aRangeRef |
Range of cells to sort
|
const CArrayFix < SSortKey > *aArrayOfSortKeys |
Array of keys by which to sort. The function applies the first key in the array to the first column/row in the range, the
second key to the second column/row, etc.
|
TSortOrientation aSortOrientation |
Sort orientation (columns or rows)
|
|
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
IMPORT_C const TShgCell *SearchL(const TDesC &aTextToFind, const CArrayFix< TRangeRef > *aRangeArrayToSearchIn, const TCellRef
&aStartCell, TBool aIncludeStartCell, TBool aSearchCyclically, TSearchOrder aSearchOrder, TSearchDirection aSearchDirection,
TUint32 aWhatToSearchThrough, TBool aMatchCase, TBool aFindEntireCellOnly) const;
Description
Searches an array of ranges for some specified text.
Parameters
const TDesC &aTextToFind |
Text to search for
|
const CArrayFix < TRangeRef > *aRangeArrayToSearchIn |
Array of cell ranges that defines the search area
|
const TCellRef &aStartCell |
Cell at which to start the search
|
TBool aIncludeStartCell |
If true, include aStartCell in the search
|
TBool aSearchCyclically |
If true, wrap around from end of search area to the beginning
|
TSearchOrder aSearchOrder |
Search by row or column
|
TSearchDirection aSearchDirection |
Search forwards or backwards
|
TUint32 aWhatToSearchThrough |
Search cells values and/or formulae. This is a bitmask of TSearchThroughWhat values.
|
TBool aMatchCase |
If true, match case
|
TBool aFindEntireCellOnly |
If true, only match with entire cells
|
|
Return value
const TShgCell * |
If successful, a cell matching the search criteria, else NULL
|
|
IMPORT_C const TShgCell *SearchL(const TDesC &aTextToFind, const TRangeRef &aRangeToSearchIn, const TCellRef &aStartCell,
TBool aIncludeStartCell, TBool aSearchCyclically, TSearchOrder aSearchOrder, TSearchDirection aSearchDirection, TUint32 aWhatToSearchThrough,
TBool aMatchCase, TBool aFindEntireCellOnly) const;
Description
Searches a range for some specified text.
Parameters
const TDesC &aTextToFind |
Text to search for
|
const TRangeRef &aRangeToSearchIn |
Cell range that defines the search area
|
const TCellRef &aStartCell |
Cell at which to start the search
|
TBool aIncludeStartCell |
If true, include aStartCell in the search
|
TBool aSearchCyclically |
If true, wrap around from end of search area to the beginning
|
TSearchOrder aSearchOrder |
Search by row or column
|
TSearchDirection aSearchDirection |
Search forwards or backwards
|
TUint32 aWhatToSearchThrough |
Search cells values and/or formulae. This is a bitmask of TSearchThroughWhat values.
|
TBool aMatchCase |
If true, match case
|
TBool aFindEntireCellOnly |
If true, only match with entire cells
|
|
Return value
const TShgCell * |
If successful, a cell matching the search criteria, else NULL
|
|
IMPORT_C TShgError ShiftCellsL(const TCellRef &aReferenceCell, TInt aShiftAmount, TInt aExtentOfBlockShifted, TShiftDirection
aShiftDirection, TShiftRule aShiftRule);
Description
Shifts some specified rows or columns.
The rows/columns to move are specified by an origin cell, plus the number of rows/columns from this point. The movement is
specified by an amount and a direction.
!! disable undo until the grid-lay part can be undone too (V1.1?)
Parameters
const TCellRef &aReferenceCell |
Origin of cells to move
|
TInt aShiftAmount |
Amount of rows/columns to move the cells
|
TInt aExtentOfBlockShifted |
Number of rows/columns to shift
|
TShiftDirection aShiftDirection |
Shift direction
|
TShiftRule aShiftRule |
Flag to decide whether to allow existing cells to be overwritten
|
|
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
IMPORT_C TShgError ClearL(const TCellRef &aCell, TUint32 aWhatToClear=EClearAll);
Description
Clears a cell.
Parameters
const TCellRef &aCell |
Cell to clear
|
TUint32 aWhatToClear |
Clear contents and/or additional data flag. This is a bitmask of TClearParameters values.
|
|
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
IMPORT_C TShgError ClearL(const CArrayFix< TRangeRef > *aRangeArray, TUint32 aWhatToClear=EClearAll);
Description
Clears an array of ranges.
Parameters
const CArrayFix < TRangeRef > *aRangeArray |
Array of ranges to clear
|
TUint32 aWhatToClear |
Clear contents and/or additional data flag. This is a bitmask of TClearParameters values.
|
|
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
CellWasChangedByLastEditOperation()
IMPORT_C TBool CellWasChangedByLastEditOperation(const TCellRef &aCellRef) const;
Description
Tests if a specified cell was changed by the last edit operation.
Parameters
Return value
TBool
|
True if cell was changed, else false
|
|
IMPORT_C TShgError UpdateAdditionalDataL(const TCellRef &aCell, const CShgCellAdditionalData *aData);
Description
Updates additional data (formatting information) for a specified cell.
Parameters
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
IMPORT_C TShgError UpdateAdditionalDataL(const CArrayFix< TRangeRef > *aRangeArray, const CShgCellAdditionalData *aData);
Description
Updates additional data for a specified array of ranges.
Parameters
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
EffectiveParaFormatRead()
IMPORT_C const CParaFormatLayer *EffectiveParaFormatRead(const TCellRef &aCell) const;
Description
Gets the paragraph layer formatting that applies to a specified cell.
Parameters
Return value
IMPORT_C const CParaFormatLayer *EffectiveParaFormat(const TCellRef &aCell, const TShgCell *aShgCell) const;
Description
Gets the paragraph layer formatting that applies to a cell, specified by reference or by object.
Parameters
const TCellRef &aCell |
Cell to query if aShgCell is NULL
|
const TShgCell *aShgCell |
Cell to query. This can be NULL.
|
|
Return value
EffectiveCharFormatRead()
IMPORT_C const CCharFormatLayer *EffectiveCharFormatRead(const TCellRef &aCell) const;
Description
Gets the character layer formatting that applies to a specified cell.
Parameters
Return value
IMPORT_C const CCharFormatLayer *EffectiveCharFormat(const TCellRef &aCell, const TShgCell *aShgCell) const;
Description
Gets the character layer formatting that applies to a cell, specified by reference or by object.
Parameters
const TCellRef &aCell |
Cell to query if aShgCell is NULL
|
const TShgCell *aShgCell |
Cell to query. This can be NULL.
|
|
Return value
EffectiveNumberFormatRead()
IMPORT_C TShgNumberFormat EffectiveNumberFormatRead(const TCellRef &aCell) const;
Description
Gets the number format for a specified cell.
Parameters
Return value
IMPORT_C TShgNumberFormat EffectiveNumberFormat(const TCellRef &aCell, const TShgCell *aShgCell) const;
Description
Gets the number format for a cell, specified by reference or by object.
Parameters
const TCellRef &aCell |
Cell to query if aShgCell is NULL
|
const TShgCell *aShgCell |
Cell to query. This can be NULL.
|
|
Return value
IMPORT_C TShgError ProtectL(const TCellRef &aCell, TBool aProtected);
Description
Sets a specified cell to be protected.
Parameters
const TCellRef &aCell |
Cell to set
|
TBool aProtected |
True to set the cell to protected, false to set it to unprotected
|
|
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
IMPORT_C TShgError ProtectL(const CArrayFix< TRangeRef > *aRangeArray, TBool aProtected);
Description
Protects a specified array of ranges.
Parameters
const CArrayFix < TRangeRef > *aRangeArray |
Ranges to set
|
TBool aProtected |
True to set the ranges to protected, false to set them to unprotected
|
|
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
IMPORT_C TBool IsCellProtected(const TCellRef &aCell) const;
Description
Tests if a specified cell is protected.
Parameters
Return value
TBool
|
True if the cell is protected, otherwise false.
|
|
IsAnyCellInRangeProtected()
IMPORT_C TBool IsAnyCellInRangeProtected(const TRangeRef &aRange) const;
Description
Tests if any cell in a specified range is protected.
Parameters
Return value
TBool
|
True if any cell is protected, otherwise false
|
|
IMPORT_C void Lock(TBool aLocked);
Description
Locks/unlocks the worksheet.
Parameters
TBool aLocked |
True to lock the worksheet, false to unlock
|
|
IMPORT_C TBool IsLocked() const;
Description
Tests if the worksheet is locked.
Return value
TBool
|
True if the worksheet is locked, false if unlocked
|
|
IMPORT_C void SetShowZeros(TBool aShowZeros);
Description
Sets whether zero values should be displayed.
Parameters
TBool aShowZeros |
True if zero values should be displayed
|
|
IMPORT_C TBool ShowZeros() const;
Description
Gets whether zero values should be displayed.
Return value
TBool
|
True if zero values should be displayed
|
|
IMPORT_C MGridTable *GridTable() const;
Description
Gets the worksheet as a Grid API table.
Return value
IMPORT_C CSheetEngine *SheetEngine() const;
Description
Gets the spreadsheet engine used by the worksheet.
Return value
IMPORT_C TShgCell *ReadShgCell(const TCellRef &aCellRef) const;
Description
Gets a specified cell.
Parameters
Return value
TShgCell *
|
The cell identified by aCellRef
|
|
IMPORT_C TPtrC ReadFormulaCellTextL(const TShgCell &aCell) const;
Description
Gets the formula text for a specified cell.
The function panics if the cell does not contain a formula.
Parameters
Return value
IMPORT_C TShgError SetCellL(const TCellRef &aCellRef, const TDesC &aText);
Description
Sets cell contents.
Parameters
const TCellRef &aCellRef |
Cell to set
|
const TDesC &aText |
New cell contents
|
|
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
AddCellInsideEditOperationL()
IMPORT_C TShgError AddCellInsideEditOperationL(const TShgCell &aCell);
Description
Adds a cell to a worksheet, assuming an edit operation is in progress.
It assumes that CSheetEngine::StartEditOperation()
and CSheetEngine::EndEditOperationL()
are called around this.
Parameters
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
DeleteCellInsideEditOperationL()
IMPORT_C TShgError DeleteCellInsideEditOperationL(const TCellRef &aCellRef);
Description
Deletes a cell from a worksheet, assuming an edit operation is in progress.
Parameters
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
IMPORT_C void SetNameL(const TDesC &aName);
Description
Sets the worksheet name.
Parameters
const TDesC &aName |
Worksheet name
|
|
IMPORT_C const TPtrC Name() const;
Description
Gets the worksheet name.
Return value
const TPtrC
|
Worksheet name
|
|
IMPORT_C TInt WorkSheetNo() const;
Description
Gets the worksheet number.
Return value
IMPORT_C TCellRef BottomRight() const;
Description
Gets the cell at the bottom right of the worksheet.
Return value
TCellRef
|
Cell at the bottom right of the worksheet
|
|
IMPORT_C CGridLay *GridLay() const;
Description
Gets the worksheet as a Grid API layer object.
Return value
IMPORT_C const CShgCellAdditionalData *DefaultAdditionalData() const;
Description
Gets default additional data for the worksheet.
Return value
IMPORT_C TShgError PasteL(TRangeRef &aBounds, const TRangeRef &aDestination, const CStreamStore &aStore, const CStreamDictionary
&aDictionary, TBool aSkipBlanks=EFalse, TUint32 aWhatToPaste=EPasteAll, TPasteAction aPasteAction=EPasteActionOverwrite);
Description
Paste data from the clipboard into the worksheet.
The data can be plain text or spreadsheet engine cells.
Parameters
TRangeRef &aBounds |
On return, range affected by the paste operation
|
const TRangeRef &aDestination |
Destination range
|
const CStreamStore &aStore |
Store from which to read data
|
const CStreamDictionary &aDictionary |
Dictionary from which to read stream IDs
|
TBool aSkipBlanks |
If true, do not paste blank cells
|
TUint32 aWhatToPaste |
Flag to control which of values/formulae/additional data are pasted. This is a bitmask of TPasteWhat flags.
|
TPasteAction aPasteAction |
Flag to control whether pasting overwrites or manipulates existing data
|
|
Return value
TShgError
|
EShgNoError if successful, otherwise an error code
|
|
IMPORT_C void CopyL(CStreamStore &aStore, CStreamDictionary &aDictionary, const TCellRef &aCell) const;
Description
Copies a cell to the clipboard.
Parameters
IMPORT_C void CopyL(CStreamStore &aStore, CStreamDictionary &aDictionary, const CArrayFix< TRangeRef > *aRangeArray) const;
Description
Copies an array of ranges to the clipboard.
Parameters
virtual TShgCell *MShgReadCell(const TCellRef &aCellRef) const;
Description
Gets a specified cell.
Parameters
Return value
TShgCell *
|
The cell identified by aCellRef
|
|
struct SSortKey;
Description
Defines keys for sorting operations.
Members
Defined in CShgWorkSheet::SSortKey
:
EDirectionAscending
, EDirectionDescending
, TDirection
, iCaseSensitive
, iCellRefDimensionPerpendicularToSort
, iDirection
Member enumerations
Enum TDirection
TDirection
Description
Sort order.
Member data
iCellRefDimensionPerpendicularToSort
TInt iCellRefDimensionPerpendicularToSort;
Description
Number of row or column, depending on which is perpendicular to the sort.
iDirection
TDirection iDirection;
Description
Sort order.
iCaseSensitive
TBool iCaseSensitive;
Description
If true, sorting is case-sensitive
TSearchOrder
Description
Search order.
TSearchDirection
Description
Search direction.
TSearchThroughWhat
Description
Search content flags.
TShiftDirection
Description
Cell shift operation directions.
TShiftRule
Description
Cell shift operation rules.
TClearParameters
Description
Cell clear operation flags.
TPasteWhat
Description
Cell paste operation content flags.
TPasteAction
Description
Cell paste action flags.
TSortOrientation
Description
Sort orientation flags.