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.

Working with Documents|Working with Documents 75<br />

Working with Documents<br />

Working with Documents|Working<br />

with Documents<br />

The <strong>OpenOffice</strong>.<strong>org</strong> API has been structured so that as many of its parts as possible can be<br />

used universally for different tasks. This includes the interfaces and services for creating,<br />

opening, saving, converting, and printing documents and for template administration. Since<br />

these function areas are available in all types of documents, they are explained first in this<br />

chapter.<br />

• → The StarDesktop<br />

• → Templates<br />

Source: http:/ / <strong>wiki</strong>. services. openoffice. <strong>org</strong>/ w/ index. php? title=Documentation/ <strong>BASIC</strong>_<br />

<strong>Guide</strong>/ Documents&oldid=96869<br />

Principal Authors: Fpe, Ccornell<br />

The StarDesktop<br />

When working with documents, two services are used most frequently:<br />

• The<br />

com.sun.star.frame.Desktop<br />

service, which is similar to the core service of <strong>OpenOffice</strong>.<strong>org</strong>. It provides the functions<br />

for the frame object of <strong>OpenOffice</strong>.<strong>org</strong>, under which all document windows are classified.<br />

Documents can also be created, opened and imported using this service.<br />

• The basic functionality for the individual document objects is provided by the<br />

The<br />

com.sun.star.document.OfficeDocument<br />

service. This provides the methods for saving, exporting and printing documents.<br />

com.sun.star.frame.Desktop<br />

service is created automatically when <strong>OpenOffice</strong>.<strong>org</strong> is started. This service can be<br />

addressed in <strong>OpenOffice</strong>.<strong>org</strong> Basic using the global name StarDesktop.<br />

The most important interface of the StarDesktop is<br />

com.sun.star.frame.XComponentLoader<br />

. This basically covers the loadComponentFromURL method, which is responsible for<br />

creating, importing, and opening documents.

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

Saved successfully!

Ooh no, something went wrong!