InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IInCopyWorkFlowUtils Class Referenceabstract

#include <IInCopyWorkFlowUtils.h>

Inheritance diagram for IInCopyWorkFlowUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IIINCOPYWORKFLOWUTILS }
 

Public Member Functions

virtual void SetFileTypeCreator (const IDFile &file, FileTypeInfoID type)=0
 
virtual UID FindSwatchByName (IDataBase *db, const PMString swatchName)=0
 
virtual UID ColorFromAttr (const UIDRef &storyRef, const WideString &elemName, IInCopyXMLElementAttr *iAttrs)=0
 
virtual UID CreateTintSwatch (IDataBase *db, const PMString tintName, const PMReal tintPercent)=0
 
virtual UID CreateGradient (IDataBase *db, const PMString &gradientName, const GradientType gradientType, K2Vector< UID > stopColor, K2Vector< PMReal > stopPos, K2Vector< PMReal > midPoint)=0
 
virtual void MakeQName (const WideString &localName, WideString &qName)=0
 
virtual ConstWString GrabQName (const WideString &localName)=0
 
ConstWString GrabQName (const UTF16TextChar *localName)
 
virtual IPMUnknownQueryTextMetaDataBoss (ITextModel *textModel, bool16 bForceCreate=kTrue)=0
 
virtual IPMUnknownQueryNthStoryMetaDataBoss (IDocument *document, int32 index)=0
 
virtual int32 CopyInlines (const UIDRef &oldStory, const UIDRef &newStory)=0
 
virtual TextIndex FindInlineInStory (TextIndex startPos, const UIDRef &tgtStory, const int32 inLineUIDVal)=0
 
virtual void SearchStoriesForInline (IDataBase *db, const int32 inLineUIDVal, UIDRef &tgtStory, TextIndex &startPos, UIDList *omitStories)=0
 
virtual void MapInlineToOriginal (TextIndex index, const UIDRef &newStory, const UIDRef &originalInline)=0
 
virtual void GetInlineInCopyStories (IDocument *doc, UIDList &stories)=0
 
virtual UIDList GetNonInCopyTextAndGraphicStories (const IDocument *fromDoc, bool16 doIncludeMasterItems=kTrue) const =0
 
virtual UIDList GetNonInCopyTextStories (const IDocument *fromDoc, bool16 doIncludeMasterItems=kTrue) const =0
 
virtual UIDList GetNonInCopyGraphicStories (const IDocument *fromDoc, bool16 doIncludeMasterItems=kTrue) const =0
 
virtual UIDList GetAllGraphics (const IDocument *fromDoc, bool16 all=kTrue, UID thisLayer=kInvalidUID, bool16 doIncludeMasterItems=kTrue) const =0
 
virtual UIDRef GetFirstGraphicStory (const UIDRef &fromDoc) const =0
 
virtual UIDRef GetStandaloneStory (const UIDRef &fromDoc) const =0
 
virtual bool16 IsImporting ()=0
 
virtual void SetImporting (bool16 importing)=0
 
virtual bool16 GetElementName (ClassID cls, WideString *elementName)=0
 
virtual UIDRef GetContainingInCopyStory (const UIDRef &linkedItemRef) const =0
 
virtual UIDRef GetOutermostParentStory (const UIDRef &target, const RangeData &range) const =0
 
virtual bool16 IsAFormObject (const UIDRef &itemRef) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IInCopyWorkFlowUtils is a utility class which provides common services to read and write InCopy files. Some routines are general file handling routines while others are specific to the incd file format. Most developers shouldn't need to call these routines unless they are attempting to replace parts of InCopy's normal file handling operations.

Member Function Documentation

virtual UID IInCopyWorkFlowUtils::ColorFromAttr (const UIDRefstoryRef,
const WideStringelemName,
IInCopyXMLElementAttriAttrs 
)
pure virtual

ColorFromAttr converts InCopy XML into a color UID, making it if necessary.

Parameters
storyRef- The story this color is associated with.
elemName- The XML element name from the file.
iAttrs- The XML attributes from the file.
Returns
- The UID of the imported color (which may have been found or created).
virtual int32 IInCopyWorkFlowUtils::CopyInlines (const UIDRefoldStory,
const UIDRefnewStory 
)
pure virtual

CopyInlines copies inlines from the old story to the beginning of the new story.

Parameters
oldStory- The old story UIDRef
newStory- The new story UIDRef
Returns
- The number of inlines copied.
virtual UID IInCopyWorkFlowUtils::CreateGradient (IDataBasedb,
const PMStringgradientName,
const GradientType gradientType,
K2Vector< UIDstopColor,
K2Vector< PMRealstopPos,
K2Vector< PMRealmidPoint 
)
pure virtual

