rTextParagraph | ||
![]() rtPopup rtSection rTextParagraph ![]() BeginInsert Content Current Font hasParagraphBreak HTML isHidden ID Parent ParentContainer ParentObject root Style
| version 1.5
All rich text content is split in paragraphs. Each rTextParagraph class object represents one paragraph. The paragraph may contain all other elements like pictures ( rtGraphic), doclinks ( rtNoteLink and rtHotLink), text ( rTextRun), etc. The paragraph may not contain other paragraphs except indirectly as a content of tables, sections or hotspots. A table ( rtTable) occupies it's own paragraph. No other text should be present in this paragraph. In order to navigate text paragraph by paragraph use rtContainer.getFirstElement and rtContainer.getNextElement methods: set rtParaObject = rtContainerObject.getFirst (RT_OBJ_TEXTPARAGRAPH) ... Do while Not rtParaObject is Nothing ... process it set rtParaObject = rtContainerObject.getNext (RT_OBJ_TEXTPARAGRAPH, Nothing) Loop Paragraph contains any other objects (not paragraphs). In order to examine paragraph content use the same methods applied to paragraph content: set linkObj = rtParaObject.Content.getFirst (RT_OBJ_NOTELINK) or equivalent form set linkObj = rtParaObject.getFirst (RT_OBJ_NOTELINK) see rtNoteLink and rtHotLink classes for more info about links.
Some objects like sections and tables have their own content. The paragraphs of this content may be reached applying getFirst and getNext methods to the content of these objects. Thus the sample: set rtParaObject = rtContObject.getFirst (RT_OBJ_TEXTPARAGRAPH) ... if the paragraph contains a table or a section or hotspot, the paragraphs in table/section/hotspot may not be returned by the getNext method applied to top container ' this returns next paragraph on top level set rtParaObject = rtContObject.getNextElement (RT_OBJ_TEXTPARAGRAPH, Nothing) ' this returns the 1st paragraph of the content of rtParaObject set rtParaIncludedObject = rtParaObject.getFirstElement(RT_OBJ_TEXTPARAGRAPH)
|