InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IObjectStylesSuite Class Referenceabstract
Inheritance diagram for IObjectStylesSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IOBJECTSTYLESSUITE }
 

Public Member Functions

virtual bool16 CanCreateNewObjectStyleFromSelection () const =0
 
virtual ErrorCode CreateNewObjectStyleFromSelection (PMString styleName, PMString &createdStylePath, UID parentUID=kInvalidUID, int32 position=-1)=0
 
virtual ErrorCode CreateNewObjectStyle (IObjectStyleInfo *iObjectStyleInfo, IPMUnknown *target, UID parentUID=kInvalidUID, int32 position=-1)=0
 
virtual ErrorCode EditObjectStyle (IObjectStyleInfo *iObjectStyleInfo, IPMUnknown *target, const PMString &editStyleName, int32 numApplies=0)=0
 
virtual bool16 CanApplyObjectStyle () const =0
 
virtual ErrorCode ApplyObjectStyle (const PMString name, const bool16 bApplyDefaultGraphicStyle, bool16 overrideExistingAttrs, bool16 applyEmptyCatWithRoot, bool16 affectAppliedItems=kFalse)=0
 
virtual ErrorCode ClearObjectStyleOverrides ()=0
 
virtual bool16 CanClearUnCheckedOverridesWithNoneStyle () const =0
 
virtual ErrorCode ClearOverridesNotDefinedByStyle ()=0
 
virtual bool16 CanModifyStyleList () const =0
 
virtual bool16 CanModifyStyles (const K2Vector< PMString > &styleIndexs) const =0
 
virtual bool16 CanDeleteStyles (const K2Vector< PMString > &styleIndexs) const =0
 
virtual ErrorCode DeleteObjectStyles (const K2Vector< PMString > &styleIndexs, const PMString &styleToReplaceWith, const bool16 &bPerserveFormat=kFalse)=0
 
virtual ErrorCode SortObjectStyles ()=0
 
virtual ErrorCode LoadObjectStyles (const StyleClashResolutionTypes::GlobalClashResolutionStrategy &globalClashResolutionStrategy, const IDFile &sourceFile, const std::map< PMString, bool32 > &importMap, const std::map< PMString, bool32 > &clashMap, const std::map< PMString, StyleClashResolutionTypes::StyleClashResolutionStrategy > &resolveMap)=0
 
virtual ErrorCode ExportObjectStyles (const IDFile &targetFile, const K2Vector< PMString > &objectStyles)=0
 
virtual ErrorCode ImportObjectStyles (const IDFile &sourceFile)=0
 
virtual ErrorCode RenameObjectStyle (const int32 styleIndex, const PMString &newName)=0
 
virtual ErrorCode ReplaceObjectStyles (const K2Vector< PMString > &styleNames, const PMString &replaceWith)=0
 
virtual bool16 CanRedefineObjectStyle () const =0
 
virtual bool16 CanClearOverrides () const =0
 
virtual ErrorCode RedefineStyle ()=0
 
virtual ErrorCode ChangeDefaultTextStyle (const PMString &newStyleName)=0
 
virtual PMString GetDefaultTextStyle ()=0
 
virtual ErrorCode ChangeDefaultGraphicStyle (const PMString &newStyleName)=0
 
virtual PMString GetDefaultGraphicStyle ()=0
 
virtual ErrorCode ChangeDefaultFrameGridStyle (const PMString &newStyleName)=0
 
virtual PMString GetDefaultFrameGridStyle ()=0
 
virtual ErrorCode DuplicateObjectStyles (const K2Vector< PMString > &styleNames, K2Vector< PMString > &styleNamesCreated)=0
 
virtual bool16 CanMoveObjectStyles (const K2Vector< PMString > &styleNames, const int32 dropBefore=-1)=0
 
virtual ErrorCode MoveObjectStyles (const K2Vector< PMString > &styleNames, const int32 dropBefore)=0
 
virtual K2Vector< PMStringGetCurrentObjectStyles () const =0
 
virtual PMString GetNameOfNthStyle (const int32 n) const =0
 
virtual int32 GetStyleIndexFromName (const PMString &name) const =0
 
virtual int32 GetNumObjectStyles () const =0
 
virtual PMString GetUniqueDuplicateName (IStyleGroupHierarchy *hierParent, const PMString &baseName) const =0
 
virtual void CreateStyleName (IStyleGroupHierarchy *hierParent, PMString *styleName) const =0
 
virtual bool16 CanDoBreakLinkToObjectStyles () const =0
 
virtual ErrorCode BreakLinkToObjectStyles ()=0
 
virtual ErrorCode BreakLinkFromProvidedObjectStyles (const K2Vector< PMString > styleList)=0
 
