InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
XMLMrkSuiteTextCSB Class Reference
Inheritance diagram for XMLMrkSuiteTextCSB:
CPMUnknown< IXMLMrkSuite >IXMLMrkSuiteIPMUnknown

Public Member Functions

 XMLMrkSuiteTextCSB (IPMUnknown *boss)
 
virtual ~XMLMrkSuiteTextCSB (void)
 
virtual bool16 CanMakeTable () const
 
virtual ErrorCode MakeTable (bool16 hasHeaderRow)
 
virtual bool16 CanMakeKeywordSet () const
 
virtual ErrorCode MakeKeywordSet ()
 
virtual bool16 CanMakeItemizedList () const
 
virtual ErrorCode MakeItemizedList ()
 
virtual bool16 CanMakeSectionComposite () const
 
virtual ErrorCode MakeSectionComposite ()
 
virtual bool16 CanMakeMediaObject () const
 
virtual ErrorCode MakeMediaObject ()
 
- Public Member Functions inherited from CPMUnknown< IXMLMrkSuite >
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
 

Protected Member Functions

int32 getMaxNumberCols (const K2Vector< ColumnEnds > &rows)
 
RangeData getRowRange (const ColumnEnds &colEnds)
 
UIDRef getTag (const WideString &pstr) const
 
bool16 isTagPresent (const WideString &pstr) const
 
void parseText (const UIDRef &textUIDRef, K2Vector< ColumnEnds > &rows, const TextIndex &startOfTableText, const TextIndex &endOfTableText)
 
ErrorCode tagTextRange (const UIDRef &textModelRef, const TextIndex &startIndex, const TextIndex &endIndex, const WideString &pstrTag, bool16 addAttribute, const WideString &attrName, const WideString &attrValue)
 
bool16 isNonEmptyRange () const
 
bool16 isEmptyRow (const ColumnEnds &colEnds)
 
- Protected Member Functions inherited from CPMUnknown< IXMLMrkSuite >
 CPMUnknown (IPMUnknown *boss)
 

Additional Inherited Members

- Public Types inherited from IXMLMrkSuite
enum  { kDefaultIID = IID_IXMLMrkSUITE }
 
- Protected Attributes inherited from CPMUnknown< IXMLMrkSuite >
HelperInterface fHelperInterface
 

Detailed Description

Class XMLMrkSuiteTextCSB. This is the implementation of IXMLMrkSuite on the text selection boss class.

Constructor & Destructor Documentation

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

Constructor.

Parameters
bossboss object on which this interface is aggregated.
XMLMrkSuiteTextCSB::~XMLMrkSuiteTextCSB (void )
virtual

Destructor.

Member Function Documentation

bool16 XMLMrkSuiteTextCSB::CanMakeItemizedList () const
virtual

See IXMLMrkSuite::CanMakeItemizedList

Parameters
none
Returns
bool16

Implements IXMLMrkSuite.

bool16 XMLMrkSuiteTextCSB::CanMakeKeywordSet () const
virtual

See IXMLMrkSuite::CanMakeKeywordSet

Parameters
none
Returns
bool16

Implements IXMLMrkSuite.

bool16 XMLMrkSuiteTextCSB::CanMakeMediaObject () const
virtual

See IXMLMrkSuite::CanMakeMediaObject

Parameters
none
Returns
bool16

Implements IXMLMrkSuite.

bool16 XMLMrkSuiteTextCSB::CanMakeSectionComposite () const
virtual

See IXMLMrkSuite::CanMakeSectionComposite

Parameters
none
Returns
bool16

Implements IXMLMrkSuite.

bool16 XMLMrkSuiteTextCSB::CanMakeTable () const
virtual

See IXMLMrkSuite::CanMakeTable

Parameters
none
Returns
bool16

Implements IXMLMrkSuite.

int32 XMLMrkSuiteTextCSB::getMaxNumberCols (const K2Vector< ColumnEnds > & rows)
protected

Determine many columns are present given the ColumnEnds.

