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

Public Types

enum  { kDefaultIID = IID_IOBJECTSTYLESFACADE }
 

Public Member Functions

virtual ErrorCode CreateNewObjectStyle (IPMUnknown *objectStyleTarget, IWorkspace *ws, const PMString &newStyleName, const UID basedOnUID, const bool16 &bStyleNameTranslatable=kFalse, const VirtualKey virtualKey=kVirtualNullKey, const int16 modifier=0, const UID parentUID=kInvalidUID, const int32 position=-1)=0
 
virtual ErrorCode ApplyObjectStyleToUIDList (const UIDList &list, IWorkspace *ws, UID uidOfStyle, K2Vector< ClassID > &categoriesToOverride, bool16 applyEmptyCatWithRoot)=0
 
virtual ErrorCode EditObjectStyle (IPMUnknown *objectStyleTarget, IObjectStyleInfo *iObjectStyleInfo, const IWorkspace *ws, const PMString &originalStyleName, int32 numApplies=0, const bool16 bNotify=kTrue)=0
 
virtual ErrorCode ReplaceObjectStyles (IWorkspace *ws, const K2Vector< PMString > &stylesToBeReplaced, const PMString &sourceStyleName)=0
 
virtual ErrorCode BreakLinkFromProvidedObjectStyles (IWorkspace *ws, const K2Vector< PMString > &styleNames)=0
 
virtual ErrorCode DeleteObjectStyles (IWorkspace *ws, const K2Vector< PMString > &styleNames, const PMString &styleToReplaceWith, const bool16 &bPerserveFormat=kFalse)=0
 
virtual ErrorCode LoadObjectStyles (IWorkspace *ws, const bool16 &overrideLocal, const IDFile &sourceFile, std::map< PMString, bool32 > importMap, std::map< PMString, bool32 > clashMap, std::map< PMString, StyleClashResolutionTypes::StyleClashResolutionStrategy > resolveMap, const StyleClashResolutionTypes::GlobalClashResolutionStrategy &globalClashResolutionStrategy)=0
 
virtual ErrorCode ExportObjectStyles (IWorkspace *ws, const IDFile &targetFile, const K2Vector< PMString > &objectStyles)=0
 
virtual ErrorCode ImportObjectStyles (IWorkspace *ws, const IDFile &sourceFile)=0
 
virtual ErrorCode SortObjectStyles (IWorkspace *ws)=0
 
virtual ErrorCode MoveObjectStyles (IWorkspace *ws, const K2Vector< PMString > &selectedObjectStylesPaths, const int32 &dropBefore, const UID newParent, const RemappingList &remaplist, const IStyleRemapData::ConflictFlagEnum conflictFlag)=0
 
virtual ErrorCode MoveObjectStyles (const UIDList &selectedObjectStyles, const int32 &dropBefore, const UID newParent, const RemappingList &remaplist, const IStyleRemapData::ConflictFlagEnum conflictFlag)=0
 
virtual ErrorCode ChangeDefaultTextStyle (IWorkspace *ws, UID newDefaultStyleUID, bool16 bApplyAttrs=kFalse, bool16 bClearOverrides=kFalse)=0
 
virtual ErrorCode ChangeDefaultFrameGridStyle (IWorkspace *ws, UID newDefaultStyleUID, bool16 bApplyAttrs=kFalse, bool16 bClearOverrides=kFalse)=0
 
virtual ErrorCode RenameObjectStyle (IWorkspace *ws, const UID styleUID, const PMString &newName, const bool16 bNotify=kTrue)=0
 
virtual ErrorCode DuplicateObjectStyles (IWorkspace *ws, const K2Vector< PMString > &styleNames, K2Vector< PMString > &namesCreated)=0
 
virtual ErrorCode ChangeDefaultGraphicStyle (IWorkspace *ws, UID newDefaultStyleUID, bool16 bApplyAttrs=kFalse, bool16 bClearOverrides=kFalse)=0
 
virtual PMString GetDefaultGraphicStyle (IWorkspace *ws)=0
 
virtual PMString GetDefaultTextStyle (IWorkspace *ws)=0
 
virtual PMString GetDefaultFrameGridStyle (IWorkspace *ws)=0
 
virtual ErrorCode CreateNewObjectStyleGroup (IWorkspace *ws, const PMString newStyleGroupName, const UID parent, const int32 position)=0
 
virtual ErrorCode RenameObjectStyleGroup (IWorkspace *ws, const UID styleGroupUID, const PMString &newName)=0
 
virtual ErrorCode DuplicateObjectStyleGroups (const UIDList &styleGroups)=0
 