virtual bool16 CanBaseStyleOnStyle (PMString &style1, PMString &style2) const =0
 
virtual IPMUnknownQueryStyleTargetFromStyle (const PMString &name) const =0
 
virtual IPMUnknownQueryStyleTargetFromSelection (const PMString &basedOnStyleName) const =0
 
virtual bool16 SelectionOverridesObjStyle (UID objecStyleUID=kInvalidUID) const =0
 
virtual bool16 DoesObjectStyleHaveOverride (const PMString &name) const =0
 
virtual PMString GetStylesBasedOnStyleName (const PMString &name) const =0
 
virtual VirtualKey GetStylesKeyboardShortcut (const PMString &name, int16 *modifiers) const =0
 
virtual const
ObjStyleCategoryAttrMap 
GetCurrentOverridesAttributeMap () const =0
 
virtual const
ObjStyleCategoryNameMap 
GetCurrentOverridesNameMap () const =0
 
virtual bool16 SelectionContainsFrameGridStyle () const =0
 
virtual bool16 SelectionWithMixedOverrides () const =0
 
virtual
ObjStyleDialogLockStateObj
CreateLocakStateObj (const PMString &styleName) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual ErrorCode IObjectStylesSuite::ApplyObjectStyle (const PMString name,
const bool16 bApplyDefaultGraphicStyle,
bool16 overrideExistingAttrs,
bool16 applyEmptyCatWithRoot,
bool16 affectAppliedItems = kFalse 
)
pure virtual

Apply the object style to the current selection.

Parameters
namethe name of style to be applied.
bApplyDefaultGraphicStyleindicates that we always apply normal graphic frame style.
overrideExistingAttrsindicates that shall we clear override.
applyEmptyCatWithRootapply unchecked categories with root
affectAppliedItemsindicates that we only apply the style to the object with the same style(clear overrdes) return ErrorCode.
virtual ErrorCode IObjectStylesSuite::BreakLinkFromProvidedObjectStyles (const K2Vector< PMStringstyleList)
pure virtual

Break the link of all the page items with the provided object styles. return ErrorCode = kSuccess if we are done.

virtual ErrorCode IObjectStylesSuite::BreakLinkToObjectStyles ()
pure virtual

Break the link between object style and current selection. return ErrorCode = kSuccess if we are done.

virtual bool16 IObjectStylesSuite::CanApplyObjectStyle () const
pure virtual

Return true if you can apply an object style to the given selection

virtual bool16 IObjectStylesSuite::CanBaseStyleOnStyle (PMStringstyle1,
PMStringstyle2 
) const
pure virtual

Returns true if no circular reference is creating when basing style 1 on style 2

Parameters
style1The style we are changing the based on info for
style2The style to base style1 on
Returns
bool16 kTrue if there is no circular reference is creating when basing style 1 on style 2
virtual bool16 IObjectStylesSuite::CanClearOverrides () const
pure virtual

Can clear the overrides for the object styles in the current selection. return bool16 = kFalse if the selection does NOT contain overrides, otherwise return kTrue.

virtual bool16 IObjectStylesSuite::CanClearUnCheckedOverridesWithNoneStyle () const
pure virtual

Returns true if we can apply the none style to the unchcecked categories and it will change the object (clear non-none attrs)

virtual bool16 IObjectStylesSuite::CanCreateNewObjectStyleFromSelection () const
pure virtual

True if you can create a new object style from the current selection

virtual bool16 IObjectStylesSuite::CanDeleteStyles (const K2Vector< PMString > & styleIndexs) const
pure virtual

True if you can delete the styles associated with these names

virtual bool16 IObjectStylesSuite::CanDoBreakLinkToObjectStyles () const
pure virtual

Check if we can we disconnect the object styles from the current selection. return bool16 = kTrue if there is an object in the selection with object style embeded; otherwise, return kFalse.

virtual bool16 IObjectStylesSuite::CanModifyStyleList () const
pure virtual

True if you can modify the style list

virtual bool16 IObjectStylesSuite::CanModifyStyles (const K2Vector< PMString > & styleIndexs) const
pure virtual

True if you can modify the styles associated with these names

virtual bool16 IObjectStylesSuite::CanMoveObjectStyles (const K2Vector< PMString > & styleNames,
const int32 dropBefore = -1 
)
pure virtual

True if you can move the object style to a new location in the list

Parameters
styleNamesvector of the style names to move
dropBeforethe position you are dropping to, default value = -1 means don't consider this value
virtual bool16 IObjectStylesSuite::CanRedefineObjectStyle () const
pure virtual

Can the object style of the current selection be redefined based on selected overrides. return bool16 = kFalse if the selection contains mixed overrides, no overrides, or mixed styles, otherwise return kTrue.

