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

Public Types

enum  { kDefaultIID = IID_IXMLRULEACTIONFACADE }
 
enum  ElementLocation { kAtStart, kAtEnd }
 

Public Member Functions

virtual ErrorCode ApplyParagraphStyle (const IIDXMLElement *element, const PMString &styleString, bool16 clearOverrides)=0
 
virtual ErrorCode ApplyParagraphStyle (const IIDXMLElement *element, const UIDRef &styleRef, bool16 clearOverrides)=0
 
virtual ErrorCode ApplyCharacterStyle (const IIDXMLElement *element, const PMString &styleString)=0
 
virtual ErrorCode ApplyCharacterStyle (const IIDXMLElement *element, const UIDRef &styleRef)=0
 
virtual ErrorCode ApplyObjectStyle (const IIDXMLElement *element, const PMString &styleName, bool16 clearOverrides, bool16 clearOverridesThruRoot)=0
 
virtual ErrorCode ApplyObjectStyle (const IIDXMLElement *element, const UIDRef &styleRef, bool16 clearOverrides, bool16 clearOverridesThruRoot)=0
 
virtual ErrorCode ConvertAttributeToChildElement (IIDXMLElement *element, const PMString &attributeName, ElementLocation location, const PMString &alternateTagName="", XMLReference *outNewChildElement=nil)=0
 
virtual ErrorCode ConvertAttributeToChildElement (IIDXMLElement *element, const WideString &attributeName, ElementLocation location, const WideString &alternateTagName=(WideString)"", XMLReference *outNewChildElement=nil)=0
 
virtual ErrorCode ConvertElementToAttributeOnParent (IIDXMLElement *element, const WideString &alternateAttributeName=(WideString)"", WideString *outNewAttrName=nil)=0
 
virtual ErrorCode ConvertElementToTable (IIDXMLElement *element, const PMString &tableRowTagName, const PMString &tableCellTagName, UIDRef &newTable)=0
 
virtual ErrorCode ConvertElementToTable (IIDXMLElement *element, const WideString &tableRowTagName, const WideString &tableCellTagName, UIDRef &newTable)=0
 
virtual ErrorCode PlaceIntoFrame (const IIDXMLElement *element, ISpread *spread, const PMRect &pasteboardBounds, UIDRef &newFrame)=0
 
virtual ErrorCode PlaceIntoCopy (const IIDXMLElement *element, ISpread *spread, const PMPoint &pasteboardLocation, UID frameToCopy, bool16 retainExistingFrame, UIDRef &newFrame)=0
 
virtual ErrorCode PlaceIntoInlineFrame (const IIDXMLElement *element, const PMPoint &dimensions, UIDRef &newFrame)=0
 
virtual ErrorCode PlaceIntoInlineCopy (const IIDXMLElement *element, UID frameToCopy, bool16 retainExistingFrame, UIDRef &newFrame)=0
 
virtual ErrorCode SetContent (const IIDXMLElement *element, const PMString &filePath, const PMString &baseReleativePath="")=0
 
virtual UID PlaceOntoPage (const IIDXMLElement *element, const UIDRef &pageOrSpread, const PMPoint &placePoint, bool16 autoflow)=0
 
virtual UIDList GetElementFrames (const IIDXMLElement *element)=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::IXMLRuleActionFacade::ApplyCharacterStyle (const IIDXMLElementelement,
const PMStringstyleString 
)
pure virtual
Method for applying a character style to an XML element.  This should act the same as if the elements

text was selected by double-clicking on the element, and then the style applied.

Parameters
elementthe style will be applied to
styleStringthe style to apply. If style is in a style folder, use a path like "MyStyles:Headline"
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::ApplyCharacterStyle (const IIDXMLElementelement,
const UIDRefstyleRef 
)
pure virtual
Method for applying a character style to an XML element.  This should act the same as if the elements

text was selected by double-clicking on the element, and then the style applied.

Parameters
elementthe style will be applied to
styleRefthe UIDRef of the style to apply.
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::ApplyObjectStyle (const IIDXMLElementelement,
const PMStringstyleName,
bool16 clearOverrides,
bool16 clearOverridesThruRoot 
)
pure virtual
Method for applying an object style to an XML element.  This will apply the style to th element's frame only