virtual ErrorCode DeleteStyleGroups (const UIDList &styleGroups, const RemappingList &remaplist)=0
 
virtual ErrorCode MoveStyleGroups (const UIDList &styleGroups, const UID newParent, const int32 position, const RemappingList &remaplist, const IStyleRemapData::ConflictFlagEnum conflictFlag)=0
 
virtual ErrorCode LoadObjectStyles (IWorkspace *ws, const bool16 &overrideLocal, const std::string &sourceFile, std::map< PMString, bool32 > importMap, std::map< PMString, bool32 > clashMap, std::map< PMString, StyleClashResolutionTypes::StyleClashResolutionStrategy > resolveMap, const StyleClashResolutionTypes::GlobalClashResolutionStrategy &bLoadAllWithOverwrite)=0
 
virtual ErrorCode LoadObjectStyles (const std::string &assetData)=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 Facade::IObjectStylesFacade::ApplyObjectStyleToUIDList (const UIDListlist,
IWorkspacews,
UID uidOfStyle,
K2Vector< ClassID > & categoriesToOverride,
bool16 applyEmptyCatWithRoot 
)
pure virtual

ApplyObjectStyleToUIDList: Applys the object style to the specified UIDList

Parameters
listThe list of UIDs to apply this style to
wsThe workspace the object style name table containing the style
overrideCategoriesK2Vector<ClassID> of categories to clear (clear all overrides means all of the active categories in the style)
applyEmptyCatWithRoottrue if we are applying empty (unchecked) cateogories from the root style
virtual ErrorCode Facade::IObjectStylesFacade::BreakLinkFromProvidedObjectStyles (IWorkspacews,
const K2Vector< PMString > & styleNames 
)
pure virtual

BreakLinkFromProvidedObjectStyles: perserve item's original formatting and set none style as its object style.

Parameters
wsThe workspace the object style name table containing the style
styleNamesThe list of styles to be disassociated from
virtual ErrorCode Facade::IObjectStylesFacade::ChangeDefaultFrameGridStyle (IWorkspacews,
UID newDefaultStyleUID,
bool16 bApplyAttrs = kFalse,
bool16 bClearOverrides = kFalse 
)
pure virtual

ChangeDefaultFrameGridStyle: Changes the default frame grid style

Parameters
wsThe workspace the object style name table containing the styles to sort
newDefaultStyleUIDThe new text style UID
applyAttrsTrue if we should apply the attrs from the style, this is not true when creating the style
clearOverridesTrue if we want to clear overrides, otherwise kFalse.
virtual ErrorCode Facade::IObjectStylesFacade::ChangeDefaultGraphicStyle (IWorkspacews,
UID newDefaultStyleUID,
bool16 bApplyAttrs = kFalse,
bool16 bClearOverrides = kFalse 
)
pure virtual

ChangeDefaultGraphicStyle: Changes the default graphic style

Parameters
wsThe workspace the object style name table containing the styles to sort
newDefaultStyleUIDThe new graphic style UID
applyAttrsTrue if we should apply the attrs from the style, this is not true when creating the style
clearOverridesTrue if we want to clear overrides, otherwise kFalse.
virtual ErrorCode Facade::IObjectStylesFacade::ChangeDefaultTextStyle (IWorkspacews,
UID newDefaultStyleUID,
bool16 bApplyAttrs = kFalse,
bool16 bClearOverrides = kFalse 
)
pure virtual

ChangeDefaultTextStyle: Changes the default text style

Parameters
wsThe workspace the object style name table containing the styles to sort
newDefaultStyleUIDThe new text style UID
applyAttrsTrue if we should apply the attrs from the style, this is not true when creating the style
clearOverridesTrue if we want to clear overrides, otherwise kFalse.
virtual ErrorCode Facade::IObjectStylesFacade::CreateNewObjectStyle (IPMUnknownobjectStyleTarget,
IWorkspacews,
const PMStringnewStyleName,
const UID basedOnUID,
const bool16 & bStyleNameTranslatable = kFalse,
const VirtualKey virtualKey = kVirtualNullKey,
const int16 modifier = 0,
const UID parentUID = kInvalidUID,
const int32 position = -1 
)
pure virtual

CreateNewObjectStyle: Creates a new object style on the workspace provided with the name and based on UID passed in

Parameters
objectStyleTargetThe target containing the attributes of the object style
wsThe workspace the object style name table is on to add the new style to
newStyleNameThe name of the new style
basedOnUIDthe UID this style is based on
bStyleNameTranslatablethe bool flag indicates if the style name is translatable or not
virtualKeythe virtualKey for KBSC
modifierthe modifier for KBSC
parentUIDthe UID of the parent, kInvalidUID to create at root level
positionposition at which the new UID to be created, -1 to create at the end.
virtual ErrorCode Facade::IObjectStylesFacade::CreateNewObjectStyleGroup (IWorkspacews,
const PMString newStyleGroupName,
const UID parent,
const int32 position 
)
pure virtual