virtual ErrorCode IObjectStylesSuite::ChangeDefaultFrameGridStyle (const PMStringnewStyleName)
pure virtual

Changes the default frame grid style for the current database

Parameters
newStyleName
virtual ErrorCode IObjectStylesSuite::ChangeDefaultGraphicStyle (const PMStringnewStyleName)
pure virtual

Changes the default graphic style for the current database

Parameters
newStyleName
virtual ErrorCode IObjectStylesSuite::ChangeDefaultTextStyle (const PMStringnewStyleName)
pure virtual

Changes the default text style for the current database

Parameters
newStyleName
virtual ErrorCode IObjectStylesSuite::ClearObjectStyleOverrides ()
pure virtual

Clears the overrides on the current style

virtual ErrorCode IObjectStylesSuite::ClearOverridesNotDefinedByStyle ()
pure virtual

Apply the attributes from root style which are not defined in the style.

virtual ObjStyleDialogLockStateObj* IObjectStylesSuite::CreateLocakStateObj (const PMStringstyleName) const
pure virtual

INTERNAL USE ONLY

virtual ErrorCode IObjectStylesSuite::CreateNewObjectStyle (IObjectStyleInfoiObjectStyleInfo,
IPMUnknowntarget,
UID parentUID = kInvalidUID,
int32 position = -1 
)
pure virtual

Create new object style.

Parameters
iObjectStyleInfoIN: the info about this object style.
IPMUnknownIN: the target(attributes) within the object style.
parentUID[IN] UID of the parent group where the style is being created. kInvalidUID to create at root level
position[IN] position with in the parent, where style is going to be created. -1 to create at the end.
virtual ErrorCode IObjectStylesSuite::CreateNewObjectStyleFromSelection (PMString styleName,
PMStringcreatedStylePath,
UID parentUID = kInvalidUID,
int32 position = -1 
)
pure virtual

Creates a new Object Style which has the attributes of the current selection

Parameters
styleName[IN] name of new style to being created.
createdStylePath[OUT] full path of created style.
parentUID[IN] UID of the parent group where the style is being created. kInvalidUID to create at root level
position[IN] position with in the parent, where style is going to be created. -1 to create at the end.
virtual void IObjectStylesSuite::CreateStyleName (IStyleGroupHierarchyhierParent,
PMStringstyleName 
) const
pure virtual
    Get the unique object style name.

STOLEN FROM TextStyleTargetServer, refactor some year...

virtual ErrorCode IObjectStylesSuite::DeleteObjectStyles (const K2Vector< PMString > & styleIndexs,
const PMStringstyleToReplaceWith,
const bool16 & bPerserveFormat = kFalse 
)
pure virtual

Deletes the objects styles from the StyleNameTable for the current selection

virtual bool16 IObjectStylesSuite::DoesObjectStyleHaveOverride (const PMStringname) const
pure virtual

Return true if the selection has object style overrides

Parameters
namethe name of the object style to check against.
virtual ErrorCode IObjectStylesSuite::DuplicateObjectStyles (const K2Vector< PMString > & styleNames,
K2Vector< PMString > & styleNamesCreated 
)
pure virtual

Duplicates the Object Styles

Parameters
styleNamesIN: the names of the styles to duplicate
styleNamesCreatedOUT: the names of the styles to created
virtual ErrorCode IObjectStylesSuite::EditObjectStyle (IObjectStyleInfoiObjectStyleInfo,
IPMUnknowntarget,
const PMStringeditStyleName,
int32 numApplies = 0 
)
pure virtual

Duplicates the Object Style

Parameters
iObjectStyleInfoIN: the info about this object style.
IPMUnknownIN: the target(attributes) within the object style.
editStyleNameIN: the name of the style to be edited.
numAppliesIN: used only by the dialog, set to the number of times we have applied this command
virtual ErrorCode IObjectStylesSuite::ExportObjectStyles (const IDFiletargetFile,
const K2Vector< PMString > & objectStyles 
)
pure virtual

Export the objects styles to a document

virtual K2Vector<PMString> IObjectStylesSuite::GetCurrentObjectStyles () const
pure virtual

Get the object style PMStrings of the current selection. return K2Vector<PMString> object style UID list.

virtual const ObjStyleCategoryAttrMap IObjectStylesSuite::GetCurrentOverridesAttributeMap () const
pure virtual

Returns the list of the current overrides attributes in the selection

virtual const ObjStyleCategoryNameMap IObjectStylesSuite::GetCurrentOverridesNameMap () const
pure virtual

Returns the list of the current overrides names in the selection

virtual PMString IObjectStylesSuite::GetDefaultFrameGridStyle ()
pure virtual

