21.08.2013 Views

OpenOffice.org BASIC Guide - OpenOffice.org wiki

OpenOffice.org BASIC Guide - OpenOffice.org wiki

OpenOffice.org BASIC Guide - 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.

NumberFormatId = NumberFormats.addNew(NumberFormatString, LocalSettings)<br />

End If<br />

MsgBox NumberFormatId<br />

Cell.NumberFormat = NumberFormatId<br />

The Structure of Spreadsheets<br />

The Format Cells dialog in <strong>OpenOffice</strong>.<strong>org</strong> Calc provides an overview of the different formatting options for<br />

cells.<br />

Page Properties<br />

Page properties are the formatting options that position document content on a page as well as visual elements<br />

that are repeated page after page. These include<br />

Paper formats<br />

Page margins<br />

Headers and footers.<br />

The procedure for defining page formats differs from other forms of formatting. Whereas cell, paragraph, and<br />

character elements can be formatted directly, page formats can also be defined and indirectly applied using page<br />

styles. For example, headers or footers are added to the page style.<br />

The following sections describe the main formatting options for spreadsheet pages. Many of the styles that are<br />

described are also available for text documents. The page properties that are valid for both types of documents<br />

are defined in the com.sun.star.style.PageProperties service. The page properties that only apply to spreadsheet<br />

documents are defined in the com.sun.star.sheet.TablePageStyle service.<br />

Note – VBA : The page properties (page margins, borders, and so on) for a Microsoft Office document are<br />

defined by means of a PageSetup object at the Worksheet object (Excel) or Document object (Word) level. In<br />

<strong>OpenOffice</strong>.<strong>org</strong>, these properties are defined using a page style which in turn is linked to the associated<br />

document.<br />

Page Background<br />

The com.sun.star.style.PageProperties service defines the following properties of a pages background:<br />

BackColor (long)<br />

color of background<br />

BackGraphicURL (String)<br />

URL of the background graphics that you want to use<br />

BackGraphicFilter (String)<br />

name of the filter for interpreting the background graphics<br />

BackGraphicLocation (Enum)<br />

position of the background graphics (value according to enumeration)<br />

BackTransparent (Boolean)<br />

makes the background transparent<br />

Page Format<br />

The page format is defined using the following properties of the com.sun.star.style.PageProperties service:<br />

IsLandscape (Boolean)<br />

landscape format<br />

Width (long)<br />

width of page in hundredths of a millimeter<br />

Chapter 7 · Spreadsheet Documents 101

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

Saved successfully!

Ooh no, something went wrong!