Creates a new style group.

Parameters
ws[IN] Workspace where to create the group.
newStyleGroupName[IN] new style group name.
parent[IN] UID of parent to create new group.
position[IN] postion to create new style, pass -1 for last
virtual ErrorCode Facade::IObjectStylesFacade::DeleteObjectStyles (IWorkspacews,
const K2Vector< PMString > & styleNames,
const PMStringstyleToReplaceWith,
const bool16 & bPerserveFormat = kFalse 
)
pure virtual

DeleteObjectStyles: Deletes the styles in the list

Parameters
wsThe workspace the object style name table containing the style
styleNamesThe list of styles to be deleted
styleToReplaceWithThe style used to replace with the deleted styles.
bPerserveFormatThe flag for perserve format setting.
virtual ErrorCode Facade::IObjectStylesFacade::DeleteStyleGroups (const UIDListstyleGroups,
const RemappingListremaplist 
)
pure virtual

Deletes a list of style groups.

Parameters
styleGroups[IN] list of object style groups to be deleted.
remapList[IN] remapping for the style inside the groups being deleted.
virtual ErrorCode Facade::IObjectStylesFacade::DuplicateObjectStyleGroups (const UIDListstyleGroups)
pure virtual

Duplicates a list of style groups.

Parameters
styleGroups[IN] list of style groups to be duplicated.
virtual ErrorCode Facade::IObjectStylesFacade::DuplicateObjectStyles (IWorkspacews,
const K2Vector< PMString > & styleNames,
K2Vector< PMString > & namesCreated 
)
pure virtual

DuplicateObjectStyles: Duplicates the object styles in the stylesToBeReplaced list

Parameters
wsThe workspace the object style name table containing the style
styleNamesThe list of styles to be duplicate
namesCreatedThe names of the newly created styles
virtual ErrorCode Facade::IObjectStylesFacade::EditObjectStyle (IPMUnknownobjectStyleTarget,
IObjectStyleInfoiObjectStyleInfo,
const IWorkspacews,
const PMStringoriginalStyleName,
int32 numApplies = 0,
const bool16 bNotify = kTrue 
)
pure virtual

EditObjectStyle: Changes the data of the object style to reflect what was passed in

Parameters
objectStyleTargetThe target containing the new attributes of the object style
iObjectStyleInfoThe new name and based on UID for the style
wsThe workspace the object style name table containing the style
originalStyleNamethe style's original name
numAppliesIN: used only by the dialog, set to the number of times we have applied this command
bNotifyIN: used to command indicating if we should do notification or not.
virtual ErrorCode Facade::IObjectStylesFacade::ExportObjectStyles (IWorkspacews,
const IDFiletargetFile,
const K2Vector< PMString > & objectStyles 
)
pure virtual

ExportObjectStyles: Export the styles from the targetFile

Parameters
wsThe workspace the object style name table containing the style
targetFileThe file to load from
objectStylesThe styles to be exported.
virtual PMString Facade::IObjectStylesFacade::GetDefaultFrameGridStyle (IWorkspacews)
pure virtual

Returns the default frame grid style

Returns
PMString
virtual PMString Facade::IObjectStylesFacade::GetDefaultGraphicStyle (IWorkspacews)
pure virtual

Returns the default graphics style

Returns
PMString
virtual PMString Facade::IObjectStylesFacade::GetDefaultTextStyle (IWorkspacews)
pure virtual

Returns the default text style

Returns
PMString
virtual ErrorCode Facade::IObjectStylesFacade::ImportObjectStyles (IWorkspacews,
const IDFilesourceFile 
)
pure virtual

ImportObjectStyles: Import the styles from the sourceFile

Parameters
wsThe workspace the object style name table containing the style
sourceFileThe file to load from
virtual ErrorCode Facade::IObjectStylesFacade::LoadObjectStyles (IWorkspacews,
const bool16 & overrideLocal,
const IDFilesourceFile,
std::map< PMString, bool32 > importMap,
std::map< PMString, bool32 > clashMap,
std::map< PMString, StyleClashResolutionTypes::StyleClashResolutionStrategyresolveMap,
const StyleClashResolutionTypes::GlobalClashResolutionStrategyglobalClashResolutionStrategy 
)
pure virtual

LoadObjectStyles: Loads the styles from the sourceFile

