OpenOffice.org OpenOffice - 3.2 Guía de inicio rápido Pagina 400

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 442
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 399
Extensions
An extension is a package that can be installed into OpenOffice.org to
add new functionality. Extensions can be written in almost any
programming language and may be simple or sophisticated. Extensions
can be grouped into types:
Calc Add-Ins, which provide new functionality for Calc, including
new functions that act like normal built-in functions
New components and functionality, which normally include some
level of UI integration such as new menus or toolbars
Data pilots that are used directly in Calc
Chart Add-Ins with new chart types
Linguistic components such as spell checkers
Document templates and images
Although individual extensions can be found in different places, there
is an extension repository at: http://extensions.services.openoffice.org/.
For more about obtaining and installing extensions, see Chapter 14
(Customizing OpenOffice.org).
Writing macros without the recorder
The examples covered in this chapter are created using the macro
recorder and the dispatcher. You can also write macros that directly
access the objects that comprise OpenOffice.org. In other words, you
can directly manipulate a document.
Directly manipulating OOo’s internal objects is an advanced topic that
is beyond the scope of this chapter. A simple example, however,
demonstrates how this works.
Listing 4: Append the text “Hello” to the current document.
Sub AppendHello
Dim oDoc
Dim sTextService$
Dim oCurs
REM ThisComponent refers to the currently active document.
oDoc = ThisComponent
REM Verify that this is a text document
sTextService = "com.sun.star.text.TextDocument"
If NOT oDoc.supportsService(sTextService) Then
400 Getting Started with OpenOffice.org 3.x
Free eBook Edition
Vista de pagina 399
1 2 ... 395 396 397 398 399 400 401 402 403 404 405 ... 441 442

Comentarios a estos manuales

Sin comentarios