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

Public Member Functions

 TxtExpFilter (IPMUnknown *boss)
 
virtual ~TxtExpFilter (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 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

TxtExpFilter implements export provider behavior for the TextExportFilter.

TxtExpFilter implements IExportProvider.

A general note about the IPMUnknown* targetBoss parameter in IExportProvider:
InDesign's Export Manager is the component responsible for obtaining the current selection context, finding the right export provider for it, and passing on the selection, "targetBoss". The way it obtains the "targetBoss" is by means of ISelectionUtils::QueryActiveSelection(), which returns ISelectionManager (aggregated on kAbstractSelectionBoss).
However, since the type of "targetBoss" declared in the prototypes for various methods in IExportProvider is IPMUnknown*, virtually any interface pointer could be passed into it, especially if you query for your own export provider.
It is up to the export provider to determine if the given "targetBoss" and/or the front document can be exported.

Constructor & Destructor Documentation

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

Constructor.

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

Desstructor.

Member Function Documentation

bool16 TxtExpFilter::CanExportForExternalize (void ) const
virtual

(NEW) The provider indicates whether it can do normal filebased exports.

Reimplemented from CExportProvider.

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

(NEW) For Clip/Drag operations, what format type, if any, would be used to produce the desired external flavor?

Reimplemented from CExportProvider.

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

(MODIFIED) The export provider indicates whether it can export the current specifier in the specified file format (ex. a text export file would return kFalse for a page item selection and kTrue for a text selection).

Implements IExportProvider.

bool16 TxtExpFilter::CanExportToFile (void ) const
virtual

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

Reimplemented from CExportProvider.

int32 TxtExpFilter::CountExternalFlavors (void ) const
virtual

(NEW) For Clip/Drag operations, what external flavors can this exporter produce? This method returns the number of supported external flavors.

Reimplemented from CExportProvider.

int32 TxtExpFilter::CountFormats (void )
virtual

Counts the available formats of the filter

Implements IExportProvider.

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

(NEW) Externalize the given data to a stream.

Reimplemented from CExportProvider.

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

(NEW) 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. Note: Some export providers may display UI and may export more than just the current selection (i.e. PDF export, EPS export, etc.)

Reimplemented from CExportProvider.

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

(NEW) Export the current selection to a stream. Note: Some export providers may display UI and may export more than just the current selection (i.e. PDF export, EPS export, etc.) Please note that the typographer's quotation marks will NOT be modified in this plug-in.

Implements IExportProvider.

PMString TxtExpFilter::GetExtensionForFormatName (const PMStringformatName)
virtual

Just gets the extension for the format.

Parameters
formatNameSpecifies the format name.

Implements IExportProvider.

ExternalPMFlavor TxtExpFilter::GetExternalFlavor (int32 n) const
virtual

(NEW) For Clip/Drag operations, what external flavors can this exporter produce? This method returns the Nth supported external flavor.

Reimplemented from CExportProvider.

PMFlavor TxtExpFilter::GetInternalFlavor (void ) const
virtual

(NEW) For Clip/Drag operations, what internal flavor does this exporter operate on?

Reimplemented from CExportProvider.

PMString TxtExpFilter::GetNthFormatName (int32 n)
virtual

This member gets the name of the format at the passed in index value.

Implements IExportProvider.

ScriptID TxtExpFilter::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.