21.08.2013 Views

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

More Than Just Text 114<br />

service, which is also supported by each TextFrame service. The central properties are:<br />

BackColor (Long)<br />

background color of the text frame.<br />

BottomMargin (Long)<br />

bottom margin in 100ths of a millimeter.<br />

LeftMargin (Long)<br />

left margin in 100ths of a millimeter.<br />

RightMargin (Long)<br />

right margin in 100ths of a millimeter.<br />

TopMargin (Long)<br />

top margin in 100ths of a millimeter.<br />

Height (Long)<br />

height of text frame in 100ths of a millimeter.<br />

Width (Long)<br />

width of text frame in 100ths of a millimeter.<br />

HoriOrient (const)<br />

horizontal orientation of text frame (in accordance with<br />

com.sun.star.text.HoriOrientation<br />

).<br />

VertOrient (const)<br />

vertical orientation of text frame (in accordance with<br />

com.sun.star.text.VertOrientation<br />

).<br />

The following example creates a text frame using the properties described previously:<br />

Dim Doc As Object<br />

Dim TextTables As Object<br />

Dim Cursor As Object<br />

Dim Frame As Object<br />

Doc = StarDesktop.CurrentComponent<br />

Cursor = Doc.Text.createTextCursor()<br />

Cursor.gotoNextWord(False)<br />

Frame = Doc.createInstance("com.sun.star.text.TextFrame")<br />

Frame.Width = 3000<br />

Frame.Height = 1000<br />

Frame.AnchorType = com.sun.star.text.TextContentAnchorType.AS_CHARACTER<br />

Frame.TopMargin = 0<br />

Frame.BottomMargin = 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!