Chapter 11: StarDesktop


Overview

The desktop acts as the main application that controls OpenOffice.org. This chapter introduces some general techniques-such as accessing indexed objects, enumerating open documents, and loading new documents-while discussing and demonstrating the base functionality of the Desktop object. This chapter also covers the Desktop object and ThisComponent.

The Desktop object is a com.sun.star.frame.Desktop service, which supplies four primary functions; it acts as a frame, a desktop, a document loader, and an event broadcaster . The Desktop, acting as the primary application object, is created when OpenOffice.org is first started. Use the globally available variable StarDesktop to access the OOo Desktop object.

As a frame, the desktop is the parent frame and controls the frames for all of the documents. As the desktop, the desktop is the main application with the ability to close the documents-when the application is shut down, for example. The role of the main application also allows the desktop to load existing documents and create new documents. As an event broadcaster, the desktop notifies existing documents (or any other listener) of things that are happening-when the application is about to shut down, for example.

Tip  

For information about the Desktop object, see: http://api.openoffice.org/docs/common/ref/com/sun/star/frame/Desktop.html . Change the text "Desktop.html" to "module-ix.html" to view all of the documented pieces in the frame module. Notice the relationship between the service com.sun.star.frame.Desktop and the Web address that discusses the service.




OpenOffice.org Macros Explained
OpenOffice.org Macros Explained
ISBN: 1930919514
EAN: 2147483647
Year: 2004
Pages: 203

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net