CreateGradient reconstructs a gradient from it's various elements.

Parameters
db- The database to make the gradient in.
gradientName- The name of the gradient.
gradientType- The type of the gradient (radial or linear).
stopColor- An array of stop colors.
stopPos- An array of stop positions.
midPoint- An array of midpoint positions.
Returns
- The gradient UID.
virtual UID IInCopyWorkFlowUtils::CreateTintSwatch (IDataBasedb,
const PMString tintName,
const PMReal tintPercent 
)
pure virtual

CreateTintSwatch, unsurprisingly, creates a tint swatch.

Parameters
db- The document database to create or find the swatch in.
tintName- The tint name.
tintPercent- The tint percentage.
Returns
- The tint UID.
virtual TextIndex IInCopyWorkFlowUtils::FindInlineInStory (TextIndex startPos,
const UIDReftgtStory,
const int32 inLineUIDVal 
)
pure virtual

FindInlineInStory locates an inline story in a target story.

Parameters
startPos- The text index to start looking from.
tgtStory- The target story
inLineUIDVal- The UID of the inline story to locate
Returns
- The index into the text where the story was found (-1 if not found)
virtual UID IInCopyWorkFlowUtils::FindSwatchByName (IDataBasedb,
const PMString swatchName 
)
pure virtual

FindSwatchByName looks for a swatch in the specified database.

Parameters
db- The database to look in.
swatchName- The name of the swatch to find.
Returns
- The UID of the swatch (will be kInvalidUID if not found).
virtual UIDList IInCopyWorkFlowUtils::GetAllGraphics (const IDocumentfromDoc,
bool16 all = kTrue,
UID thisLayer = kInvalidUID,
bool16 doIncludeMasterItems = kTrue 
) const
pure virtual

Collects list of non-lined graphics from a document; these are graphic frames collected by interating the spreads' layers including those that appear in groups. The all param lets callers indicate if they want all graphics or only those that do not have InCopy format datalink (same as if calling GetNonInCopyGraphicStories).

Parameters
fromDocIN document with or without InCopy stories.
allIN indicates is all graphics or just those without InCopy format datalink
thisLayerIN UID of the layer to collect from, kInvalidUID means all layers
doIncludeMasterItemsIN indicates if get graphics on master spreads of not
Returns
UIDList with graphic frames.
virtual UIDRef IInCopyWorkFlowUtils::GetContainingInCopyStory (const UIDReflinkedItemRef) const
pure virtual

Get the containing InCopy story for the specified linked item.

Parameters
linkedObjRefIN uidref of the linked item to get containing incopy story
Returns
UIDRef of the containing incopy story (if any)
virtual bool16 IInCopyWorkFlowUtils::GetElementName (ClassID cls,
WideStringelementName 
)
pure virtual

Retrieves the name of the element specified by the ClassID and returns kTrue if the class was found.

Parameters
ClassIDfor the class interested in.
WideStringIN name of the element.
Returns
bool16 kTrue if the class is found.
virtual UIDRef IInCopyWorkFlowUtils::GetFirstGraphicStory (const UIDReffromDoc) const
pure virtual

Finds the first incopy graphic story in the document, useful when graphic story opened in standalone mode

Parameters
fromDocIN document to search
Returns
UIDRef of the first found graphic story, UIDRef::gNull if none found
virtual void IInCopyWorkFlowUtils::GetInlineInCopyStories (IDocumentdoc,
UIDListstories 
)
pure virtual

GetInlineInCopyStories returns a list of inline story UIDs for a document.

Parameters
doc- The document.
stories- The inline stories in that document.
virtual UIDList IInCopyWorkFlowUtils::GetNonInCopyGraphicStories (const IDocumentfromDoc,
bool16 doIncludeMasterItems = kTrue 
) const
pure virtual

Collects non-InCopy non-inlined graphic stories from a document; these are graphic frames collected by interating the spreads' layers including those that appear in groups that do not have an InCopy format datalink.

Parameters
fromDocIN document with or without InCopy stories.
doIncludeMasterItemsIN indicates if get graphics on master spreads of not
Returns
UIDList with non-InCopy stories.
virtual UIDList IInCopyWorkFlowUtils::GetNonInCopyTextAndGraphicStories (const IDocumentfromDoc,
bool16 doIncludeMasterItems = kTrue 
) const
pure virtual

Collects non-InCopy stories from a document.

Parameters
fromDocIN document with or without InCopy stories.
doIncludeMasterItemsIN indicates if get graphics on master spreads of not
Returns
UIDList with both text and graphic stories.
virtual UIDList IInCopyWorkFlowUtils::GetNonInCopyTextStories (const IDocumentfromDoc,
bool16 doIncludeMasterItems = kTrue 
) const
pure virtual

