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

Classes

struct  MappingRule
 

Public Types

enum  { kDefaultIID = IID_ISTYLEMAPPINGS }
 
enum  MappingStyleType {
  kParaStyleMapping = 0, kCharStyleMapping, kTableStyleMapping, kCellStyleMapping,
  kObjectStyleMapping
}
 
enum  MappingRuleType { kStyleMappingRule = 0, kGroupMappingRule, kStyleToGroupMappingRule, kGroupToStyleMappingRule }
 
typedef std::vector< MappingRuleMappingRuleVector
 

Public Member Functions

virtual void SetStyleMappings (const MappingRuleVector &inStyleMap, MappingStyleType eInMappingType)=0
 
virtual void GetStyleMappings (MappingStyleType eInMappingType, MappingRuleVector &outStyleMap) const =0
 
virtual void SetMapping (const PMString &inStrStyleName, const PMString &inStrMappedTo, MappingRuleType eInMappingRuleType, MappingStyleType eInMappingStyleType)=0
 
virtual int32 AddMapping (const PMString &inStrStyleName, const PMString &inStrMappedTo, MappingRuleType eInMappingRuleType, MappingStyleType eInMappingStyleType)=0
 
virtual void AddMapping (MappingRule &inMappingRule, MappingStyleType eInMappingStyleType)=0
 
virtual MappingRuleType FindMapping (const PMString &inStrStyleName, MappingStyleType eInMappingType, PMString &outStrMappedTo) const =0
 
virtual MappingRuleType GetNthMapping (int32 n, MappingStyleType eInMappingStyleType, PMString &outStrStyleName, PMString &outStrMappedTo) const =0
 
virtual bool16 GetNthMapping (int32 n, MappingStyleType eInMappingStyleType, MappingRule &outMappingRule) const =0
 
virtual void SetNthMapping (int32 n, const PMString &inStrStyleName, const PMString &inStrMappedTo, MappingRuleType eInMappingRuleType, MappingStyleType eInMappingStyleType)=0
 
virtual int32 GetMappingIndex (MappingStyleType eInMappingStyleType, PMString &inStrStyleName, MappingRuleType eInMappingRuleType, PMString &inStrMappedTo) const =0
 
virtual int32 GetMappingRuleVectorSize (MappingStyleType eInMappingStyleType) const =0
 
virtual void CopyFrom (const IStyleMappings *inStyleMap)=0
 
virtual void ClearMappings ()=0
 
virtual MappingStyleType GetMappingStyleType (const IStyleInfo *styleInfo) const =0
 
virtual bool16 RemoveMapping (int32 n, MappingStyleType mappingStyleType)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Typedef Documentation

typedef for mapping rule vector corresponding to a particular style type.

Member Enumeration Documentation

anonymous enum

Standard enum to for use with GetDefaultIID() method.

Enum for specifying mapping rule type.
Enumerator
kStyleMappingRule 

Style To Style Mapping

kGroupMappingRule 

Group To Group Mapping

kStyleToGroupMappingRule 

Style To Group Mapping

kGroupToStyleMappingRule 

Group To Style Mapping

Enum for specifying style type.
Enumerator
kParaStyleMapping 

Paragraph Style Mapping

kCharStyleMapping 

Character Style Mapping

kTableStyleMapping 

Table Style Mapping

kCellStyleMapping 

Cell Style Mapping

kObjectStyleMapping 

Object Style Mapping

Member Function Documentation

virtual int32 IStyleMappings::AddMapping (const PMStringinStrStyleName,
const PMStringinStrMappedTo,
MappingRuleType eInMappingRuleType,
MappingStyleType eInMappingStyleType 
)
pure virtual

Add a mapping corresponding to the passed parameters to the mapping data.

Parameters
inStrStyleName[IN]new source mapping name.
inStrMappedTo[IN]new target mapping name.
eInMappingRuleType[IN]new type for the mapping rule.
eInMappingStyleType[IN]style type.
Returns
previous size of the mapping rule vector before this addition occured.
virtual void IStyleMappings::AddMapping (MappingRuleinMappingRule,
MappingStyleType eInMappingStyleType 
)
pure virtual

Add the passed mapping rule to the mapping data.

Parameters
inMappingRule[IN]mapping rule to add.
eInMappingStyleType[IN]style type.
virtual void IStyleMappings::ClearMappings ()
pure virtual

Removes (or clears) all the style mapping data for all style types.

virtual void IStyleMappings::CopyFrom (const IStyleMappingsinStyleMap)
pure virtual

copies-in all the style mapping data (for all style types) from the input (parameter) style mapping data.

Parameters
inStyleMap[IN]input style mapping data from which the data is copied to this interface.
virtual MappingRuleType IStyleMappings::FindMapping (const PMStringinStrStyleName,
MappingStyleType eInMappingType,
PMStringoutStrMappedTo 
) const
pure virtual

Try to find a mapping rule which is applicable in mapping an input source style name. If found return the target style or group name to which the input style should be mapped.

