Copyright
1 First Steps
Programming with UNO
Fields of Application for UNO
Getting Started
Required Files
Installation Sets
Configuration
First Contact
How to get Objects in OpenOffice.org
New objects
Document objects
Objects that are provided by other objects
Sets of objects
Working with Objects
Objects, Interfaces, and Services
Using Services
Example: Working with a Spreadsheet Document
Common Types
Struct
Any
Sequence
Element Access
How do I know Which Type I Have?
Example: Hello Text, Hello Table, Hello Shape
Common Mechanisms for Text, Tables and Drawings
Creating Text, Tables and Drawing Shapes
2 Professional UNO
Introduction
API Concepts
Data Types
Simple Types
The Any Type
Interfaces
Services
Referencing Interfaces
Service Constructors
Including Properties
Referencing other Services
Service Implementations in Components
Structs
Predefined Values
const
constants
enum
Sequences
Modules
Exceptions
Singletons
Understanding the API Reference
Specification, Implementation and Instances
Object Composition
UNO Concepts
UNO Interprocess Connections
Starting OpenOffice.org in Listening Mode
Importing a UNO Object
Characteristics of the Interprocess Bridge
Opening a Connection
Creating the Bridge
Closing a Connection
Example: A Connection Aware Client
Service Manager and Component Context
Service Manager
XMultiServiceFactory Interface
XContentEnumerationAccess Interface
XSet Interface
Component Context
ComponentContext API
Availability
Compatibility Issues and Migration Path
Using UNO Interfaces
Properties
Collections and Containers
Event Model
Exception Handling
User-Defined Exceptions
Runtime Exceptions
Good Exception Handling
Lifetime of UNO objects
acquire() and release()
The XComponent Interface
Children of the XEventListener Interface
Weak Objects and References
Differences Between the Lifetime of C++ and Java Objects
Object Identity
UNO Language Bindings
Java Language Binding
Getting a Service Manager
Transparent Use of Office UNO Components
The bootstrap method
SDK tooling
Finding a UNO Installation
Handling Interfaces
Type Mappings
Mapping of Simple Types
Mapping of String
Mapping of Type
Mapping of Any
Mapping of Sequence Types
Mapping of Enum Types
Mapping of Struct Types
Mapping of Exception Types
Mapping of Interface Types
Mapping of UNOIDL
Mapping of UNOIDL Typedefs
Mapping of Individual UNOIDL Constants
Mapping of UNOIDL Constant Groups
Mapping of UNOIDL Modules
Mapping of Services
Mapping of Singletons
Inexact approximation of UNO Value Semantics
C++ Language Binding
Library Overview
System Abstraction Layer
File Access
Threadsafe Reference Counting
Threads and Thread Synchronization
Socket and Pipe
Strings
Establishing Interprocess Connections
Transparent Use of Office UNO Components
The bootstrap function
SDK tooling
Finding a UNO Installation
Type Mappings
Mapping of Simple Types
Mapping of Type
Mapping of Any
Mapping of Struct Types
Mapping of Interface Types
Mapping of Sequence Types
Mapping of Sequence Types
Mapping of Services
Mapping of Singletons
Using Weak References
Exception Handling in C++
OpenOffice.org Basic
Handling UNO Objects
Accessing UNO Services
Instantiating UNO Services
Getting Information about UNO Objects
Checking for interfaces during runtime
Testing if an object is a struct during runtime
Testing objects for identity during runtime
Inspecting interfaces during debugging
Inspecting properties during debugging
Inspecting Methods During Debugging
Mapping of UNO and Basic Types
Mapping of Simple Types
Mapping of Sequences and Arrays
Mapping of Structs
Mapping of Enums and Constant Groups
Case Sensitivity
Exception Handling
Listeners
Automation Bridge
Requirements
A Quick Tour
The Service Manager Component
Instantiation
Visual Basic:
VBScript with WSH:
JScript with WSH:
Registry Entries
From UNO Objects to Automation Objects
Using UNO from Automation
Calling Functions and Accessing Properties
Return Values
Usage of Types
Interfaces
Structs
Using Automation Objects from UNO
Instantiation
Properties with Arguments
Optional Parameters, Default Values, Variable Argument Lists
Named Arguments
Type Mappings
Default Mappings
Mapping of Simple Types
Mapping of Hyper and Decimal
Mapping of String
Mapping of Interfaces and Structures
Mapping of Sequence
Mapping of Type
Conversion Mappings
Client-Side Conversions
Client-Side Conversions
Client-Side Conversions
Value Objects
Exceptions and Errorcodes
Automation Objects with UNO Interfaces
Requirements
Examples
DCOM
The Bridge Services
Service: com.sun.star.bridge.oleautomation.BridgeSupplier
Service: com.sun.star.bridge.OleBridgeSupplierVar1
Service: com.sun.star.bridge.oleautomation.ApplicationRegistration
Service: com.sun.star.bridge.oleautomation.Factory
Unsupported COM Features
CLI Language Binding
Terms
Requirements
Running on 64 Bit Platforms
Changes in OpenOffice.org 3.0
Language Binding DLLs
Modules
Type Mapping
Type Name Decoration
Type Mappings
Simple Types
any
interface
Methods
Parameter Types (in,out,in/out)
Exceptions
One-Way Methods
Attributes
XInterface
struct
Polymorphic structs
const
constants
enum
sequence
exception
services
singletons
Additional Structures
ExceptionAttribute Attribute
OnewayAttribute
BoundPropertyAttribute
TypeParametersAttribute
ParameterizedTypeAttribute
TypeArgumentsAttribute
PolymorphicType
Lifetime Management and Obtaining Interfaces
Writing Client Programs
The Override Problem
Important Interfaces and Implementations
uno.util.WeakBase
uno.util.WeakComponentBase
3 Writing UNO Components
Required Files
OpenOffice.org Software Development Kit (SDK)
GNU Make
Using UNOIDL to Specify New Components
Writing the Specification
Preprocessing
Grouping Definitions in Modules
Simple Types
Defining an Interface
Attributes
Methods
Defining a Service
Old-style Services
Defining a Sequence
Defining a Struct
Defining an Exception
Predefining Values
Const and Constants
Enum
Using Comments
Singleton
Reserved Types
Array
Union
Published Entities
Component Architecture
Core Interfaces to Implement
XInterface
Requirements for queryInterface()
Reference Counting
XTypeProvider
Provided Types
ImplementationID
XServiceInfo
Implementation Name
Supported Service Names
XWeak
XComponent
Disposing of an XComponent
XInitialization
XMain
XAggregation
XUnoTunnel
Simple Component in Java
Class Definition with Helper Class
XInterface, XTypeProvider and XWeak
XServiceInfo
Implementing Your Own Interfaces
Providing a Single Factory Using a Helper Method
Write Registration Info Using a Helper Method
Implementing without Helpers
XInterface
XTypeProvider
XComponent
Storing the Service Manager for Further Use
Create Instance with Arguments
Possible Structures for Java Components
One Implementation per Component File
Implementation Class with Component Operations and Inner Implementation Class
Multiple Implementations per Component File
Additional UNO Types
Running and Debugging Java Components
Register Component File
Make Registration Available to OpenOffice.org
Test the Registration
Debugging
Support for GNU make
Component Debugging
The Java Environment in OpenOffice.org
Troubleshooting
Check Registry Keys
Check the Java VM settings
Check the Manifest
Adjust CLASSPATH for Additional Classes
Disable Debug Options
C++ Component
Class Definition with Helper Template Classes
XInterface, XTypeProvider and XWeak
XServiceInfo
Implementing your own Interfaces
Providing a Single Factory Using a Helper Method
Write Registration Info Using a Helper Method
Provide Implementation Environment
Implementing without Helpers
XInterface Implementation
XTypeProvider Implementation
Providing a Single Factory
Write Registration Info
Storing the Service Manager for Further Use
Create Instance with Arguments
Multiple Components in One Dynamic Link Library
Building and Testing C++ Components
Build Process
Test Registration and Use
Integrating Components into OpenOffice.org
Protocol Handler
Overview
Implementation
Java Protocol Handler - vnd.sun.star.framework.ExampleHandler
C++ Protocol Handler - org.openoffice.Office.addon.example
Configuration
Configuration for vnd.sun.star.framework.ExampleHandler
Configuration for org.openoffice.Office.addon.example
Installation
Jobs
Execution Environment
Implementation
Initialization
Returning Results
Configuration
Installation
Using the vnd.sun.star.jobs: URL Schema
List of Supported Events
Add-Ons
Overview
Guidelines
Add-Ons Submenu
Custom Top-Level Menu
Toolbar
Add-On Help menu
Configuration
Menus
Submenu in Tools - Add-Ons
Top-level Menu
Toolbars
Images for Toolbars and Menus
Help Integration
Installation
Disable Commands
Configuration
Disabling Commands at Runtime
Intercepting Context Menus
Register and Remove an Interceptor
Writing an Interceptor
Querying a Menu Structure
Changing a Menu
Finishing Interception
File Naming Conventions
Deployment Options for Components
Background: UNO Registries
Component Registration
Command Line Registry Tools
Component Registration Tool
UNO Type Library Tools
Manual Component Installation
Manually Merging a Registry and Adding it to uno.ini or soffice.ini
Bootstrapping a Service Manager
Special Service Manager Configurations
Dynamically Modifying the Service Manager
Creating a ServiceManager from a Given Registry File
The UNO Executable
Standalone Use Case
Server Use Case
Using the UNO Executable
Accessing Dialogs
Assigning Component Methods to Control Events
Using Dialogs in Components
Instantiate and display a dialog
Accept events created by dialog controls
4 Extensions
Extension Manager
Deployment Items
Installing Extensions for All or a Single User
Extension Manager in OpenOffice.org
unopkg
Location of Installed Extensions
Extension Layers
Unprocessed Content
The Future of Layers
Checklist for Writing Extensions
File Format
Runtime Libraries
Shared Library UNO Components
Shared Library UNO Components for particular Platforms
RDB Type Library
Jar Type Library
Uno Jar Components
UNO Python Components
OpenOffice.org Basic Libraries
Dialog Libraries
Configuration Data Files
Configuration Schema Files
Extension Tooltip Description
Executable Files
description.xml
Description of XML Elements
Element /description
Element /description/identifier
Element /description/version
Element /description/platform
Element /description/registration
Element /description/registration/simple-license
Element /description/registration/simple-license/license-text
Element /description/dependencies
Element /description/dependencies/OpenOffice.org-minimal-version
Element /description/dependencies/OpenOffice.org-maximal-version
Element /description/update-information
Element /description/update-information/src
Element /description/publisher
Element /description/publisher/name
Element /description/release-notes
Element /description/release-notes/src
Element /description/display-name
Element /description/display-name/name
Element /description/icon
Element /description/icon/default
Element /description/icon/high-contrast
Element /description/extension-description
Element /description/extension-description/src
Localized XML Elements
Example
Display Name
Icon
Extension Description
Extension Identifiers
Extension Versions
Target Platform
Platform Tokens
Backward Compatibility of Platforms
Generating the Platform String in the Build Environment
Simple License
Important Issues
Dependencies
Publisher Information
System Integration
Online Update of Extensions
Running Online - Update
Concept
Example Scenario for Providing Updates
Using an Atom Feed
Migration of Update Information
Description of the Update Information
Element /description
Element /description/identifier
Element /description/version
Element /description/update-download
Element /description/update-download/src
Element /description/update-website
Element /description/update-website/src
Element /description/dependencies
Element /description/dependencies/OpenOffice.org-minimal-version
Element /description/dependencies/OpenOffice.org-maximal-version
Element /description/publisher
Element /description/publisher/name
Element /description/release-notes
Element /description/release-notes/src
Description of Atom Feed
Examples
description.xml Containing Direct Reference to the Update Information
Using the Atom Feed
Options Dialog
Available samples
Creating the GUI of the Options Page
Saving and Reading Data for the Options Page
Defining the Usage of Options Pages
The Options Dialog of the Extension Manager
Adding a Leaf to an Existing Node
Adding Several Leaves
Grouping of Leaves
Adding Nodes
Adding Several Nodes
Absolute Position of Leaves
Grouping of Nodes
Assigning Nodes to Modules
Defining a Module
Absolute Position of Nodes
Help Content
Extension help format
Deployment
Error handling
Integration into the OpenOffice.org help system
Help Viewer Contents page
Help Viewer Index page
Help Viewer Find page
Help Viewer Bookmarks page
Context sensitive help and extended tool tips
Links
Images
File Format
5 Advanced UNO
Choosing an Implementation Language
C++
OpenOffice.org Basic
OLE Automation Bridge
Python
Use Cases
C++
OpenOffice.org Basic
OLE Automation
Python
Recommendation
Language Bindings
Implementing UNO Language Bindings
Overview of Language Bindings and Bridges
Code Generator
UNO Bridge
UNO Component Loader
Bootstrapping
Implementation Options
UNO C++ Bridges
Binary UNO Interfaces
C++ Proxy
Binary UNO Proxy
Additional Hints
UNO Reflection API
XTypeProvider Interface
Converter Service
CoreReflection Service
Invocation
InvocationAdapterFactory
XTypeDescription
XInvocation Bridge
Scripting Existing UNO Objects
Argument Conversion
Exception Handling
Property Support
Implementing UNO objects
Example Python Bridge PyUNO
Implementation Loader
Shared Library Loader
Bridges
Help with New Language Bindings
Differences Between UNO and Corba
UNO Design Patterns and Coding Styles
Double-Checked Locking
6 Office Development
OpenOffice.org Application Environment
Desktop Environment
Framework API
Frame-Controller-Model Paradigm in OpenOffice.org
Frames
Linking Components and Windows
Communication through Dispatch Framework
Components in Frames
Controllers
Windows
Dispatch Framework
Using the Desktop
Using the Component Framework
Getting Frames, Controllers and Models from Each Other
Frames
XFrame
Frame Hierarchies
Frame Actions
XFramesSupplier
XDispatchProvider and XDispatchProviderInterception
XStatusIndicatorFactory
Controllers
XController
XDispatchProvider
XSelectionSupplier
XContextMenuInterception
Document Specific Controller Services
Models
XModel
XModifiable
XStorable
XPrintable
XEventBroadcaster
XEventsSupplier
XDocumentInfoSupplier
XViewDataSupplier
Document Specific Features
Window Interfaces
XWindow
XTopWindow
XWindowPeer
Creating Frames Manually
Frame Creation
Assigning Windows to Frames
Setting Components into Frame Hierarchies
Handling Documents
Loading Documents
URL Parameter
Target Frame
Closing Documents
Reacting Upon Closing
How to Trigger Closing
XCloseable
Storing Documents
Printing Documents
Using the Dispatch Framework
Command URL
Processing Chain
Dispatch Process
Getting a Dispatch Object
Listening for Status Information
Listening for Context Changes
Dispatching a Command
Dispatch Results
Dispatch Interception
Java Window Integration
The Window Handle
Using the Window Handle
Legal Solution
More Remote Problems
Common Application Features
Clipboard
Copying Data
Becoming a Clipboard Viewer
OpenOffice.org Clipboard Data Formats
Internationalization
Introduction
Overview and Using the API
XLocaleData
XCharacterClassification
XCalendar
XExtendedCalendar
XNumberFormatCode
XNativeNumberSupplier
XCollator
XTransliteration
XTextConversion
XBreakIterator
XIndexEntrySupplier
XExtendedIndexEntrySupplier
Implementing a New Locale
XLocaleData
XCalendar
XCharacterClassification
XBreakIterator
XCollator
XTransliteration
XTextConversion
XNativeNumberSupplier
XIndexEntrySupplier
A Comment on Search and Replace
Linguistics
Services Overview
Using Spellchecker
Relevant properties
Using Hyphenator
Relevant properties
Using Thesaurus
Events
Implementing a Spell Checker
Implementing a Hyphenator
Implementing a Thesaurus
Integrating Import and Export Filters
Introduction
Approaches
Checklist for filter developers
Filtering Process
Loading content
Storing content
Filter
Configuring a Filter in OpenOffice.org
Structure of the configuration
TypeDetection
Properties of a Type
Properties of a Filter
Sample configuration for an API based filter
Sample configuration for an XML based filter
Sample configuration for an xslt based filter
Filter Options
Properties of a FrameLoader
Document API Filter Development
XML Based Filter Development
Introduction
Sample implementations
Writing the Filtering Component
XImportFilter
XExportFilter
XDocumentHandler
The Importer
Evaluating XImportFilter Parameters
Importer Filtering
Parsing the Result
The Exporter
Evaluating XExportFilter Parameters
Exporter Filtering
XML Filter Detection
Requirements for Deep Detection
Extending the File Type Definition
The ExtendedTypeDetection Service Implementation
TypeDetection.xcu DetectServices Entry
Number Formats
Managing Number Formats
NumberFormats Service
XNumberFormatTypes
Applying Number Formats
NumberFormatter Service
XNumberformatPreviewer
Document Events
Path Organization
Path Settings
Configuration
Accessing Path Settings
Path Variables
Predefined Variables
Custom Path Variables
Syntax
Environment Values
Rules
Analyzing User-Defined Rules
Configuration
Resolving Path Variables
OpenOffice.org Single Sign-On API
Overview
Implementing the OpenOffice.org SSO API
XSSOManager
XSSOInitiatorContext
XSSOAcceptorContext
7 Text Documents
Example: Fields in a Template
Example: Visible Cursor Position
Handling Text Document Files
Creating and Loading Text Documents
Saving Text Documents
Storing
Exporting
Printing Text Documents
Printer and Print Job Settings
Printing Multiple Pages on one Page
Working with Text Documents
Word Processing
Editing Text
Strings
Text Contents Other Than Strings
Control Characters
Iterating over Text
Inserting a Paragraph where no Cursor can go
Sorting Text
Inserting Text Files
Auto Text
Formatting
Navigating
Cursors
Locating Text Contents
Search and Replace
Tables
Table Architecture
Named Table Cells in Rows, Columns and the Table Cursor
Indexed Cells and Cell Ranges
Table Naming, Sorting, Charting and Autoformatting
Text Table Properties
Inserting Tables
Accessing Existing Tables
Text Fields
Bookmarks
Indexes and Index Marks
Indexes
Index marks
Reference Marks
Footnotes and Endnotes
Shape Objects in Text
Base Frames vs. Drawing Shapes
Drawing Shapes
Text Frames
Embedded Objects
Graphic Objects
Drawing Shapes
Redline
Ruby
Overall Document Features
Styles
Paragraph Styles
Frame Styles
Page Styles
Numbering Styles
Settings
General Document Information
Document Properties
Creating Default Settings
Creating Document Settings
Line Numbering and Outline Numbering
Paragraph and Outline Numbering
Line Numbering
Number Formats
Text Sections
Page Layout
Columns
Link Targets
Text Document Controller
TextView
TextViewCursor
8 Spreadsheet Documents
Example: Adding a New Spreadsheet
Example: Editing Spreadsheet Cells
Handling Spreadsheet Documents Files
Creating and Loading Spreadsheet Documents
Saving Spreadsheet Documents
Storing
Exporting
Filter Options
Filter Options for Lotus, dBase and DIF Filters
Filter Options for the CSV Filter
Printing Spreadsheet Documents
Printer and Print Job Settings
Page Breaks and Scaling for Printout
Print Areas
Working With Spreadsheet Documents
Document Structure
Spreadsheet Services - Overview
Capabilities of Spreadsheet
Capabilities of SheetCellRange
Capabilities of SheetCell
Capabilities of SheetCellRanges Container
Capabilities of Columns and Rows
Spreadsheet
Properties of Spreadsheet
Naming
Inserting Cells, Moving and Copying Cell Ranges
Page Breaks
Cell Ranges
Properties of Cell Ranges
Cell and Cell Range Access
Merging Cell Ranges into a Single Cell
Column and Row Access
Data Array
Absolute Address
Fill Series
Operations
Multiple Operations
Handling Array Formulas
Cells
Properties of SheetCell
Access to Formulas, Values and Errors
Access to Text Content
Absolute Address
Cell Annotations
Cell Ranges and Cells Container
Properties of SheetCellRanges
Access to Single Cell Ranges in SheetCellRanges Container
Columns and Rows
Formatting
Cell Formatting
Character and Paragraph Format
Indentation
Equally Formatted Cell Ranges
Cell Format Ranges
Unique Cell Format Ranges
Table Auto Formats
Conditional Formats
Navigating
Cell Cursor
Cursor Movement
Used Area
Referencing Ranges by Name
Named Ranges
Label Ranges
Querying for Cells with Specific Properties
Search and Replace
Sorting
Table Sort Descriptor
Database Operations
Filtering
Subtotals
Database Import
Database Ranges
Linking External Data
Sheet Links
Cell Area Links
DDE Links
DataPilot Tables
Creating a New DataPilot Table
Modifying a DataPilot Table
Removing a DataPilot Table
DataPilot Sources
Source Object
Dimensions
Hierarchies
Levels
Members
Protecting Spreadsheets
Sheet Outline
Detective
Other Table Operations
Data Validation
Data Consolidation
Charts
Scenarios
Overall Document Features
Styles
Page Styles
Function Handling
Calculating Function Results
Information about Functions
Recently Used Functions
Settings
Spreadsheet Document Controller
Spreadsheet View
View Panes
View Settings
Range Selection
Spreadsheet Add-Ins
Function Descriptions
Service Names
Compatibility Names
Custom Functions
Variable Results
9 Drawing Documents and Presentation Documents
Example: Creating a Simple Organizational Chart
Handling Drawing Document Files
Creating and Loading Drawing Documents
Saving Drawing Documents
Storing
Exporting
Filter Options
Printing Drawing Documents
Printer and Print Job Settings
Special Print Settings
Working with Drawing Documents
Document Structure
Page Handling
Page Partitioning
Shapes
Shape Types
Bezier Shapes
Shape Operations
Moving and Scaling
Rotating and Shearing
Transforming
Ordering
Grouping, Combining and Binding
General Drawing Properties
Glue Points and Connectors
Layer Handling
Inserting Files
Navigating
Handling Presentation Document Files
Creating and Loading Presentation Documents
Printing Presentation Documents
Working with Presentation Documents
Presentation Settings
Custom Slide Show
Presentation Effects
Slide Transition
Animations and Interactions
Overall Document Features
Styles
Presentation Styles
Settings
Page Formatting
Drawing and Presentation Document Controller
Setting the Current Page
Zooming
Other Drawing Specific View Settings
10 Charts
Handling Chart Documents
Creating Charts
Creating and Adding a Chart to a Spreadsheet
Creating a Chart OLE Object in Draw and Impress
Setting the Chart Type
Accessing Existing Chart Documents
Working With Charts
Document Structure
Data Access
Chart Document Parts
Common Parts of all Chart Types
Diagram
Axis
Data Series and Data Points
Features of Special Chart Types
Statistics
3-D Charts
Pie Charts
Stock Charts
Chart Document Controller
Chart Add-Ins
Prerequisites
How Add-Ins Work
How to Apply an Add-In to a Chart Document
11 OpenOffice.org Basic
First Steps with OpenOffice.org Basic
Step By Step Tutorial
Creating a Module in a Standard Library
Writing and Debugging a Basic UNO program
Calling a Sub from the User Interface
Creating Dialogs
Adding Event Handlers
AutoPilot Dialogs
OpenOffice.org Basic IDE
Managing Basic and Dialog Libraries
OpenOffice.org Basic Macros Dialog
Displayed Information
Buttons
OpenOffice.org Basic Macro Organizer Dialog
Modules
Dialogs
Libraries
Basic IDE Window
Basic Source Editor and Debugger
Dialog Editor
Assigning Macros to GUI Events
Dialog Localization
Technical Background
Features of OpenOffice.org Basic
Functional Range Overview
Screen I/O Functions
File I/O
Date and Time Functions
Numeric Functions
String Functions
Specific UNO Functions
Accessing the UNO API
StarDesktop
ThisComponent
Special Behavior of OpenOffice.org Basic
Threads
Rescheduling
Advanced Library Organization
General Structure
Accessing Libraries from Basic
Library Container Properties in Basic
Loading Libraries
Library Container API
Variable Scopes
Programming Dialogs and Dialog Controls
Dialog Handling
Showing a Dialog
Getting the Dialog Model
Dialog as Control Container
Dialog Properties
Common Properties
Multi-Page Dialogs
Dialog Controls
Command Button
Image Control
Check Box
Option Button
Label Field
Text Field
List Box
Combo Box
Horizontal/Vertical Scroll Bar
Group Box
Progress Bar
Horizontal/Vertical Line
Date Field
Time Field
Numeric Field
Currency Field
Formatted Field
Pattern Field
File Control
Creating Dialogs at Runtime
Library File Structure
Application Library Container
Libraries without Password Protection
Libraries with Password Protection
Document Library Container
Library Deployment
Package Structure
Path Settings
Additional Options
12 Database Access
Platform Independence
Functioning of the OpenOffice.org API Database Integration
Integration with OpenOffice.org API
Architecture
Example: Querying the Bibliography Database
Data Sources in OpenOffice.org API
DatabaseContext
DataSources
The DataSource Service
Adding and Editing Datasources
Queries
Adding and Editing Predefined Queries
Runtime Settings For Predefined Queries
The SingleSelectQueryComposer
The SQLQueryComposer
Forms and Reports
Document Links
Tables and Columns
Connections
Understanding Connections
Data Definition
Operation on Application Level
Connecting Through a DataSource
Connecting Using the DriverManager and a Database URL
Connecting Through a Specific Driver
Driver Specifics
Driver Specifics
The SDBC Driver for JDBC
The SDBC Driver for ODBC
The SDBC Driver for Adabas D
The SDBC Driver for ADO
The SDBC Driver for dBase
The SDBC Driver for Flat File Formats
The SDBC Driver for OpenOffice.org Calc Files
The SDBC Driver for address books
The SDBC Driver for embedded HSQL databases
Connection Pooling
Piggyback Connections
Manipulating the Data
The RowSet Service
Usage
Events and Other Notifications
Clones of the RowSet Service
Statements
Creating Statements
Inserting and Updating Data
Getting Data from a Table
Result Sets
Retrieving Values from Result Sets
Moving the Result Set Cursor
Using the getXXX Methods
Scrollable Result Sets
Modifiable Result Sets
Update
Insert
Delete
Seeing Changes in Result Sets
ResultSetMetaData
Using Prepared Statements
When to Use a PreparedStatement Object
Creating a PreparedStatement Object
Supplying Values for PreparedStatement Parameters
PreparedStatement From DataSource Queries
Database Design
Retrieving Information about a Database
Determining Feature Support
Database Limits
SQL Objects and their Attributes
Using DDL to Change the Database Design
Using SDBCX to Access the Database Design
The Extension Layer SDBCX
Catalog Service
Table Service
Column Service
Index Service
Key Service
View Service
Group Service
User Service
The Descriptor Pattern
Adding an Index
Creating a User
Adding a Group
Using DBMS Features
Transaction Handling
Stored Procedures
Writing Database Drivers
SDBC Driver
Driver Service
Connection Service
XDatabaseMetaData Interface
Statements
PreparedStatement
Result Set
Support Scalar Functions
Open Group CLI Numeric Functions
Open Group CLI String Functions
Open Group CLI Time and Date Functions
Open Group CLI System Functions
Open Group CLI Conversion Functions
Handling Unsupported Functionality
13 Forms
Models and Views
The Model-View Paradigm
Models and Views for Form Controls
Model-View Interaction
Form Layer Views
View Modes
Locating Controls
Focusing Controls
Form Elements in the Document Model
A Hierarchy of Models
FormComponent Service
FormComponents Service
Logical Forms
Forms Container
Form Control Models
Control Models and Shapes
Programmatic Creation of Controls
Form Components
Control Models
Forms
HTML Forms
Data Awareness
Forms
Forms as Row Sets
Loadable Forms
Sub Forms
Filtering and Sorting
Parameters
Data Aware Controls
Control Models as Bound Components
Committing Controls
External Value Suppliers
Value Bindings
Form Controls accepting Value Bindings
External List Sources
Validation
Validation in OpenOffice.org
Validation and Bindings
Scripting and Events
Common Tasks
Initializing Bound Controls
Automatic Key Generation
Data Validation
Programmatic Assignment of Scripts to Events
14 Universal Content Broker
Capabilities
Architecture
Services and Interfaces
Content Providers
Using the UCB API
Instantiating the UCB
Accessing a UCB Content
Executing Content Commands
Obtaining Content Properties
Setting Content Properties
Folders
Accessing the Children of a Folder
Documents
Reading a Document Content
Storing a Document Content
Managing Contents
Creating
Deleting
Copying, Moving and Linking
Configuration
UCP Registration Information
Unconfigured UCBs
Preconfigured UCBs
Content Provider Proxies
15 Configuration Management
Capabilities
Architecture
Object Model
Configuration Data Sources
Connecting to a Data Source
Using a Data Source
Reading Configuration Data
Updating Configuration Data
Customizing Configuration Data
Creating a Custom Configuration Schema
Known Issues regarding schema handling
Preparing a Custom Configuration Schema
Installing a Custom Configuration Schema
Adding a Backend Data Store
16 JavaBean for Office Components
Using the OOoBean
The OOoBean by Example
API Overview
Configuring the Office Bean
Default Configuration
Customized Configuration
Internal Architecture
The Internal Office Bean API
OfficeConnection Interface
OfficeWindow Interface
ContainerFactory Interface
LocalOfficeConnection and LocalOfficeWindow
17 Accessibility
Overview
Bridges
Accessibility Tree
Content Information
Listeners and Broadcasters
Implementing Accessible Objects
Implementation Rules
Services
Using the Accessibility API
A Simple Screen Reader
Features
Class Overview
Putting the Accessibility Interfaces to Work
XAccessibleContext
XAccessibleComponent
XAccessibleExtendedComponent
XAccessibleText
Selection
Text type
Caret and Text Indices
XAccessibleEditableText
XAccessibleTable
XAccessibleEventBroadcaster
XAccessibleEventListener
XAccessibleSelection
XAccessibleRelationSet
XAccessibleStateSet
XAccessibleValue
XAccessibleImage
XAccessibleAction
XAccessibleKeyBinding
XAccessibleHypertext
XAccessibleHyperlink
18 Scripting Framework
Structure of this Chapter
Who Should Read this Chapter
Using the Scripting Framework
Running Macros
Editing, Creating and Managing Macros
The Organizer dialogs for BeanShell and JavaScript
BeanShell Editor
JavaScript Editor
Basic and Dialogs
Macro Recording
Writing Macros
The HelloWorld macro
Using the OpenOffice.org API from macros
Handling arguments passed to macros
Creating dialogs from macros
Compiling and Deploying Java macros
How the Scripting Framework Works
Writing a LanguageScriptProvider UNO Component using the Java Helper Classes
The ScriptProvider Abstract Base Class
Implementing the XScript Interface
Implementing the ScriptEditor Interface
Building and Registering Your ScriptProvider
Writing a LanguageScriptProvider UNO Component From Scratch
Scripting Framework URI Specification
Storage of Scripts
Implementation
Integration with Extension Manager
Overview of how ScriptingFramework integrates with the Extension Manager API
Deregistration
Implementation of LanguageScriptProvider with support for Package Manager
Implementation of the BrowseNode service
19 Graphical User Interfaces
Implementation Details
Basic Concepts
Exception Handling
Dialogs and Controls
Dialog Creation
Instantiation of a Dialog
Setting Dialog Properties
Multi-Page Dialogs
Adding Controls to a Dialog
Displaying Dialogs
Dialog Handling
Events
Mouse Listeners
Keyboard Listener
Focus Listener
Paint Listener
Control element-specific events
Dialog Controls
Common Properties
Font-specific Properties
Other Common Properties
Property Propagation Between Model and Control
Common Workflow to add Controls
The Example Listings
Label Field
Command Button
Graphics
Image Control
Check Box
Radio Button
Scroll Bar
List Box
Combo Box
Progress Bar
Horizontal/Vertical Line Control
Group Box
Text Field
Text Field Extensions
Formatted Field
Numeric Field
Currency Field
Date Field
Time Field
Pattern Field
Roadmap Control
Roadmap Item
Roadmap Controlmodel
Roadmap
File Control
File Picker
Message Box
The Toolkit Service
Dockable Windows
Creating Menus
Accessibility
Rendering
Summarizing Example to Create a UNO Dialog
20 OpenOffice.org API-Design-Guidelines
General Design Rules
Universality
Orthogonality
Inheritance
Uniformity
Correct English
Identifier Naming Convention
Definition of API Elements
Attributes
Naming
Usage
Methods
Naming
Usage
Interfaces
Naming
Usage
Properties
Naming
Usage
Events
Naming
Usage
Services
Naming
Usage
Exceptions
Naming
Usage
Enums
Naming
Usage
Typedefs
Naming
Usage
Structs
Naming
Usage
Parameter
Naming
Usage
Special Cases
Error Handling (Exceptions/Error-Codes)
Collection Interfaces
Postfix Document for Document-like Components
Postfixes Start/End vs. Begin/End
Abbreviations
Source Files and Types
21 IDL Documentation Guidelines
Process
File Assembly
Readable & Editable Structure
Contents
File structure
General
Character Set and Special Characters
Completeness of Sentences
Indentation
Delimiters
File-Header
File-Footer
Element Documentation
General Element Documentation
Main Description
@-Tagged Part
Example for a Major Element Documentation
Example for a Minor Element Documentation
Special Markups
,
Special Documentation Tags
@author Name of the Author
@since Product Version
@see qualifiedIdentifier
@param ParameterName
@return/@returns
@throws qualifiedException
@version VersionNumber
Useful XHTML Tags
Line Break:
Definition List: - ...
- ...
...
Strong Emphasis: ...
Slight Emphasis: ...
22 Universal Content Providers
The Hierarchy Content Provider
HCP Contents
Creation of New HCP Content
URL Scheme for HCP Contents
Commands and Properties
The File Content Provider
File Contents
Creation of New File Contents
URL Schemes for File Contents
The vnd.sun.star.wfs URL Scheme
Commands and Properties
The FTP Content Provider
FTP Contents
Creation of New FTP Content
URL Scheme for FTP Contents
Commands and Properties
The WebDAV Content Provider
DCP Contents
Creation of New DCP Contents
Authentication
Property Handling
Namespaces
DAV / UCB Property Mapping
URL Scheme for DCP Contents
Commands and Properties
The Package Content Provider
PCP Contents
Creation of New PCP Contents
URL Scheme for PCP Contents
Commands and Properties
The Help Content Provider
Help Content Provider Contents
URL Scheme for Help Contents
Properties and Commands
Module Content
XHTML Content or Picture Content
23 UNOIDL Syntax Specification
24 Glossary
A
B
C
D
E
F
G
H
I
J / K
L
M / N
O
P
Q
R
S
T
U
V
W
X / Y / Z