Parameters
rowsrepresents the rows (in terms of the sets of TextPair's for each column)
Returns
int32 giving the maximum number of columns across the rows
RangeData XMLMrkSuiteTextCSB::getRowRange (const ColumnEndscolEnds)
protected

Determine the text span associated with a given row, represented by its ColumnEnds. Determine the text-span for a given row in the table being created.

Parameters
colEndsrepresents the row in terms of the text spans of each column
Returns
RangeData
UIDRef XMLMrkSuiteTextCSB::getTag (const WideStringpstr) const
protected

Get a persistent ref to the tag given its name, from which we can get an IXMLTagData

Parameters
pstr
Returns
UIDRef persistent reference to the tag
bool16 XMLMrkSuiteTextCSB::isEmptyRow (const ColumnEndscolEnds)
protected

Determine if the given row contains any text we could select and markup.

Parameters
colEnds[IN]
Returns
bool16 kTrue if empty, kFalse otherwise
bool16 XMLMrkSuiteTextCSB::isNonEmptyRange () const
protected

Does the selection cover any text?

Returns
kTrue if the selection covers some text, kFalse otherwise
bool16 XMLMrkSuiteTextCSB::isTagPresent (const WideStringpstr) const
protected

Determine if a particular tag is present within the active document.

Parameters
pstr
Returns
kTrue if the tag is present in active document, kFalse otherwise
ErrorCode XMLMrkSuiteTextCSB::MakeItemizedList ()
virtual

See IXMLMrkSuite::MakeItemizedList

Parameters
none
Returns
ErrorCode

Implements IXMLMrkSuite.

ErrorCode XMLMrkSuiteTextCSB::MakeKeywordSet ()
virtual

See IXMLMrkSuite::MakeKeywordSet

Parameters
none
Returns
ErrorCode

Implements IXMLMrkSuite.

ErrorCode XMLMrkSuiteTextCSB::MakeMediaObject ()
virtual

See IXMLMrkSuite::MakeMediaObject

Parameters
none
Returns
ErrorCode

Implements IXMLMrkSuite.

ErrorCode XMLMrkSuiteTextCSB::MakeSectionComposite ()
virtual

See IXMLMrkSuite::MakeSectionComposite

Parameters
none
Returns
ErrorCode

Implements IXMLMrkSuite.

ErrorCode XMLMrkSuiteTextCSB::MakeTable (bool16 hasHeaderRow)
virtual

IXMLMrkSuite::MakeTable

Parameters
hasHeaderRow
Returns
ErrorCode

Implements IXMLMrkSuite.

void XMLMrkSuiteTextCSB::parseText (const UIDReftextUIDRef,
K2Vector< ColumnEnds > & rows,
const TextIndex & startOfTableText,
const TextIndex & endOfTableText 
)
protected

Parse the text selection and find the text spans for each column in each row. Delimiters are 'tab' for columns, and CR for rows. For creating an XML-based table, we care about both columns and rows. For the other types of entities (e.g. keywordset), the columns are ignored, and we use only the row information.

Parameters
textUIDReftext model of interest
rows[OUT] holds the result of parsing the text
startOfTableTextstarting index to begin the parse
endOfTableTextend index for the parse
ErrorCode XMLMrkSuiteTextCSB::tagTextRange (const UIDReftextModelRef,
const TextIndex & startIndex,
const TextIndex & endIndex,
const WideStringpstrTag,
bool16 addAttribute,
const WideStringattrName,
const WideStringattrValue 
)
protected

Create element marking-up specified range, with option to add (single) attribute to the element created. Delegates to IXMLElementCommands::CreateElement to do the complex part.

Parameters
textModelReftext model of interest
startIndexspecifies where to start tagging from
endIndexspecifies where to end tagging
pstrTagname for the tag
addAttributewhether to add an attribute
attrNamename of the attribute, if addAttribute is kFalse, this is ignored
attrValueattribute value, if addAttribute is kFalse, this is ignored
Returns
kSucess if the operation succeeded, kFailure otherwise