InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DataUpdaterUtils Class Reference

#include <DataUpdaterUtils.h>

Static Public Member Functions

static ErrorCode ReplaceText (ITextModel *iTextModel, const TextIndex &textIndex, int32 length, const boost::shared_ptr< WideString > &wideVal)
 
static UIDRef AcquireOneTag (IXMLTagList *tagList, const WideString &tagName)
 
static ErrorCode TagTextWithAttributeValue (UID tagUID, UIDRef story, TextIndex startIndex, TextIndex endIndex, const WideString attrName, const WideString attrValue)
 

Detailed Description

From SDK sample; Utility methods for the xmldataupdater plug-in.

Member Function Documentation

UIDRef DataUpdaterUtils::AcquireOneTag (IXMLTagListtagList,
const WideStringtagName 
)
static

Acquire XMLDataUpdater XML Tags. Create new tag if they have not been created before

Parameters
tagListXML tag list of a document.
tagNameis the name of XML tag.
ErrorCode DataUpdaterUtils::ReplaceText (ITextModeliTextModel,
const TextIndex & textIndex,
int32 length,
const boost::shared_ptr< WideString > & wideVal 
)
static

Replace the given range of text with the WideString supplied.

Parameters
iTextModelis the text model contant to be manipulated.
textIndexis where the starting text to be replaced.
lengthis the range of text to be replaced.
valis the text to replace the old text.
Returns
ErrorCode of the processed command result.
ErrorCode DataUpdaterUtils::TagTextWithAttributeValue (UID tagUID,
UIDRef story,
TextIndex startIndex,
TextIndex endIndex,
const WideString attrName,
const WideString attrValue 
)
static

Tag the specified range of text with XML tag, and create one attribtue with attribute value.

Parameters
tagUIDXML tag UID used to tag the text.
storyis the story of the text to be manipulated.
startIndexis the starting index at which the text is to be tagged.
endIndexis the ending index at which the text is to be tagged.
attrNameis the attribute name of the XML element be created.
attrValueis the value of the attribute of the XML element be created.
Returns
the error code of command processing result.