InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
XDocBkExportProvider Class Reference
Inheritance diagram for XDocBkExportProvider:
CExportProviderCPMUnknown< IExportProvider >IExportProviderIPMUnknown

Public Member Functions

 XDocBkExportProvider (IPMUnknown *boss)
 
virtual ~XDocBkExportProvider (void)
 
virtual void ExportToFile (const IDFile &sysFile, IDocument *doc, IPMUnknown *targetboss, const PMString &formatName, UIFlags uiFlags=kFullUI)
 
virtual void ExportToStream (IPMStream *stream, IDocument *doc, IPMUnknown *targetboss, const PMString &formatName, UIFlags uiFlags=kFullUI)
 
virtual bool16 CanExportToFile (void) const
 
virtual bool16 CanExportThisFormat (IDocument *doc, IPMUnknown *targetboss, const PMString &formatName)
 
virtual bool16 CanExportForExternalize (void) const
 
virtual PMFlavor GetInternalFlavor (void) const
 
virtual int32 CountExternalFlavors (void) const
 
virtual ExternalPMFlavor GetExternalFlavor (int32 n) const
 
virtual bool16 CanExportThisFlavor (const ExternalPMFlavor &flavor, PMString &outFormatName) const
 
virtual ErrorCode ExportForExternalize (IDataExchangeHandler *handler, const ExternalPMFlavor toWhichFlavor, IPMStream *stream)
 
virtual PMString GetNthFormatName (int32 n)
 
virtual int32 CountFormats (void)
 
virtual PMString GetExtensionForFormatName (const PMString &formatName)
 
virtual ScriptID GetScriptIDForFormatName (const PMString &formatName, const ScriptInfo::RequestContext &context)
 
- Public Member Functions inherited from CExportProvider
 CExportProvider (IPMUnknown *boss)
 
virtual TaskInfo AsynchronousExportToFile (const IDFile &sysFile, IDocument *doc, IPMUnknown *targetboss, const PMString &formatName, UIFlags uiFlags=kFullUI)
 
virtual bool16 CanExportToFileAsynchronously () const
 
- Public Member Functions inherited from CPMUnknown< IExportProvider >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 
Export
Clipboard/DragDrop Export
Internal File Based Formats

Additional Inherited Members

- Public Types inherited from IExportProvider
enum  { kDefaultIID = IID_IEXPORTPROVIDER }
 
- Protected Member Functions inherited from CExportProvider
virtual ErrorCode SendSignal (const ServiceID &service, IDocument *document, const IDFile &sysFile, const PMString &formatName, UIFlags uiFlags, bool8 bIsStandAlone=kTrue)
 
virtual bool16 IsTargetFileInUseByBGTasks (const IDFile &sysFile) const
 
virtual UserTaskJobSpec CreateExportJobSpec (const IDFile &sysFile, IDocument *document, const PMString &formatName) const
 
virtual void GetUniqueSysFile (IDocument *document, const IDFile *sysFileName, IDFile *uniqueSysFileName, uint32 pageNum, IOutputPages *outputPages, bool16 exportSpreads, PMString &suffix, PMString &exportFileExtension)
 
- Protected Attributes inherited from CExportProvider
ExportSessionToken fSessionToken
 
std::map< std::string, int32 > fFileNameMap
 

Detailed Description

Implements IExportProvider, encapsulates and extends normal XML export provider. This involves converting document objects that interfere with normal XML export such as native tables to DocBook XML, and then reversing this conversion after export.

Constructor & Destructor Documentation

Binds the C implementation class onto its ImplementationID making the C code callable by the application * XDocBkExportProvider::XDocBkExportProvider (IPMUnknownboss)

Constructor.

Parameters
bossinterface ptr from boss object on which this interface is aggregated.
XDocBkExportProvider::~XDocBkExportProvider (void )
virtual

Destructor.

Member Function Documentation

bool16 XDocBkExportProvider::CanExportForExternalize (void ) const
virtual

The provider indicates whether it export for externalize - i.e. data transfer (not supported by this implementation).

Returns
kTrue if this can export for externalize, kFalse

Reimplemented from CExportProvider.

bool16 XDocBkExportProvider::CanExportThisFlavor (const ExternalPMFlavor & flavor,
PMStringoutFormatName 
) const
virtual

For Clip/Drag operations, the format type, if any, that would be used to produce the desired external flavor (not supported by this implementation).

Parameters
flavorIN
outFormatNameIN
Returns
kTrue if the given external flavour can be exported, kFalse otherwise

Reimplemented from CExportProvider.

