![]() | InDesign SDK 20.5 |
#include <ICellStyleSuite.h>

Public Types | |
| enum | { kDefaultIID = IID_ICELLSTYLESUITE } |
Public Member Functions | |
| virtual bool16 | CanCreateCellStyle () const =0 |
| virtual ErrorCode | CreateCellStyle (const UID *parentHier=nil, const int32 position=-1, const UID *basedOn=nil)=0 |
| virtual bool16 | CanBreakLinkWithCellStyle () const =0 |
| virtual ErrorCode | BreakLinkWithCellStyle () const =0 |
| virtual bool16 | CanApplyCellStyle () const =0 |
| virtual bool16 | CanApplyCellStyle (const UID &whichStyle) const =0 |
| virtual ErrorCode | ApplyCellStyle (const UIDRef &cellStyle, const bool16 removeOverrides=kFalse) const =0 |
| virtual ErrorCode | ApplyCellStyleAndClearAllFormatting (const UIDRef &cellStyle) const =0 |
| virtual bool16 | CanGetCellStyle () const =0 |
| virtual ErrorCode | GetSelectedCellStyles (UIDList &out_SelectedStyles) const =0 |
| virtual bool16 | CanGetOverridingParagraphStyles () const =0 |
| virtual ErrorCode | GetOverridingParagraphStyles (UIDList &out_OverridingParaStyles) const =0 |
| virtual bool16 | CanRedefineCellStyle () const =0 |
| virtual ErrorCode | RedefineCellStyle () const =0 |
| virtual bool16 | CanClearOverrides (const UIDRef &styleToCheck=UIDRef::gNull) const =0 |
| virtual bool16 | CanClearAllOverrides () const =0 |
| virtual ErrorCode | ClearAllOverrides () const =0 |
| virtual ErrorCode | ClearOverrides () const =0 |
| virtual ErrorCode | GetLocalOverrides (AttributeBossList &outLocalOverrides, bool16 *out_IsMixed=nil) const =0 |
| virtual bool16 | CanGetCellStyleOverrides () const =0 |
| virtual bool16 | CanGetAllOverrides () const =0 |
| virtual ErrorCode | GetAllOverrides (AttributeBossList &outLocalOverrides) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Suite for cell styles. To obtain an instance of this suite:ISelectionManager* selMgr = activeContext->GetContextSelection();InterfacePtr<ICellStyleSuite> stylesSuite(static_cast<ICellStyleSuite*>(selMgr->QueryIntegratorSuite(IID_ICELLSTYLESUITE, ISelectionManager::kEnabledInterface)));
| pure virtual |
Applies the given cell style to the current cell selection. If local overrides exist on any of the cells in the selection they will be removed if removeOverrides is kTrue. If there is no table selection, the default style is set to cellStyle and the removeOverrides parameter is ignored.
CanApplyCellStyle returns kTrue| cellStyle | [IN] the cell style to apply to the cell selection |
| removeOverrides | [IN] optional, kTrue if the local overrides should be removed from the cell, kFalse otherwise |
kSuccess if the style was successfully applied, kFailure otherwise
| pure virtual |
Applies the given cell style and clears out any overrides in the selected area.
CanApplyCellStyle returns kTrueCanGetAllOverrides returns kTrue| cellStyle | [IN] the cell style to apply to the cell selection |
kSuccess if the style was successfully applied, kFailure otherwise
| pure virtual |
Breaks the link with the cell style for the currently selected cell area. Any cell style attributes are applied as local overrides. If there are any conflicts between the style attributes and local overrides, the local overrides always win. The root style is applied to all selected cells.
CanBreakLinkWithCellStyle returns kTruekSuccess if the link between the cells and style was successfully broken, kFailure otherwise
| pure virtual |
Tests if a cell style can be applied. If there is no table selection, this will still return true, but "applying" a cell style means the default style is set.
kTrue if a cell style can be applied, kFalse otherwise
| pure virtual |
Overloaded version of this function, this will only set the default cell style if whichStyle is not already the default style, or if the applying the cell style will change the appearance of the selection.
| whichStyle | [IN] the style to try to apply |
kTrue if applying the style will either change the default style, or change the attributes displayed in the table, kFalse otherwise
| pure virtual |
Tests if the current selection supports the "Break Link with Style" action. For this to be true, there must be a table selection, or a text selection within a table, and the style of that cell selection must not be the root cell style.
kTrue if the break link with style command is available, kFalse otherwise
| pure virtual |
Tests if there are any cell overrides that can be cleared on the given selection.
kTrue if there are any cell overrides on the current selection
| pure virtual |
Tests if we can clear overrides. For this to return kTrue, a cell or cells must be selected that have local overrides that conflict with the style's definition or any override when the style is the root cell style.
| styleToCheck | [IN] optional if we apply this style, are there overrides of this style on the selected style that can be cleared? If set to its default, UIDRef::gNull, we check against the style currently applied to the selection. |
kTrue if the "Clear Cell Overrides" operation is permitted, kFalse otherwise
| pure virtual |
Tests if a new cell style can be created.
kTrue if a cell style can be created, kFalse otherwise
| pure virtual |
Tests if the current selection has any overrides.
kTrue if the selection contains any overrides
| pure virtual |
Tests if there exists a table selection.
kTrue if there is a table selection, kFalse otherwise
| pure virtual |
Tests if the current selection has any overrides that intersects with the style's definition.
kTrue if the selection contains any overrides that intersects with the style's definition
| pure virtual |
Tests if the table selection is in exactly one cell that contains paragraph styles other than the one defined in the given cell style. If the cell style is the root cell style, or if the cell style's paragraph style is undefined, this function will return kFalse.
kTrue if there is a single cell selected with paragraph overrides, kFalse otherwise
| pure virtual |
Tests if we can redefine the current cell style. For this to return true, there must be a single cell selected that has both an editable cell style and local cell overrides. This will also be enabled if either the cell style defines a paragraph style that is overridden, or the cell style does not define a paragraph style at all.
kTrue if the "Redefine Cell Style" operation is permitted, kFalse otherwise
| pure virtual |
Clears out all cell overrides from the given selection.
kSuccess if the overrides were cleared, kFailure otherwise
| pure virtual |
Clears cell overrides from the given selection that conflict with the applied style's definition. If the applied style is the root cell style, then all overrides will be cleared.
CanClearOverrides returns kTruekSuccess if the cell overrides were cleared, kFailure otherwise
| pure virtual |
Creates a new cell style. If there is an active table selection and a single cell style is selected, then the new style will be based on that single cell style and its attributes will be the overrides of the top left cell of the selection. If there is no table selection the basedOn parameter will be used as the parent.
CanCreateCellStyle returns kTrue| parentHier | [IN] optional, the parent hierarchy for the style, if this is not provided, the parent becomes the root hierarchy |
| position | [IN] optional, the position for the new style within the parent hierarchy |
| basedOn | [IN] optional, the style the new style should be based on, this is only used if there is no table selection |
kSuccess if a new cell style was created, kFailure otherwise
| pure virtual |
Gets all cell overrides from the first cell selected in the table.
CanGetAllOverrides returns kTrue| outLocalOverrides | [OUT] the local overrides applied to the first cell of the selected table |
kSuccess if the overrides were returned, kFailure otherwise
| pure virtual |
Gets the local cell overrides applied on the selected table. Since there can be multiple cells selected, each with different overrides, the parameter out_IsMixed can be used to determine if there are mixed overrides on the selection. This function will always return the overrides applied to the first cell of the selection.
CanGetCellStyleOverrides returns kTrue| outLocalOverrides | [OUT] the local overrides applied to the selected table |
| out_IsMixed | [OUT] optional, if this is not nil, then entire selected area will be examined to see if all the overrides are equivalent |
kSuccess if the overrides were returned, kFailure otherwise
| pure virtual |
Returns a list of all paragraph styles used within a cell that does not match the paragraph style defined in the cell style.
CanGetOverridingParagraphStyles returns kTrue| out_OverridingParaStyles | [OUT] a UIDList for storing the paragraph style overrides |
kSuccess if the paragraph overrides were retrieved, kFailure otherwise
| pure virtual |
Gets the cell styles of the selection. The selection may contain multiple cell styles, so we return all of them. The parameter out_SelectedStyles will contain each cell style used in the selection exactly once.
CanGetCellStyle returns kTrue| out_SelectedStyles | [OUT] a list containing all the styles used in the selection |
kSuccess if the UIDs of selected cells style(s) were returned in out_SelectedStyles, kFailure otherwise
| pure virtual |
Redefines the cell style of the given selection. The style will have the selection's local overrides added to its attributes, with local overrides overwriting any current style attributes. Additionally, the first paragraph style used in the cell will be used as the paragraph style for the cell style.
CanRedefineCellStyle returns kTruekSuccess if the cell style was redefined, kFailure otherwise