OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki
OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki
OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
The Structure of Text Documents 97<br />
TextPortion = Enum2.nextElement<br />
If TextPortion.CharWeight = _<br />
com.sun.star.awt.FontWeight.BOLD AND _<br />
TextPortion.getPropertyState("CharWeight") = _<br />
com.sun.star.beans.PropertyState.DIRECT_VALUE Then<br />
TextPortion.setPropertyToDefault("CharWeight")<br />
TextPortion.CharStyleName = "MyBold"<br />
End If<br />
Wend<br />
End If<br />
Wend<br />
Source: http:/ / <strong>wiki</strong>. services. openoffice. <strong>org</strong>/ w/ index. php? title=Documentation/ <strong>BASIC</strong>_<br />
<strong>Guide</strong>/ Structure_ of_ Text_ Documents&oldid=105683<br />
Principal Authors: Fpe, Ccornell, TJFrazier<br />
Editing Text Documents<br />
The previous section has already discussed a whole range of options for editing text<br />
documents, focusing on the<br />
and<br />
com.sun.star.text.TextPortion<br />
com.sun.star.text.Paragraph<br />
services, which grant access to paragraph portions as well as paragraphs. These services<br />
are appropriate for applications in which the content of a text is to be edited in one pass<br />
through a loop. However, this is not sufficient for many problems. <strong>OpenOffice</strong>.<strong>org</strong> provides<br />
the<br />
com.sun.star.text.TextCursor<br />
service for more complicated tasks, including navigating backward within a document or<br />
navigating based on sentences and words rather than TextPortions.<br />
The TextCursor<br />
A TextCursor in the <strong>OpenOffice</strong>.<strong>org</strong> API is comparable with the visible cursor used in a<br />
<strong>OpenOffice</strong>.<strong>org</strong> document. It marks a certain point within a text document and can be<br />
navigated in various directions through the use of commands. The TextCursor objects<br />
available in <strong>OpenOffice</strong>.<strong>org</strong> Basic should not, however, be confused with the visible cursor.<br />
These are two very different things.