![]() | InDesign SDK 20.5 |
#include <IInCopyDocUtils.h>

Public Types | |
| enum | { kDefaultIID = IID_IINCOPYDOCUTILS } |
Public Member Functions | |
| virtual void | DoSave (const UIDRef &textModel, UIFlags uiFlags=kFullUI)=0 |
| virtual void | DoSaveAll (const UIDRef &doc, UIFlags uiFlags=kFullUI)=0 |
| virtual void | DoSaveAs (const UIDRef &doc, bool16 copy=kFalse, const IDFile *destFile=nil, UIFlags uiFlags=kFullUI, bool8 asStationary=kFalse, FileTypeInfoID fileTypeID=kInvalidFileTypeInfoID)=0 |
| virtual UIDRef | DoOpen (const IDFile &filesToOpen, IOpenFileCmdData::OpenFlags flags, bool16 showWindow=kTrue, IDocument::UndoSupport undoSupport=IDocument::kFullUndoSupport, UIFlags=kFullUI)=0 |
| virtual UIDRef | DoNew (bool16 openWin=kTrue, IDocument::UndoSupport undoSupport=IDocument::kFullUndoSupport)=0 |
| virtual void | DoRevert (const UIDRef &doc, UIFlags uiFlags=kFullUI)=0 |
| virtual void | DoUpdateDesign (const UIDRef &docRef, UIFlags uiFlags=kFullUI)=0 |
| virtual void | DoNewWindow (const UIDRef &doc)=0 |
| virtual void | DoClose (const UIDRef &doc, UIFlags uiFlags, bool16 allowCancel, IDocFileHandler::CloseCmdMode cmdMode)=0 |
| virtual IDocFileHandler * | QueryDocFileHandler ()=0 |
| virtual bool16 | ShouldDoSaveAs (IDocument *doc)=0 |
| virtual bool16 | CanDoSave (const UIDRef &doc)=0 |
| virtual bool16 | CanDoSaveAll (const UIDRef &doc)=0 |
| virtual bool16 | CanDoRevert (const UIDRef &doc)=0 |
| virtual bool16 | CanDoUpdateDesign (const UIDRef &doc)=0 |
| virtual bool16 | IsReadOnly (IDocument *iDoc)=0 |
| virtual void | ExportAllLinkedStories (IDocument *doc, const FileTypeInfoID &fileTypeID, UIFlags uiFlags=kFullUI)=0 |
| virtual void | ExportStoryAndCreateLink (const UIDRef &story, const IDFile &file, const FileTypeInfoID &fileTypeID)=0 |
| virtual ErrorCode | ExportLinkedStory (const UIDRef &story, const FileTypeInfoID &fileTypeID)=0 |
| virtual void | ImportAllLinkedStories (IDocument *doc, const FileTypeInfoID &fileTypeID, IInCopyImportOptions *options)=0 |
| virtual ErrorCode | ImportStoryAndCreateLink (const UIDRef &story, IPMStream *stream, IInCopyImportOptions *options, const FileTypeInfoID &fileTypeID, bool16 createLink=kTrue, UIDRef *importedItem=nil)=0 |
| virtual ErrorCode | ImportLinkedStory (const UIDRef &story, const FileTypeInfoID &fileTypeID, IInCopyImportOptions *options=nil)=0 |
| virtual UIDRef | GetFirstUserStory (IDocument *doc)=0 |
| virtual void | GetLinkedStories (IDocument *doc, UIDList *stories, UIDList *links, IDataBase *db=nil)=0 |
| virtual UIDRef | CreateDefaultTextFrame (IDocument *doc)=0 |
| virtual UIDRef | CreateDefaultGraphicFrame (IDocument *doc)=0 |
| virtual IDocFileHandler::CloseOptions | CheckOnClose (const UIDRef &doc, UIFlags uiFlags, bool8 allowCancel)=0 |
| virtual bool16 | CheckOnRevertStory (const UIDRef &storyRef)=0 |
| virtual bool16 | IsFileAlreadyOpen (const IDFile &file, UIDRef *doc, UIDRef *foundStory=nil)=0 |
| virtual void | GetCopyDefaultName (const UIDRef &doc, IDFile *name, bool16 &useSystemDefaultDir)=0 |
| virtual bool16 | GetOpenFileType (const IDFile &sysFile, SysOSType &type)=0 |
| virtual bool16 | GetStreamFileType (IPMStream *stream, SysOSType &type)=0 |
| virtual void | SetInCopyUserFile (IDocument *doc, const IDFile &newFile)=0 |
| virtual void | LockNonInCopyStories (const UIDRef &doc)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
The InCopy Document Utilities are designed to provide third parties the hooks necessary to replace InCopy files with whatever storage mechanisms they want to use, most often some form of database. Third parties are expected to implement and replace the default which ships with the InCopyFileActions plug-in.
| pure virtual |
CanDoRevert determines whether to enable the Revert menu item.
| doc | - The document to save. |
| pure virtual |
CanDoSave determines whether to enable to Save menu item.
| doc | - The document to save. |
| pure virtual |
CanDoSaveAll determines whether to enable to the Save All menu item.
| doc | - The document to save. |
| pure virtual |
CanDoUpdateDesign determines whether to enable the Update Design menu item.
| doc | - The document to save. |
| pure virtual |
CheckOnClose puts up the "Do you want to save?" dialog if the document has been modified.
| doc | - The document. |
| uiFlags | - Whether to present UI to the user or not. |
| allowCancel | - Determines if the user is allowed to cancel the close operation. |
| pure virtual |
CheckOnRevertStory asks the user if they want to revert a story.
| storyRef | - The story to revert. |
CreateDefaultGraphicFrame makes a full page graphic frame for a standalone document.
| doc | - The document. |
CreateDefaultTextFrame makes a full page text frame for a standalone document.
| doc | - The document. |
| pure virtual |
DoClose closes a document, offering the user a chance to save.
| doc | - The document to close. |
| uiFlags | - Whether to show UI (default is full UI). |
| allowCancel | - Whether to allow the user the opportunity to cancel the close. |
| cmdMode | - Whether to process or schedule the close command. Processing it causes the close to occur immediately while scheduling it causes it to close after current commands are done processing. |
| pure virtual |
DoNew creates a new document with a single story frame in it.
| openWin | - Whether to open a window or not (default is true). |
| undoSupport | - Indicates whether commands that change the document (if this is an InDesign/InCopy document) will appear on the undo menu (default=IDocument::kFullUndoSupport). |
| pure virtual |
DoNewWindow creates a new window for an existing document.
| doc | - The document to open a new view from. |
| pure virtual |
DoOpen opens one or more story files in InCopy. If a story is already open, bring its window to the front and place a text insertion point in the story.
| filesToOpen | - A list of files to open. |
| flags | - Flags indicating the desired open options. |
| showWindow | - Whether or not to show a window (default is true). |
| undoSupport | - Indicates whether commands that change the document (if this is an InDesign/InCopy document) will appear on the undo menu (default=IDocument::kFullUndoSupport). |
| uiFlags | - Whether to show UI (default is full UI). |
| pure virtual |
DoRevert closes a document without saving and reopens its original (typically from a file).
| doc | - The document to revert. |
| uiFlags | - Whether to show UI (default is full UI). |
| pure virtual |
DoSave write the InCopy story to whatever storage is desired, normally a file. If story is not saved yet, it will invoke DoSaveAs behavior. Starting in CS5, it will carried out save as background task if story is already saved.
| textModel | - The story to write. |
| uiFlags | - Whether to provide UI or not. |
| pure virtual |
DoSaveAll saves all InCopy stories in a document.
| doc | - The document. |
| uiFlags | - Whether to provide UI or not. |
| pure virtual |
DoSaveAs saves an InCopy story to a new file.
| doc | - The document containing the story. |
| copy | - Whether to save a copy or not. Default is false. |
| destFile | - A pointer to an IDFile to store into (default is unspecifed). |
| uiFlags | - Whether or not to show UI (default is full UI). |
| asStationary | - Whether or not to save stationery (default is false). |
| fileTypeID | - What file type to use (default is kInvalidFileTypeInfoID). |
| pure virtual |
DoUpdateDesign closes and reopens a document, typically when a newer version becomes available.
| docRef | - The document to update. |
| uiFlags | - Whether to show UI (default is full UI). |
| pure virtual |
ExportAllLinkedStories iterates through all the InCopy stories in a document and exports them. Stories are stored in the file specified by their datalink and the datalink is marked as up to date. This must be called from within a command or other database transaction.
| doc | - The document |
| fileTypeID | - unused |
| uiFlags | - Whether to present UI while exporting. |
| pure virtual |
ExportLinkedStory exports a story which already has a datalink on it. This method does not update the datalink or modify the database.
| story | - The UIDRef of the ITextModel to export. |
| fileTypeID | - kInCopyXMLInterchangeFileTypeInfoID or kInCopyXMLMarkupFileTypeInfoID or kInCopyTemplateFileTypeInfoID |
| pure virtual |
ExportStoryAndCreateLink exports a story and creates a datalink for it. This must be called from within a command or other database transaction.
| story | - The UIDRef of the ITextModel to export. |
| file | - The IDFile to write the story into. |
| fileTypeID | - kInCopyXMLInterchangeFileTypeInfoID or kInCopyXMLMarkupFileTypeInfoID or kInCopyTemplateFileTypeInfoID |
| pure virtual |
GetCopyDefaultName generates a "save a copy" name and path using the first story in the document.
| doc | - The document. |
| name | - The returned document name and location. |
| useSystemDefaultDir | - If false on return, then the name is a full specification. If true, then only the name is specified and the caller will need to determine the directory. |
GetFirstUserStory finds the first user accessible story in a document.
| doc | - The document to search. |
| pure virtual |
GetLinkedStories finds all stories with an InCopy format datalink.
| doc | - The document to search. |
| stories | - A returned list of found stories. |
| links | - A returned list of links. |
| db | - The document's database, which can be safely omitted since it defaults properly. |
| pure virtual |
GetOpenFileType returns the Macintosh file type of an open file.
| sysFile | - The IDFile of the file in question. |
| type | - The Macintosh file type of the open file. |
| pure virtual |
GetStreamFileType checks the stream for "magic bytes" that indicate its type.
| stream | - The stream. |
| type | - The type of the stream. |
| pure virtual |
ImportAllLinkedStories updates all InCopy stories in a document from their datalinked files.
| doc | - The document. |
| fileTypeID | - The file type of the containing document. |
| options | - The import options to use for old incd file links. |
| pure virtual |
ImportLinkedStory reads in a single linked InCopy story.
| story | - The ITextModel UIDRef. |
| fileTypeID | - The type of the imported file. |
| options | - The import options to use (primarily for old incd files). |
| pure virtual |
ImportStoryAndCreateLink reads in a story and optionally creates a link.
| story | - The ITextModel UIDRef. |
| stream | - The stream to read the new story from. |
| options | - The import options to use (primarily for old incd files). |
| fileTypeID | - The type of the imported file. |
| createLink | - Whether to create a datalink or not. |
| importedItem | - A UIDRef to the page item that was created. |
| pure virtual |
IsFileAlreadyOpen determines if a story is already open, in either an InDesign document, an assignment or a standalone InCopy document.
| file | - The story file. |
| doc | - The UIDRef of the open document that contains the story. |
| foundStory | - The UIDRef of the open story. |
| pure virtual |
IsReadOnly determines if a document can be modified.
| iDoc | - The document. |
| pure virtual |
LockNonInCopyStories runs through all the stories in a document and locks the ones which are not InCopy stories (graphics or text). InCopy stories are locked or unlocked elsewhere based on their "checked out" state.
| doc | - The document. |
| pure virtual |
QueryDocFileHandler returns a refcounted InCopy IDocFileHandler.
| pure virtual |
SetInCopyUserFile informs the document that it is actually an InCopy file instead of an InDesign database (even though it really is an InDesign database). This affects recovery in InCopy primarily.
| doc | - The document. |
| newFile | - The InCopy file associated with this document. |
| pure virtual |
ShouldDoSaveAs determines if the document already has a place to save or if it needs a SaveAs operation.
| doc | - The document to save. |