if the element is directly associated with the frame. If the specified element is a child of a story element this will have no effect. For story elements, object style will be applied to all frames containing the story.

Parameters
elementelement the style will be applied to
styleStringthe style to apply.
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::ApplyObjectStyle (const IIDXMLElementelement,
const UIDRefstyleRef,
bool16 clearOverrides,
bool16 clearOverridesThruRoot 
)
pure virtual
Method for applying an object style to an XML element.  This will apply the style to th element's frame only

if the element is directly associated with the frame. If the specified element is a child of a story element this will have no effect. For story elements, object style will be applied to all frames containing the story.

Parameters
elementthe style will be applied to
styleRefthe UIDRef of the style to apply.
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::ApplyParagraphStyle (const IIDXMLElementelement,
const PMStringstyleString,
bool16 clearOverrides 
)
pure virtual

Method for applying a paragraph style to an XML element. This should act the same as if the elements text was selected by double-clicking on the element, and then the style applied.

Parameters
elementthe style will be applied to
styleStringthe style to apply. If style is in a style folder, use a path like "MyStyles:Headline"
clearOverridesspecifies whether style overrides should be cleared when applying the style
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::ApplyParagraphStyle (const IIDXMLElementelement,
const UIDRefstyleRef,
bool16 clearOverrides 
)
pure virtual

Method for applying a paragraph style to an XML element. This should act the same as if the elements text was selected by double-clicking on the element, and then the style applied.

Parameters
elementthe style will be applied to
styleRefthe UIDRef of the style to apply.
clearOverridesspecifies whether style overrides should be cleared when applying the style
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::ConvertAttributeToChildElement (IIDXMLElementelement,
const PMStringattributeName,
ElementLocation location,
const PMStringalternateTagName = "",
XMLReferenceoutNewChildElement = nil 
)
pure virtual
DEPRECATED -- Use ConvertAttributeToChildElement with WideString instead.

Method for converting an attribute with value into a child element with content.The content of the new child element becomes part of its parent element's content. Attribute is removed from the element.

Parameters
elementthe element containing the attribute
locationlocation of the new element( kAtStart, kAtEnd)
alternateTagNametag name for the new element(default is to use attribute name)
outNewChildElementout param which will be filled in with the new child element created
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::ConvertAttributeToChildElement (IIDXMLElementelement,
const WideStringattributeName,
ElementLocation location,
const WideStringalternateTagName = (WideString)"",
XMLReferenceoutNewChildElement = nil 
)
pure virtual
Method for converting an attribute with value into a child element with content.The content of the new child element becomes part of its parent element's content.

Attribute is removed from the element.

Parameters
elementthe element containing the attribute
locationlocation of the new element( kAtStart, kAtEnd)
alternateTagNametag name for the new element(default is to use attribute name)
outNewChildElementout param which will be filled in with the new child element created
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::ConvertElementToAttributeOnParent (IIDXMLElementelement,
const WideStringalternateAttributeName = (WideString)"",
WideStringoutNewAttrName = nil 
)
pure virtual
-- Use ConvertElementToAttributeOnParent with WideString instead.

Method for converting an element into an attribute on the element's parent. The content of the element becomes the value for the attribute Element and its content are removed from its parent. We commented this out, since its presence along with the widestring version will result in an ambiguous error when used with a single parameter.

Parameters
elementthe element to convert to an attribute
alternateAttributeNameattribute name for the new attribute(default is to use tag name)
outNewAttrNameout param which will be filled in with the name of the new attribute
Returns
ErrorCode kSuccess if the operation could be completed Method for converting an element into an attribute on the element's parent. The content of the element becomes the value for the attribute Element and its content are removed from its parent
Parameters
elementthe element to convert to an attribute
alternateAttributeNameattribute name for the new attribute(default is to use tag name)
outNewAttrNameout param which will be filled in with the name of the new attribute
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::ConvertElementToTable (IIDXMLElementelement,
const PMStringtableRowTagName,
const PMStringtableCellTagName,
UIDRefnewTable 
)
pure virtual

DEPRECATED – Use ConvertElementToTable with WideString instead. Method for converting an element into a table in the element's parent. Element's child structure is used to delineate rows and cells that contruct the new table Table is tagged with elements tag. Children of element are applied to cell content as appropriate

