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

#include <IStoryUtils.h>

Inheritance diagram for IStoryUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISTORYUTILS }
 

Public Member Functions

virtual bool16 HasStories (const IDocument *fromDoc) const =0
 
virtual UIDList GetStories (const IDocument *fromDoc) const =0
 
virtual UIDList GetStoryLinks (const IDocument *fromDoc) const =0
 
virtual bool16 IsAStory (const UIDRef &itemRef) const =0
 
virtual bool16 IsAStoryFormatName (const PMString &formatName) const =0
 
virtual bool16 IsAStoryInterchangeFileTypeID (const FileTypeInfoID &fileTypeID) const =0
 
virtual bool16 IsAStoryDocumentFileTypeID (const FileTypeInfoID &fileTypeID) const =0
 
virtual bool16 IsCurrentStoryDocumentFileType (const FileTypeInfoID &fileTypeID) const =0
 
virtual bool16 IsAnyCurrentStoryFileType (const FileTypeInfoID &fileTypeID) const =0
 
virtual bool16 IsAnyStoryFileTypeID (const FileTypeInfoID &fileTypeID) const =0
 
virtual bool16 IsLinkResourceOutOfDate (const UIDRef &itemRef) const =0
 
virtual ErrorCode CreateLink (const UIDRef &story, const IDFile &file, ClassID provider, FileTypeInfoID fileTypeInfo, UID &linkUID)=0
 
virtual bool16 IsLinkResourceAccessible (const UIDRef &storyRef) const =0
 
virtual bool16 IsAStoryLink (const ILink *iLink) const =0
 
virtual PMString GetStoryFormatType (const UIDRef &itemRef) const =0
 
virtual bool16 IsCloudStory (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

IStoryUtils is a utility class on the Utils boss which provides common services for InCopy stories. This interface should be accessed like so:

 Utils<IStoryUtils>()->HasStories( ... ); 
See Also
kUtilsBoss
Utils.h

Member Function Documentation

virtual ErrorCode IStoryUtils::CreateLink (const UIDRefstory,
const IDFilefile,
ClassID provider,
FileTypeInfoID fileTypeInfo,
UIDlinkUID 
)
pure virtual

CreateLink, unsurprisingly, creates a link for an InCopy story. This will remove and replace any existing link on the story.

Parameters
storyIN The InCopy story UIDRef.
fileIN The InCopy story file.
providerIN The ClassID of the provider; for example kInCopyImportProviderBoss.
fileTypeIDIN The file type info ID for the InCopy file.
linkUIDOUT UID of the created link.
Returns
kSuccess if the link was created successfully.
virtual UIDList IStoryUtils::GetStories (const IDocumentfromDoc) const
pure virtual

Collects InCopy stories from a document.

Parameters
fromDocIN document with or without InCopy stories.
Returns
UIDList with InCopy stories.
virtual PMString IStoryUtils::GetStoryFormatType (const UIDRefitemRef) const
pure virtual

Get the format type for the InCopy story. This is the format type of the story's link resource. See ILinkResource.

Parameters
itemRefThe UIDRef of the InCopy story to get the format type.
Returns
PMString The format type if succeeded or an empty string (i.e. item is not an InCopy story).
virtual UIDList IStoryUtils::GetStoryLinks (const IDocumentfromDoc) const
pure virtual

Collects InCopy story links from a document.

Parameters
fromDocIN document with or without InCopy stories.
Returns
UIDList with InCopy story link UIDs.
virtual bool16 IStoryUtils::HasStories (const IDocumentfromDoc) const
pure virtual

Checks if there are any InCopy stories in a document. Faster than calling GetStories() if you just want to know if this document has at least one incopy story.

Parameters
fromDocIN document with or without InCopy stories.
Returns
bool16 whether or not this document contains incopy stories.
virtual bool16 IStoryUtils::IsAnyCurrentStoryFileType (const FileTypeInfoIDfileTypeID) const
pure virtual

Tests if a specified FileTypeInfoID is for the current InCopy filetype.

Parameters
fileTypeIDis a FileTypeInfoID.
Returns
kTrue if the fileTypeID is for the current InCopy file; kFalse otherwise.
virtual bool16 IStoryUtils::IsAnyStoryFileTypeID (const FileTypeInfoIDfileTypeID) const
pure virtual

Tests if a specified FileTypeInfoID is for an InCopy filetype.

Parameters
fileTypeIDis a FileTypeInfoID.
Returns
kTrue if the fileTypeID is for an InCopy file; kFalse otherwise.
virtual bool16 IStoryUtils::IsAStory (const UIDRefitemRef) const
pure virtual

Check to see if the text model or page item is an InCopy story (text or graphic) - that is, it has an InCopy format data link.

Parameters
itemRefIN text model or page item to examine
Returns
bool16 kTrue if the item is an InCopy story (text or graphic).
virtual bool16 IStoryUtils::IsAStoryDocumentFileTypeID (const FileTypeInfoIDfileTypeID) const
pure virtual

Tests if a specified FileTypeInfoID is for an InCopy document filetype (*.incx, *.icml).

Parameters
fileTypeIDis a FileTypeInfoID.
Returns
kTrue if the fileTypeID is for an InCopy document file; kFalse otherwise.
virtual bool16 IStoryUtils::IsAStoryFormatName (const PMStringformatName) const
pure virtual

Tests if a specified file format name is for an InCopy story.

Parameters
formatNameis a PMString containing the format name; typically, this PMString can be obtained from the ILinkResource::GetFormatType method.
Returns
kTrue if the formatName is for an InCopy story; kFalse otherwise.
virtual bool16 IStoryUtils::IsAStoryInterchangeFileTypeID (const FileTypeInfoIDfileTypeID) const
pure virtual

Tests if a specified FileTypeInfoID is for an InCopy interchange filetype.

Parameters
fileTypeIDis a FileTypeInfoID.
Returns
kTrue if the fileTypeID is for an InCopy interchange file; kFalse otherwise.
virtual bool16 IStoryUtils::IsAStoryLink (const ILinkiLink) const
pure virtual

Test if an ILink instance if for an InCopy story.

Parameters
iLinkvalid pointer to an ILink instance to test.
Returns
kTrue if the ILink is for a story; kFalse otherwise.
virtual bool16 IStoryUtils::IsCloudStory (const UIDRefitemRef) const
pure virtual

Internal use only. Check if given story is assigned to any collaborator in InCopy on web workflow.

Parameters
itemRefThe UIDRef of the story.
Returns
kTrue if the story is assigned to any collaborator; kFalse otherwise.
virtual bool16 IStoryUtils::IsCurrentStoryDocumentFileType (const FileTypeInfoIDfileTypeID) const
pure virtual

Tests if a specified FileTypeInfoID is for the current InCopy document filetype (*.incx, *.icml).

Parameters
fileTypeIDis a FileTypeInfoID.
Returns
kTrue if the fileTypeID is for the current InCopy document file; kFalse otherwise.
virtual bool16 IStoryUtils::IsLinkResourceAccessible (const UIDRefstoryRef) const
pure virtual

Check if the given InCopy story's link resource is accessible or not. Note: missing is considered accessible as long as it's parent directory exists.

Parameters
itemRefIN text model or page item to examine.
Returns
bool16 kTrue if the text model or page item is an InCopy story and the link resource is accessible.
virtual bool16 IStoryUtils::IsLinkResourceOutOfDate (const UIDRefitemRef) const
pure virtual

Check if the given InCopy story's link resource is modified or not.

Parameters
itemRefIN text model or page item to examine.
Returns
bool16 kTrue if the text model or page item is an InCopy story and the link resource is modified.