Inserting a Paragraph where no Cursor can go

From Apache OpenOffice Wiki
Jump to: navigation, search



The service com.sun.star.text.Text has an optional interface com.sun.star.text.XRelativeTextContentInsert which is available in Text services in Writer. The intention of this interface is to insert paragraphs in positions where no cursor or text portion can be located to use the insertTextContent() method. These situation occurs when text sections or text tables are at the start or end of the document, or if they follow each other directly.

 void insertTextContentBefore( [in] com::sun::star::text::XTextContent xNewContent,
                               [in] com::sun::star::text::XTextContent xSuccessor) 
 void insertTextContentAfter( [in] com::sun::star::text::XTextContent xNewContent, 
                              [in] com::sun::star::text::XTextContent xPredecessor) 

The only supported text contents are com.sun.star.text.Paragraph as new content, and com.sun.star.text.TextSection and com.sun.star.text.TextTable as successor or predecessor.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages