|
|
| virtual ErrorCode | InsertRows (const RowRange &rows, const Tables::ERelativePosition pos, const PMReal &height, const Tables::EContinuation continuation=Tables::eStructureAllAttrs)=0 |
| |
| virtual ErrorCode | MoveRows (ITableModel *sourceTable, GridArea fromArea, int32 toRow, Tables::ERelativePosition pos, bool16 duplicateFlag)=0 |
| |
| virtual ErrorCode | MoveColumns (ITableModel *sourceTable, GridArea fromArea, int32 toColumn, Tables::ERelativePosition pos, bool16 duplicateFlag)=0 |
| |
| virtual ErrorCode | InsertColumns (const ColRange &cols, const Tables::ERelativePosition pos, const PMReal &width, const Tables::EContinuation continuation=Tables::eStructureAllAttrs)=0 |
| |
| virtual ErrorCode | DeleteRows (const RowRange &rows)=0 |
| |
| virtual ErrorCode | DeleteRowsButNotAnchors (const RowRange &rows)=0 |
| |
| virtual ErrorCode | DeleteColumns (const ColRange &cols)=0 |
| |
| virtual ErrorCode | MergeCells (const GridArea &cells)=0 |
| |
| virtual ErrorCode | UnmergeCell (const GridAddress &anchor)=0 |
| |
| virtual ErrorCode | SplitCells (const GridArea &cells, const ITableModel::ESplitDirection splitDirection)=0 |
| |
| virtual ErrorCode | ChangeTableDirection (Tables::EDirection directionRTL)=0 |
| |
|
| virtual ErrorCode | ResizeRows (const RowRange &rows, const PMReal &newHeight)=0 |
| |
| virtual ErrorCode | ResizeCols (const ColRange &cols, const PMReal &newWidth)=0 |
| |
| virtual ErrorCode | ApplyRowOverrides (const RowRange &rows, const AttributeBossList *attrs)=0 |
| |
| virtual ErrorCode | ApplyColOverrides (const ColRange &cols, const AttributeBossList *attrs)=0 |
| |
| virtual ErrorCode | ApplyCellStrokes (const GridArea &area, const ICellStrokeAttrData::Data &data)=0 |
| |
| virtual ErrorCode | ClearCellStrokes (const GridArea &area, const ICellStrokeAttrData::Data &data)=0 |
| |
| virtual ErrorCode | ClearCellStrokesUISafe (const GridArea &area, const ICellStrokeAttrData::Data &data)=0 |
| |
| virtual ErrorCode | SwapCellStrokeFill (const GridArea &cells)=0 |
| |
| virtual ErrorCode | ApplyCellOverrides (const GridArea &cells, const AttributeBossList *attrs)=0 |
| |
| virtual ErrorCode | ClearCellOverrides (const GridArea &cells, const AttributeBossList *attrs)=0 |
| |
| virtual ErrorCode | ApplyTableOverrides (const AttributeBossList *attrs)=0 |
| |
| virtual ErrorCode | SetTableStyle (const UIDRef &styleRef)=0 |
| |
| virtual ErrorCode | ClearBorderOverrides (Tables::ECellEdge edge, const AttributeBossList *attrs)=0 |
| |
| virtual ErrorCode | ClearCellOverridesUISafe (const GridArea &cells, const AttributeBossList *attrs)=0 |
| |
|
| virtual ICommand * | QueryApplyCellStrokesCmd (const GridArea &area, const ICellStrokeAttrData::Data &data)=0 |
| |
| virtual ICommand * | QueryClearCellStrokesCmd (const GridArea &area, const ICellStrokeAttrData::Data &data)=0 |
| |
| virtual ICommand * | QueryClearCellStrokesUISafeCmd (const GridArea &area, const ICellStrokeAttrData::Data &data)=0 |
| |
| virtual ICommand * | QueryApplyCellOverridesCmd (const GridArea &cells, const AttributeBossList *attrs)=0 |
| |
|
| virtual ErrorCode | SetCellText (const WideString &cellText, const GridAddress &anchor)=0 |
| |
| virtual ErrorCode | ClearContent (const GridArea &cells)=0 |
| |
|
| virtual ErrorCode | RegisterStrand (const UIDRef &strandRef)=0 |
| |
| virtual ErrorCode | RegisterContentMgr (CellType contentMgrType, const UIDRef &contenMgr)=0 |
| |
|
| virtual ErrorCode | CreateRowSegment (const PMReal &distanceFromEdge, const ColRange &segmentRange)=0 |
| |
| virtual ErrorCode | CreateColSegment (const PMReal &distanceFromEdge, const RowRange &segmentRange)=0 |
| |
|
| virtual ErrorCode | ConvertToHeaderRows (const RowRange &rows)=0 |
| |
| virtual ErrorCode | ConvertToFooterRows (const RowRange &rows)=0 |
| |
| virtual ErrorCode | ConvertToBodyRows (const RowRange &rows)=0 |
| |
|
| virtual ErrorCode | ConvertTableToText (const PMString colSeparator="\t", const PMString rowSeparator="\r")=0 |
| |
| virtual ICommand * | QueryDeleteTableCmd (const UIDRef &tableRef)=0 |
| |
| virtual ErrorCode | ConvertCellsType (const GridArea &cells, CellType destType, bool16 tryToPreserveData=kFalse)=0 |
| |
| virtual ErrorCode | PastePageItem (const GridAddress &anchor, UIDRef pageItemUID, bool16 preventCopy=kFalse)=0 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
Provides command based interface to the table model. Changes made to the table model should be made through this interface rather than through ITableAttrModifier or ITableModel to support undo capability.
Method to apply stroke-overrides to cells within given area.
These attributes are represented by boss classes that are distinctively identified by
aggregating an ITableAttrReport interface and have a ClassID such as kRowAttr<whatever>Boss.
Encapsulates execution of command of class kModifyCellStrokesCmdBoss. This in turn delegates
to the table model's attribute modifier (ITableAttrModifier) to clear the strokes specified.
For instance, to apply a stroke-weight to the top of all cells in given area, an ICellStrokeData::Data struct
would be initialised as follows:
ICellStrokeAttrData::Data data;
data.attrs.Set(ICellStrokeAttrData::eWeight);
data.attrs.Add(ICellStrokeAttrData::eTint);
data.sides = Tables::eTopSide;
data.weight = newWeight; // a PMReal specifying new weight in points
data.tintPercent = newTintPercent; // a PMReal specifying tint in percent
- Parameters
| area | the cells within the given GridArea to operate upon |
| data | this is used to specify the sides and/or other attribute(s) for which the stroke-properties should be set. |
- Returns
- kSuccess if the command executed successfully, kFailure otherwise
- Precondition
- the area should be valid within the table model, i.e. have at least one cell within it
Removes cell-attribute overrides within specified area.
These attributes are represented by boss classes that are distinctively identified by aggregating an ITableAttrReport interface and have a ClassID such as kCellAttr<whatever>Boss.
The difference between this command and the one above is that this one checks the GridArea we are applying to and makes sure it still exists in the table. You can run into this problem through the preview dialogs. If the apply table dimensions command is fired before the Clear Cell Attributes command then you end up clearing attributes on a new table structure which if using the above command would crash
- Parameters
| cells | the cells within the given GridArea to operate upon |
| attrs | list of boss objects specifying by their ClassID the override to remove |
- Returns
- kSuccess if the command executed successfully, kFailure otherwise
| virtual ErrorCode ITableCommands::InsertColumns | ( | const ColRange & | cols, | | | const Tables::ERelativePosition | pos, | | | const PMReal & | width, | | | const Tables::EContinuation | continuation = Tables::eStructureAllAttrs | | ) | | |
| pure virtual |
Method to insert new, unfilled columns in a table.
Width for the newly-created columns should be specified in points.
If colWidth is 0.0 then the new width is determined from the column relative to which the insertion is being made. A non zero value of width will result in all inserted columns having that width.
See the comments on InsertRows for detail on how attributes are propagated from the reference column to the newly created columns, mutatis mutandis.
Encapsulates the execution of command that is instance of class kInsertColumnsCmdBoss; this acts on the table model to insert columns.
- Parameters
| cols | the start of the ColRange specifies the insertion location, and the count of the ColRange columns gives the number of columns to add |
| pos | eBefore or eAfter to specify whether to insert before or after the current insertion point |
| width | |
| continuation | |
- Returns
- kSuccess if the command could be executed successully, kFailure otherwise
| virtual ErrorCode ITableCommands::InsertRows | ( | const RowRange & | rows, | | | const Tables::ERelativePosition | pos, | | | const PMReal & | height, | | | const Tables::EContinuation | continuation = Tables::eStructureAllAttrs | | ) | | |
| pure virtual |
Method to insert new, unfilled rows in a table.
Height should be specified in points. If the given rowHeight is 0.0 then the new row height is determined from the row relative to which the insertion is being made. A non zero value of height will result in all inserted rows having that minimum height.
The structure and attributes of the row that is the reference for the insertion will be propagated to the newly created rows; for instance, if the relative position is 'eAfter' and the row above the insertion location has a minimum row height of 2 picas and the row height is specified as 0, then the newly created rows will inherit the minimum row size of 2 picas from the rows above the insertion point even if this is not the default for other cells in the table. Similarly, if the relative position is 'eBefore', then the attributes and structure of the row below the insertion point will be propagated to the newly created rows.
Encapsulates the execution of command that is instance of class kInsertRowsCmdBoss. This command in turn acts on the table model to insert rows.
- Parameters
| rows | specifies the location as the start of the range, and how many rows to add, as the count |
| pos | eBefore or eAfter to specify whether to insert before or after the current insertion point |
| height | height of the row specified in points; a non-zero value means inserted rows will have that minimum height, whereas a zero value will result in a calculated value based as described above |
| continuation | |
- Returns
- kSuccess if the command could be executed successully, kFailure otherwise
- Precondition
- the row range specified has a start within the bounds of the table rows
- the count of rows to be added in the row-range given is > 0
- the minimimum height specified is >= 0.0
| virtual ErrorCode ITableCommands::ResizeRows | ( | const RowRange & | rows, | | | const PMReal & | newHeight | | ) | | |
| pure virtual |
Method to apply change in height to rows.
The result of this method is to set the row-height and the minimum row height for the target rows to newHeight. If some cells in target rows have content that extends below this in depth, then these cells can become overset.
This encapsulates executing the command kResizeRowsCmdBoss. This command delegates to the table model's attribute modifier (ITableAttrModifier) to change the model attributes.
- Parameters
| rows | specifies the range of rows to operate upon |
| newHeight | specifies the new minimum and current row-height to set for the target range of rows |
- Returns
- kSuccess if the command executed successfully, kFailure otherwise