- How to inspect various properties of a story's text model (ITextModel),
- how to inspect the character data,
- how to inspect the characters in each paragraph and line,
- how to use TextRange and TextAttributeRunIterator to discover the point sizes present in a range of text,
- how to use IItemStrand to count the number of different types of owned items in the selected story,
- how to inspect the style runs on the paragraph attribute strand's IAttributeStrand interface,
- how to inspect story threads, story thread dictionary and parcel information for a story.
Integrated the following 2.x code snippets in here:
- InspectTextModelCharacters
- SnipCountStoryParagraphs
- SnipInspectStoryPointSizes
- SnipCountStoryOwnedItems
- SnipCountStoryParaAttrRuns
- SnipInspectStoryThreads
- See Also
- kTextStoryBoss
- ITextModel
- IStrand
- IItemStrand
- kCharAttrStrandBoss
- kParaAttrStrandBoss
- kTextAttrPointSizeBoss
- kOwnedItemStrandBoss
- TextIterator
Constructor.
- Parameters
| range | the range of text data to be reported on. |
| SnpInspectTextModel::~SnpInspectTextModel | ( | | ) | |
| virtual |
| ErrorCode SnpInspectTextModel::CountStoryOwnedItems | ( | | ) | |
Report the number of different types of owned items.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::CountStoryParaAttrRuns | ( | | ) | |
Reports the style runs on the paragraph attribute strand (IAttributeStrand). Paragraphs with the same attributes are grouped into runs on IAttributeStrand.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::InspectParcels | ( | | ) | |
Reports the parcels associated with each story thread.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::InspectStoryPointSizes | ( | | ) | |
| ErrorCode SnpInspectTextModel::InspectStoryThreadDicts | ( | | ) | |
Reports the story thread dictionaries.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::InspectStoryThreads | ( | | ) | |
Reports the story threads.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::InspectTrackChange | ( | | ) | |
Report all the track changes records type on the story using one RedlineIterator initialized from the primary thread start. This method is different from ReportChangeInfo() in that this only uses one RedlineIterator constructed from the text index 0 and use this RedlineIterator to return all the change records in the story.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::ReportChangeInfo | ( | | ) | |
Iterate through all the text index in a story and report the track changes type using RedlineIterator. This method is different from InspectTrackChange in that it will iterates through all text index, create/delete a RedlineIterator based on each text index, use it to examin the current change record, if there are more than one change records under one index, it will report the insert record only.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::ReportCharacters | ( | | ) | |
Report characters using TextIterator.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::ReportLines | ( | | ) | |
Report the wax lines using a wax iterator (IWaxIterator).
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::ReportParagraphs | ( | | ) | |
Reports the number of paragraphs by using the paragraph strand's IStrand interface are used to discover paragraph boundaries.
There are many different ways to count the number of paragraphs e.g use IComposeScanner::FindSurroundingParagraph or scan the text and count the number of kTextChar_CR characters. The IStrand approach is probably the fastest.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::ReportStories | ( | | ) | |
Report the stories in the document.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::ReportStrands | ( | | ) | |
Report the runs on all strands.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::ReportTextFoci | ( | | ) | |
Report the text foci(ITextFocus) associated with the story.
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpInspectTextModel::ReportTextFocus | ( | ITextFocus * | textFocus | ) | |
Report the content of a text focus.
- Parameters
- Returns
- kSuccess on success, other ErrorCode otherwise.
| void SnpInspectTextModel::ReportTextRange | ( | | ) | |
Report the range this class is reporting on.
| ErrorCode SnpInspectTextModel::ReportWaxLineLeading | ( | | ) | |
Report the leading for each wax line in a story using a wax iterator (IWaxIterator).
- Returns
- kSuccess on success, other ErrorCode otherwise.