You are on page 1of 1

CHAPTER 2: Text Story text 58

Sample code

SnpManipulateTextFootnote::InsertFootnote

Deleting a footnote from a story


Solution

Delete the footnote’s anchor character.

Sample code

SnpManipulateTextFootnote::DeleteAllStoryFootnotes

Determining whether a text range is within a footnote


Given a range or selection within a text story, there are some operations that are invalid if that range is
within a footnote. You can determine whether the range or selection is within the text of a footnote.

Solution

Use ISelectionUtils::QueryActiveTextSelectionSuite on the kUtilsBoss to get the active text selection


(ITextSelectionSuite).

ITextSelectionSuite::IsTextSelectionInFootnote indicates whether the selection is in a footnote.

To determine whether an arbitrary text range is within the text story thread of a footnote, use the
ITextUtils::IsFootnote from the kUtilsBoss class. The API can be used to determine whether the range is
within a footnote and to get the footnote reference (kFootnoteReferenceBoss) object through the
parameter list.

Determining whether a page item can have text along its path
You can determine whether it is legal for a defined page item to have text along its path.

Solution

A page item can have text flowed along its path if it has one path with at least one segment with at least
two points (that is, it cannot be a compound path or a single point). The page item cannot be an inline
item.

Sample code

SnpManipulateTextOnPath::CanAddTextOnPath

You might also like