Returns the default frame grid style

Returns
PMString
virtual PMString IObjectStylesSuite::GetDefaultGraphicStyle ()
pure virtual

Returns the default graphics style

Returns
PMString
virtual PMString IObjectStylesSuite::GetDefaultTextStyle ()
pure virtual

Returns the default text style

Returns
PMString
virtual PMString IObjectStylesSuite::GetNameOfNthStyle (const int32 n) const
pure virtual

Get the object style name of the nth entry in the style table returnPMString object style name

virtual int32 IObjectStylesSuite::GetNumObjectStyles () const
pure virtual

Gets the number of object styles in the current list

virtual int32 IObjectStylesSuite::GetStyleIndexFromName (const PMStringname) const
pure virtual

Get the object style index of the style name passed in return int32 object style index

virtual PMString IObjectStylesSuite::GetStylesBasedOnStyleName (const PMStringname) const
pure virtual

Return the style which this style is based on

Parameters
namestyle's name to find based on style for
virtual VirtualKey IObjectStylesSuite::GetStylesKeyboardShortcut (const PMStringname,
int16 * modifiers 
) const
pure virtual

Return the style's keyboard shortcut

Parameters
namestyle's name to find based on style for
modifiersOUT: the modifiers
virtual PMString IObjectStylesSuite::GetUniqueDuplicateName (IStyleGroupHierarchyhierParent,
const PMStringbaseName 
) const
pure virtual

Get the unique duplicate object style name with the base name provided.

virtual ErrorCode IObjectStylesSuite::ImportObjectStyles (const IDFilesourceFile)
pure virtual

Import the objects styles from the another document

virtual ErrorCode IObjectStylesSuite::LoadObjectStyles (const StyleClashResolutionTypes::GlobalClashResolutionStrategyglobalClashResolutionStrategy,
const IDFilesourceFile,
const std::map< PMString, bool32 > & importMap,
const std::map< PMString, bool32 > & clashMap,
const std::map< PMString, StyleClashResolutionTypes::StyleClashResolutionStrategy > & resolveMap 
)
pure virtual

Loads the objects styles from the another document.

Parameters
globalClashResolutionStrategyIN: global clash resolution strategy.
sourceFileIN: source file which we load from.
importMapIN: import styles.
clashMapIN: styles that are conflict with existing styles.
resolveMapIN: result styles after resolving the conflicts.
virtual ErrorCode IObjectStylesSuite::MoveObjectStyles (const K2Vector< PMString > & styleNames,
const int32 dropBefore 
)
pure virtual

Moves the Object Styles in the list

Parameters
styleNamesvector of the style names to move
dropBeforethe position you are dropping to
virtual IPMUnknown* IObjectStylesSuite::QueryStyleTargetFromSelection (const PMStringbasedOnStyleName) const
pure virtual

Returns a representation of the information in the style (created from the selection) for the UI to use

Parameters
basedOnStyleNameThe name of the style we get categories info.
virtual IPMUnknown* IObjectStylesSuite::QueryStyleTargetFromStyle (const PMStringname) const
pure virtual

Returns a representation of the information (created from the style named) in the style for the UI to use

Parameters
nameThe name of the style to create from
virtual ErrorCode IObjectStylesSuite::RedefineStyle ()
pure virtual

Redefines the style of the current selection based on the text attributes of the current selection. (Any overrides become part of the style.)

Returns
kSuccess on success otherwise an error.
virtual ErrorCode IObjectStylesSuite::RenameObjectStyle (const int32 styleIndex,
const PMStringnewName 
)
pure virtual

Renames the current style

virtual ErrorCode IObjectStylesSuite::ReplaceObjectStyles (const K2Vector< PMString > & styleNames,
const PMStringreplaceWith 
)
pure virtual

Replaces the attrs in a style with new ones

virtual bool16 IObjectStylesSuite::SelectionContainsFrameGridStyle () const
pure virtual

Check if current selection has [Normal Grid] applied to it or not. return bool16 kTrue = there is [Normal Grid] applied; otherwise return kFalse.

virtual bool16 IObjectStylesSuite::SelectionOverridesObjStyle (UID objecStyleUID = kInvalidUID) const
pure virtual

Return true if the selection has object style overrides

Parameters
objecStyleUIDthe uid of the object style to check against, if kInvalidUID uses current object style of the selection
virtual bool16 IObjectStylesSuite::SelectionWithMixedOverrides () const
pure virtual

Check if selection has mixed overrides or not. return bool16 kTrue = there is mixed overrides; otherwise return kFalse.

virtual ErrorCode IObjectStylesSuite::SortObjectStyles ()
pure virtual

Sorts the Object Style List