Collects non-InCopy graphic stories from a document; these are text stories collected by interating the storylist that do not have an InCopy format datalink.

Parameters
fromDocIN document with or without InCopy stories.
doIncludeMasterItemsIN indicates if get graphics on master spreads of not
Returns
UIDList with non-InCopy stories.
virtual UIDRef IInCopyWorkFlowUtils::GetOutermostParentStory (const UIDReftarget,
const RangeDatarange 
) const
pure virtual

Get the outermost InCopy story for the specified text target

Parameters
targetIN text model of the selected story
rangeIN RangeData of the selected story
Returns
UIDRef of the outermost parent incopy story
virtual UIDRef IInCopyWorkFlowUtils::GetStandaloneStory (const UIDReffromDoc) const
pure virtual

Finds the first incopy text story or incopy graphic story (there should only be one in standalone mode) in the document; verifies document is standalone.

Parameters
fromDocIN document to search
Returns
UIDRef of the first found incopy story, UIDRef::gNull if none found or doc not standalone
virtual ConstWString IInCopyWorkFlowUtils::GrabQName (const WideStringlocalName)
pure virtual

GrabQName makes a qname and returns it. Simply a wrapper for MakeQName.

Parameters
localName- A tag name.
Returns
- The qualified tag name.
ConstWString IInCopyWorkFlowUtils::GrabQName (const UTF16TextChar * localName)
inline

GrabQName makes qname and returns it. Simply a wrapper for GrabQName.

Parameters
localName- A UTF16 string pointer to a tag name.
Returns
- The qualified tag name.
virtual bool16 IInCopyWorkFlowUtils::IsAFormObject (const UIDRefitemRef) const
pure virtual

Examines both ancestors and decendents for an IID_IFORMFIELD.

Parameters
itemRefIN UIDRef of item to examine, if a text model will examine the 0th text frame.
Returns
bool16 kTrue if item is decended from or by IID_IFORMFIELD.
virtual bool16 IInCopyWorkFlowUtils::IsImporting ()
pure virtual

Flag that tells whether InCopy is currently importing a story, in either InDesign or InCopy.

Returns
Boolean for importing or not.
virtual void IInCopyWorkFlowUtils::MakeQName (const WideStringlocalName,
WideStringqName 
)
pure virtual

MakeQName constructs a fully qualified name from a local name. The difference is the aic: namespace (Adobe InCopy) prefix.

Parameters
localName- A tag name.
qName- The qualified tag name.
virtual void IInCopyWorkFlowUtils::MapInlineToOriginal (TextIndex index,
const UIDRefnewStory,
const UIDReforiginalInline 
)
pure virtual

MapInlineToOriginal maintains a list of inline UIDs while importing

Parameters
index- The text index of the original inline
newStory- The new inline UID
originalInline- The original inline UID
virtual IPMUnknown* IInCopyWorkFlowUtils::QueryNthStoryMetaDataBoss (IDocumentdocument,
int32 index 
)
pure virtual

QueryNthStoryMetaDataBoss returns the metadata for the nth story in a document. This will create the metadata interface if it does not exist.

Parameters
document- The document containing the stories.
index- The index in the story list of the story desired.
Returns
- A pointer to the story's metadata interface.
virtual IPMUnknown* IInCopyWorkFlowUtils::QueryTextMetaDataBoss (ITextModeltextModel,
bool16 bForceCreate = kTrue 
)
pure virtual

QueryTextMetaDataBoss returns the metadata interface for a story.

Parameters
textModel- The story text model pointer.
bForceCreate- Whether to create the metadata interface, default is true.
Returns
- A pointer to the story's metadata interface
virtual void IInCopyWorkFlowUtils::SearchStoriesForInline (IDataBasedb,
const int32 inLineUIDVal,
UIDReftgtStory,
TextIndex & startPos,
UIDListomitStories 
)
pure virtual

SearchStoriesForInline searches all stories of a document for a specified inline story.

Parameters
db- The document database to search.
inLineUIDVal- The inline story UID.
tgtStory- The story the inline was found in.
startPos- The position of the inline in tgtStory
omitStories- A list of story UIDs to skip.
virtual void IInCopyWorkFlowUtils::SetFileTypeCreator (const IDFilefile,
FileTypeInfoID type 
)
pure virtual

SetFileTypeCreator sets the Macintosh type and creator codes on a file.

Parameters
file- The file to set the type and creator on.
type- A FileTypeInfoID of the kind of file to set.
virtual void IInCopyWorkFlowUtils::SetImporting (bool16 importing)
pure virtual

Set the flag that tells whether InCopy is currently importing a story. This shouldn't be called except by the import provider.

Parameters
Booleanfor importing flag.