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

#include <CHMLFiltHelper.h>

Public Member Functions

 CHMLFiltHelper ()
 
virtual ~CHMLFiltHelper ()
 
ErrorCode ExportLayout (IPMStream *stream, IDocument *doc, IPMUnknown *targetBoss=nil)
 
void ExportLayout (const IDFile &sysFile, IDocument *doc, IPMUnknown *targetBoss=nil)
 
int32 GlobalFromLocalPageIndex (ISpreadList *spreadList, int32 inSpreadIndex, int32 relativePageIndex)
 
UIDRef GetDefaultSpreadLayerRef (const UIDRef &docUIDRef, int32 spreadIndex)
 

Detailed Description

Helper class that is used in exporting a layout.

Constructor & Destructor Documentation

CHMLFiltHelper::CHMLFiltHelper ()

Default constructor

CHMLFiltHelper::~CHMLFiltHelper ()
virtual

Destructor

Member Function Documentation

ErrorCode CHMLFiltHelper::ExportLayout (IPMStreamstream,
IDocumentdoc,
IPMUnknowntargetBoss = nil 
)

Export the layout contained in the document to a stream

Parameters
streamIN where to write the export into
docIN where to get the content from
targetBossIN provides encapsulation of the selection and a way to get at the selection target
void CHMLFiltHelper::ExportLayout (const IDFilesysFile,
IDocumentdoc,
IPMUnknowntargetBoss = nil 
)

Export the layout contained in the document to a file.

Parameters
sysFileIN where to write the export into
docIN where to get the content from
targetBossIN provides encapsulation of the selection and a way to get at the selection target
UIDRef CHMLFiltHelper::GetDefaultSpreadLayerRef (const UIDRefdocUIDRef,
int32 spreadIndex 
)

Method to determine the default spread layer into which to put content. Document layer 0 is the pages layer, and document layer n-1 is used for some nefarious purpose too. Document layer 1 is the first layer that can contain content + guides. If we have no preference for assigning content, then we can put it on the first content spread layer in Document layer 1. This method hides making that choice and avoids the client code having to care about document layers, which complicate the process if we have to consider them.

Parameters
docUIDRefIN document of interest
spreadIndexIN which spread we're interested in
Returns
the UIDRef of the spread layer that is the default for content, from which an ISpreadLayer can be instantiated.
int32 CHMLFiltHelper::GlobalFromLocalPageIndex (ISpreadListspreadList,
int32 inSpreadIndex,
int32 relativePageIndex 
)

Given an index in the list of pages in a spread, turn into a global page number in the entire publication.

Parameters
spreadListIN spread list from the document
inSpreadIndexIN which spread the page is in
relativePageIndexIN what the page position is in this spread