Parameters
inStrStyleName[IN]name of the source style to be mapped.
eInMappingType[IN]style type.
outStrMappedTo[IN]name of the target style or group if an applicable mapping rule was found.
Returns
rule type of the applicable mapping rule found.
virtual int32 IStyleMappings::GetMappingIndex (MappingStyleType eInMappingStyleType,
PMStringinStrStyleName,
MappingRuleType eInMappingRuleType,
PMStringinStrMappedTo 
) const
pure virtual

Get the index or position of a mapping rule (defined by the passed on mapping data) in the mapping rule vector corresponding to a particular style type.

Parameters
eInMappingStyleType[IN]style type of the mapping rule.
inStrStyleName[IN]the source mapping name for the mapping rule we want to find.
eInMappingRuleType[IN]the type of the mapping we want to find.
inStrMappedTo[IN]the target mapping name for the mapping rule we want to find.
Returns
position of the mapping rule with the same mapping data as the passed parameters.
virtual int32 IStyleMappings::GetMappingRuleVectorSize (MappingStyleType eInMappingStyleType) const
pure virtual

Get the number of style mapping rules present for a particular mapping style type.

Parameters
mappingStyleType[IN]style type for which we want to get number of style mapping rules.
Returns
number of style mapping rules present for the given style type.
virtual MappingStyleType IStyleMappings::GetMappingStyleType (const IStyleInfostyleInfo) const
pure virtual

For an input style, this returns the mapping style type to which this style will correspond.

Parameters
styleInfo[IN]IStyleInfo interface of the style.
Returns
mapping style type corresponding to the style.
virtual MappingRuleType IStyleMappings::GetNthMapping (int32 n,
MappingStyleType eInMappingStyleType,
PMStringoutStrStyleName,
PMStringoutStrMappedTo 
) const
pure virtual

Get the nth mapping rule present in the mapping rule vector corresponding to a particular style type.

Parameters
n[IN]position (in the mapping rule vector) of the mapping rule (mapping) we want to return.
eInMappingStyleType[IN]style type to which the mapping rule, corresponds.
outStrStyleName[IN]source mapping name corresponding to the nth mapping rule found.
outStrMappedTo[IN]target mapping name corresponding to the nth mapping rule found.
Returns
rule type of the nth mapping rule in the mapping rule vector.
virtual bool16 IStyleMappings::GetNthMapping (int32 n,
MappingStyleType eInMappingStyleType,
MappingRuleoutMappingRule 
) const
pure virtual

Get the nth mapping rule present in the mapping rule vector corresponding to a particular style type.

Parameters
n[IN]position (in the mapping rule vector) of the mapping rule (mapping) we want to return.
eInMappingStyleType[IN]style type to which the mapping rule, corresponds.
outMappingRule[IN]the nth mapping rule which is being returned by this function.
Returns
kTrue if nth mapping rule was found, else return kFalse.
virtual void IStyleMappings::GetStyleMappings (MappingStyleType eInMappingType,
MappingRuleVectoroutStyleMap 
) const
pure virtual

Returns the mapping rule vector corresponding to the given style type

Parameters
eInMappingType[IN]the style type for which mapping rule vector will be returned
outStyleMap[IN]mapping rule vector corresponding to the style type passed.
virtual bool16 IStyleMappings::RemoveMapping (int32 n,
MappingStyleType mappingStyleType 
)
pure virtual

Remove nth mapping rule from the style mapping data.

Parameters
n[IN]the index of the style mapping rule to be removed.
mappingStyleType[IN]style type of the mapping rule.
Returns
kTrue if there is an nth mapping rule of the given type otherwise kFalse.
virtual void IStyleMappings::SetMapping (const PMStringinStrStyleName,
const PMStringinStrMappedTo,
MappingRuleType eInMappingRuleType,
MappingStyleType eInMappingStyleType 
)
pure virtual

Search the passed mapping parameters in the mapping data, if not already present at them as a mapping rule.

Parameters
inStrStyleName[IN]new source mapping name to set.
inStrMappedTo[IN]new target mapping name to set.
eInMappingRuleType[IN]new type for the mapping rule to set.
eInMappingStyleType[IN]style type.
virtual void IStyleMappings::SetNthMapping (int32 n,
const PMStringinStrStyleName,
const PMStringinStrMappedTo,
MappingRuleType eInMappingRuleType,
MappingStyleType eInMappingStyleType 
)
pure virtual

Change the nth mapping rule present in the mapping rule vector corresponding to a particular style type.

Parameters
n[IN]position (in the mapping rule vector) of the mapping rule (mapping) we want to change.
inStrStyleName[IN]new source mapping name with which we replace the old source mapping name.
inStrMappedTo[IN]new target mapping name with which we replace the old target mapping name.
eInMappingRuleType[IN]new type for the mapping rule.
eInMappingStyleType[IN]style type to which the mapping rule being modified, corresponds.
virtual void IStyleMappings::SetStyleMappings (const MappingRuleVectorinStyleMap,
MappingStyleType eInMappingType 
)
pure virtual

Replace the mapping rule vector for a particular style type, with the passed mapping rule vector.

Parameters
inStyleMap[IN]the style name or the style group name to validate.
Returns
kTrue if the name is valid otherwise kFalse.