Parameters
elementthe element to convert to a table
tableRowTagNamename of the tag used to designate table rows in the element
tableCellTagNamename of the tag used to dsignate table cells in the element
virtual ErrorCode Facade::IXMLRuleActionFacade::ConvertElementToTable (IIDXMLElementelement,
const WideStringtableRowTagName,
const WideStringtableCellTagName,
UIDRefnewTable 
)
pure virtual

Method for converting an element into a table in the element's parent. Element's child structure is used to delineate rows and cells that contruct the new table Table is tagged with elements tag. Children of element are applied to cell content as appropriate

Parameters
elementthe element to convert to a table
tableRowTagNamename of the tag used to designate table rows in the element
tableCellTagNamename of the tag used to dsignate table cells in the element
virtual UIDList Facade::IXMLRuleActionFacade::GetElementFrames (const IIDXMLElementelement)
pure virtual
Given an element, return a list of graphic frames that contain the element.  Does not follow links to other stories.        

Parameters
elementthe element whose frame chain you would like to get
Returns
UIDList of graphic frames
virtual ErrorCode Facade::IXMLRuleActionFacade::PlaceIntoCopy (const IIDXMLElementelement,
ISpreadspread,
const PMPointpasteboardLocation,
UID frameToCopy,
bool16 retainExistingFrame,
UIDRefnewFrame 
)
pure virtual
Place element into a frame at the specified location.  The frame created will be a copy of the frame passed in pageItemToCopy.

If the element is in an existing frame, the existing frame will be deleted.

Parameters
elementthe element to place
spreadattribute name for the new attribute(default is to use tag name)
pasteboardLocationpoint in pasteboard coordinates to for the top left of the copied frame
frameToCopythe frame you would like to copy(must have IGraphicFrame)
retainExistingFrameif true and the element is already placed, the existing frame will be moved to the specified location. if false, existing frame will be deleted and copied frame used
newFrameon return, contains the new frame created
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::PlaceIntoFrame (const IIDXMLElementelement,
ISpreadspread,
const PMRectpasteboardBounds,
UIDRefnewFrame 
)
pure virtual
Place element into a new frame at the specified location.  If the element is in an existing frame, the existing frame will be deleted.

Parameters
elementthe element to place
spreadattribute name for the new attribute(default is to use tag name)
pasteboardBoundsbounds in pasteboard coordinates to create the frame
newFrameon return, contains the new frame created
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::PlaceIntoInlineCopy (const IIDXMLElementelement,
UID frameToCopy,
bool16 retainExistingFrame,
UIDRefnewFrame 
)
pure virtual
Place element into a inline frame at the existing location of the element in its parent story.  The frame will be a copy of the frame passed in pageItemToCopy.

If the element is in an existing frame, the existing frame will be deleted.

Parameters
pageItemToCopythe element to place
frameToCopythe frame you would like to copy(must have IGraphicFrame)
retainExistingFrameif true and the element is already an inline, the existing frame will be used. if false, existing frame will be deleted and copied frame used
newFrameon return, contains the new frame created
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::PlaceIntoInlineFrame (const IIDXMLElementelement,
const PMPointdimensions,
UIDRefnewFrame 
)
pure virtual
Place element into a inline frame at the existing location of the element in its parent story.  The frame will be rectangular and have default attributes.

If the element is in an existing frame, the existing frame will be deleted.

Parameters
elementthe element to place
dimensionswidth and height of the inline
newFrameon return, contains the new frame created
Returns
ErrorCode kSuccess if the operation could be completed
virtual ErrorCode Facade::IXMLRuleActionFacade::SetContent (const IIDXMLElementelement,
const PMStringfilePath,
const PMStringbaseReleativePath = "" 
)
pure virtual
Replace the existing content of the element with the contents of the file specified by the attribute value of the attribute passed in.

If the attribute name is a relative path, you can pass a base path as well to allow it to resolve to full path

Parameters
pageItemToCopythe element whose content you would like to replace
filePathan absolute or relative file path
baseRelativePathfor a file reference with relative paths, use this as the base path
Returns
ErrorCode kSuccess if the operation could be completed