OpenOffice.org BASIC Guide - OpenOffice.org wiki
OpenOffice.org BASIC Guide - OpenOffice.org wiki
OpenOffice.org BASIC Guide - 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 Spreadsheets<br />
Height (long)<br />
height of page in hundredths of a millimeter<br />
PrinterPaperTray (String)<br />
name of the printer paper tray that you want to use<br />
The following example sets the page size of the "Default" page style to the DIN A5 landscape format (height 14.8<br />
cm, width 21 cm):<br />
Dim Doc As Object<br />
Dim Sheet As Object<br />
Dim StyleFamilies As Object<br />
Dim PageStyles As Object<br />
Dim DefPage As Object<br />
Doc = ThisComponent<br />
StyleFamilies = Doc.StyleFamilies<br />
PageStyles = StyleFamilies.getByName("PageStyles")<br />
DefPage = PageStyles.getByName("Default")<br />
DefPage.IsLandscape = True<br />
DefPage.Width = 21000<br />
DefPage.Height = 14800<br />
Page Margin, Border, and Shadow<br />
The com.sun.star.style.PageProperties service provides the following properties for adjusting page margins as well<br />
as borders and shadows:<br />
LeftMargin (long)<br />
width of the left hand page margin in hundredths of a millimeter<br />
RightMargin (long)<br />
width of the right hand page margin in hundredths of a millimeter<br />
TopMargin (long)<br />
width of the top page margin in hundredths of a millimeter<br />
BottomMargin (long)<br />
width of the bottom page margin in hundredths of a millimeter<br />
LeftBorder (struct)<br />
specifications for left-hand line of page border (com.sun.star.table.BorderLine structure)<br />
RightBorder (struct)<br />
specifications for right-hand line of page border (com.sun.star.table.BorderLine structure)<br />
TopBorder (struct)<br />
specifications for top line of page border (com.sun.star.table.BorderLine structure)<br />
BottomBorder (struct)<br />
specifications for bottom line of page border (com.sun.star.table.BorderLine structure)<br />
LeftBorderDistance (long)<br />
distance between left-hand page border and page content in hundredths of a millimeter<br />
RightBorderDistance (long)<br />
distance between right-hand page border and page content in hundredths of a millimeter<br />
TopBorderDistance (long)<br />
distance between top page border and page content in hundredths of a millimeter<br />
BottomBorderDistance (long)<br />
distance between bottom page border and page content in hundredths of a millimeter<br />
102 <strong>OpenOffice</strong>.<strong>org</strong> 3.2 <strong>BASIC</strong> <strong>Guide</strong> · March 2010