bool16 XDocBkExportProvider::CanExportThisFormat (IDocumentdoc,
IPMUnknowntargetboss,
const PMStringformatName 
)
virtual

The export provider indicates whether it can export the current selection target in the specified file format.

Parameters
docIN document containing content to export
targetbossIN means to acquire selection target (if not nil)
formatNameIN identifies format for export
Returns
kTrue if format can be exported, kFalse otherwise

Implements IExportProvider.

bool16 XDocBkExportProvider::CanExportToFile (void ) const
virtual

The provider indicates whether it can do normal file based exports.

Returns
kTrue if normal file-based export can be achieved, kFalse otherwise

Reimplemented from CExportProvider.

int32 XDocBkExportProvider::CountExternalFlavors (void ) const
virtual

For Clip/Drag operations, the count of external flavors that this exporter could produce (not supported by this implementation).

Returns
count of external flavours supported by this export provider

Reimplemented from CExportProvider.

int32 XDocBkExportProvider::CountFormats (void )
virtual

Returns the number of file formats supported by this export provider.

Returns
count of formats supported

Implements IExportProvider.

ErrorCode XDocBkExportProvider::ExportForExternalize (IDataExchangeHandlerhandler,
const ExternalPMFlavor toWhichFlavor,
IPMStreamstream 
)
virtual

Externalize the given data to a stream (not supported by this implementation).

Parameters
handlerIN
toWhichFlavorIN
streamOUT data is written to this stream
Returns
kSuccess if could externalize, kFailure otherwise
Postcondition
content has been externalized to stream on success

Reimplemented from CExportProvider.

void XDocBkExportProvider::ExportToFile (const IDFilesysFile,
IDocumentdoc,
IPMUnknowntargetboss,
const PMStringformatName,
UIFlags uiFlags = kFullUI 
)
virtual

Export the current selection to a file using the given filename. Generate the specified file format. The calling code verifies that the file does not exist.

Parameters
sysFileIN specifies the location of file to export to
docIN document containing content to export
targetbossIN means to acquire selection target (if not nil)
formatNameIN
uiFlagsIN
Precondition
doc should not be nil, formatName should be a format this provider understands
Postcondition
sysFile should contain exported content from doc subject to selection target content specified by targetBoss (nil if no selection)

Reimplemented from CExportProvider.

void XDocBkExportProvider::ExportToStream (IPMStreamstream,
IDocumentdoc,
IPMUnknowntargetboss,
const PMStringformatName,
UIFlags uiFlags = kFullUI 
)
virtual

Export the current selection to a stream.

Parameters
streamIN stream to write to
docIN document containing content to export
targetbossIN means to acquire selection target (if not nil)
formatNameIN identifies the format
uiFlagsIN what UI should be used
Precondition
doc should not be nil, formatName should be a format this provider understands
Postcondition
stream should contain exported content

Implements IExportProvider.

PMString XDocBkExportProvider::GetExtensionForFormatName (const PMStringformatName)
virtual

Returns the extension of the nth file format supported by this export provider.

Parameters
formatNameIN name of format we're seeking extension for
Returns
extension associated with given format

Implements IExportProvider.

ExternalPMFlavor XDocBkExportProvider::GetExternalFlavor (int32 n) const
virtual

For Clip/Drag operations, acquire external flavor by index (not supported by this implementation).

Parameters
nIN index of external flavour of interest
Precondition
0 <= n < CountExternalFlavors()
Returns
external flavour at given index

Reimplemented from CExportProvider.

PMFlavor XDocBkExportProvider::GetInternalFlavor (void ) const
virtual

For Clip/Drag operations, the internal flavor that this exporter operates on (not supported by this implementation).

Returns
internal flavour supported by this export provider

Reimplemented from CExportProvider.

PMString XDocBkExportProvider::GetNthFormatName (int32 n)
virtual

Returns the name (localized string) of the nth file format supported by this export provider.

Parameters
nIN specifies format index of interest
Precondition
n should lie in 0= < n < CountFormats()
Returns
name, translated, of nth file format supported

Implements IExportProvider.

ScriptID XDocBkExportProvider::GetScriptIDForFormatName (const PMStringformatName,
const ScriptInfo::RequestContextcontext 
)
virtual

Returns the ScriptID for the given format's enumerator in the kExportFormatEnumScriptElement

Parameters
formatNameIN Format name whose ScriptID to return
contextis the scripting request context
Returns
the ScriptID (or kInvalidScriptID if this format is not supported by enum)

GetScriptIDForFormatName

Implements IExportProvider.