OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki
OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki
OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
The Structure of Text Documents 94<br />
A complete list of the paragraph properties can be found in the <strong>OpenOffice</strong>.<strong>org</strong> API<br />
reference. The most common paragraph properties are:<br />
ParaAdjust (enum)<br />
vertical text orientation (constants in accordance with<br />
com.sun.star.style.ParagraphAdjust<br />
).<br />
ParaLineSpacing (struct)<br />
line spacing (structure in accordance with<br />
com.sun.star.style.LineSpacing<br />
).<br />
ParaBackColor (Long)<br />
background color.<br />
ParaLeftMargin (Long)<br />
left margin in 100ths of a millimeter.<br />
ParaRightMargin (Long)<br />
right margin in 100ths of a millimeter.<br />
ParaTopMargin (Long)<br />
top margin in 100ths of a millimeter.<br />
ParaBottomMargin (Long)<br />
bottom margin in 100ths of a millimeter.<br />
ParaTabStops (Array of struct)<br />
type and position of tabs (array with structures of the type<br />
com.sun.star.style.TabStop<br />
).<br />
ParaStyleName (String)<br />
name of the paragraph template.<br />
Example: simple HTML export<br />
The following example demonstrates how to work with formatting information. It iterates<br />
through a text document and creates a simple HTML file. Each paragraph is recorded in its<br />
own HTML element for this purpose. Paragraph portions displayed in bold type are<br />
marked using a HTML element when exporting.<br />
Dim FileNo As Integer, Filename As String, CurLine As String<br />
Dim Doc As Object<br />
Dim Enum1 As Object, Enum2 As Object<br />
Dim TextElement As Object, TextPortion As Object<br />
Filename = "c:\text.html"