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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FooterBottomBorderDistance (long)<br />

distance between bottom border and content of footer in hundredths of a millimeter<br />

FooterIsShared (Boolean)<br />

The Structure of Spreadsheets<br />

the footers on the even and odd pages have the same content (refer to FooterText, FooterTextLeft,<br />

and FooterTextRight )<br />

FooterBackColor (long)<br />

background color of footer<br />

FooterBackGraphicURL (String)<br />

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

FooterBackGraphicFilter (String)<br />

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

FooterBackGraphicLocation (Enum)<br />

position of background graphics for the footer (value according to com.sun.star.style.GraphicLocation<br />

enumeration)<br />

FooterBackTransparent (Boolean)<br />

shows the background of the footer as transparent<br />

FooterShadowFormat (struct)<br />

details of shadow of footer (com.sun.star.table.ShadowFormat structure)<br />

Changing the Text of Headers and Footers<br />

The content of headers and footers in a spreadsheet is accessed through the following properties:<br />

LeftPageHeaderContent (Object)<br />

content of headers for even pages (com.sun.star.sheet.HeaderFooterContent service)<br />

RightPageHeaderContent (Object)<br />

content of headers for odd pages (com.sun.star.sheet.HeaderFooterContent service)<br />

LeftPageFooterContent (Object)<br />

content of footers for even pages (com.sun.star.sheet.HeaderFooterContent service)<br />

RightPageFooterContent (Object)<br />

content of footers for odd pages (com.sun.star.sheet.HeaderFooterContent service)<br />

If you do not need to distinguish between headers or footers for odd and even pages (the FooterIsShared<br />

property is False), then set the properties for headers and footers on odd pages.<br />

All the named objects return an object that supports the com.sun.star.sheet.HeaderFooterContent service. By<br />

means of the (non-genuine) properties LeftText, CenterText, and RightText, this service provides three text<br />

elements for the headers and footers of <strong>OpenOffice</strong>.<strong>org</strong> Calc.<br />

The following example writes the "Just a Test." value in the left-hand text field of the header from the "Default"<br />

template.<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 />

Dim HText As Object<br />

Dim HContent As Object<br />

Doc = ThisComponent<br />

StyleFamilies = Doc.StyleFamilies<br />

PageStyles = StyleFamilies.getByName("PageStyles")<br />

DefPage = PageStyles.getByName("Default")<br />

DefPage.HeaderIsOn = True<br />

Chapter 7 · Spreadsheet Documents 105

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

Saved successfully!

Ooh no, something went wrong!