Parameters
wsThe workspace the object style name table containing the style
overrideLocalTrue if the local styles with the same name are just overwritten
sourceFileThe file to load from
importMapImport styles.
clashMapStyles that are conflict with existing styles.
resolveMapResult styles after resolving the conflicts.
globalClashResolutionStrategyIN: global clash resolution strategy.
virtual ErrorCode Facade::IObjectStylesFacade::LoadObjectStyles (IWorkspacews,
const bool16 & overrideLocal,
const std::string & sourceFile,
std::map< PMString, bool32 > importMap,
std::map< PMString, bool32 > clashMap,
std::map< PMString, StyleClashResolutionTypes::StyleClashResolutionStrategyresolveMap,
const StyleClashResolutionTypes::GlobalClashResolutionStrategybLoadAllWithOverwrite 
)
pure virtual

LoadObjectStyles: Loads the styles from a cloud document

Parameters
wsThe workspace the object style name table containing the style
overrideLocalTrue if the local styles with the same name are just overwritten
sourceFileURI for cloud ID
importMapImport styles.
clashMapStyles that are conflict with existing styles.
resolveMapResult styles after resolving the conflicts.
globalClashResolutionStrategyIN: global clash resolution strategy.
virtual ErrorCode Facade::IObjectStylesFacade::MoveObjectStyles (IWorkspacews,
const K2Vector< PMString > & selectedObjectStylesPaths,
const int32 & dropBefore,
const UID newParent,
const RemappingListremaplist,
const IStyleRemapData::ConflictFlagEnum conflictFlag 
)
pure virtual

MoveObjectStyles: Moves the styles in the list to a new location before dropBefore

Parameters
wsThe workspace the object style name table containing the style
selectedObjectStylesNameThe list of styles paths to be moved
dropBeforeThe style to move before.
newParentUID of the new parent.
RemappingListremapping list in case of overwrite.
ConflictFlagEnumwhat to do incase of conflict.
virtual ErrorCode Facade::IObjectStylesFacade::MoveObjectStyles (const UIDListselectedObjectStyles,
const int32 & dropBefore,
const UID newParent,
const RemappingListremaplist,
const IStyleRemapData::ConflictFlagEnum conflictFlag 
)
pure virtual

MoveObjectStyles: Moves the styles in the list to a new location before dropBefore

Parameters
wsThe workspace the object style name table containing the style
selectedObjectStylesThe list of styles UIDs to be moved
dropBeforeThe style to move before.
newParentUID of the new parent.
RemappingListremapping list in case of overwrite.
ConflictFlagEnumwhat to do incase of conflict.
virtual ErrorCode Facade::IObjectStylesFacade::MoveStyleGroups (const UIDListstyleGroups,
const UID newParent,
const int32 position,
const RemappingListremaplist,
const IStyleRemapData::ConflictFlagEnum conflictFlag 
)
pure virtual

Moves a list of style groups to new parent and position.

Parameters
styleGroups[IN] list of style groups.
newParent[IN] UID of the new parent.
position[IN] new position.
remapList[IN] remapping in case a style is being overwritten due to move.
conflictFlag[IN] what to do incase of conflict.
virtual ErrorCode Facade::IObjectStylesFacade::RenameObjectStyle (IWorkspacews,
const UID styleUID,
const PMStringnewName,
const bool16 bNotify = kTrue 
)
pure virtual

RenameObjectStyle: Renames the given object style

Parameters
wsThe workspace the object style name table containing the style
styleUIDThe style to rename
newNameThe new name of the style
bNotifyFlag indicates if we should do notify or not.
virtual ErrorCode Facade::IObjectStylesFacade::RenameObjectStyleGroup (IWorkspacews,
const UID styleGroupUID,
const PMStringnewName 
)
pure virtual

Renames a style group.

Parameters
ws[IN] workspace
styleGroupUID[IN] style group UID.
newName[IN] new style group name.
virtual ErrorCode Facade::IObjectStylesFacade::ReplaceObjectStyles (IWorkspacews,
const K2Vector< PMString > & stylesToBeReplaced,
const PMStringsourceStyleName 
)
pure virtual

ReplaceObjectStyles: Replaces the object styles in the stylesToBeReplaced list with the new style sourceStyleName

Parameters
wsThe workspace the object style name table containing the style
stylesToBeReplacedThe list of styles to be replaces
sourceStyleNameThe name of the style to replace them with
virtual ErrorCode Facade::IObjectStylesFacade::SortObjectStyles (IWorkspacews)
pure virtual

DeleteObjectStyles:Sorts the styles

Parameters
wsThe workspace the object style name table containing the styles to sort