Contents
| 1 | Reader's Guide |
| 1.1 | What This Manual Covers |
| 1.2 | How This Book is Organized |
| 1.3 | OpenOffice.org Version History |
| 1.4 | Related documentation |
| 1.5 | Conventions |
| 1.6 | Acknowledgments |
| 2 | First Steps |
| 2.1 | Programming with UNO |
| 2.2 | Fields of Application for UNO |
| 2.3 | Getting Started |
| 2.3.1 | Required Files |
| 2.3.2 | Installation Sets |
| 2.3.3 | Configuration |
| Enable Java in OpenOffice.org |
| Use Java UNO class files |
| Add the API Reference to your IDE |
| 2.3.4 | First Contact |
| Getting Started |
| Service Managers |
| Failed Connections |
| 2.4 | How to get Objects in OpenOffice.org |
| 2.5 | Working with Objects |
| 2.5.1 | Objects, Interfaces, and Services |
| Objects |
| Interfaces |
| Services |
| 2.5.2 | Using Services |
| Using Interfaces |
| Using Properties |
| 2.5.3 | Example: Working with a Spreadsheet Document |
| 2.5.4 | Common Types |
| Basic Types |
| Strings |
| Enum Types and Groups of Constants |
| 2.5.5 | Struct |
| 2.5.6 | Any |
| 2.5.7 | Sequence |
| 2.5.8 | Element Access |
| Name Access |
| Index Access |
| Enumeration Access |
| 2.6 | How do I know Which Type I Have? |
| 2.7 | Example: Hello Text, Hello Table, Hello Shape |
| 2.7.1 | Common Mechanisms for Text, Tables and Drawings |
| 2.7.2 | Creating Text, Tables and Drawing Shapes |
| Text, Tables and Drawings in Writer |
| Text, Tables and Drawings in Calc |
| Drawings and Text in Draw |
| 3 | Professional UNO |
| 3.1 | Introduction |
| 3.2 | API Concepts |
| 3.2.1 | Data Types |
| Simple Types |
| The Any Type |
| Interfaces |
| Services |
| Structs |
| Predefined Values |
| Sequences |
| Modules |
| Exceptions |
| Singletons |
| 3.2.2 | Understanding the API Reference |
| Specification, Implementation and Instances |
| Object Composition |
| 3.3 | UNO Concepts |
| 3.3.1 | 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 |
| 3.3.2 | Service Manager and Component Context |
| Service Manager |
| Component Context |
| 3.3.3 | Using UNO Interfaces |
| 3.3.4 | Properties |
| 3.3.5 | Collections and Containers |
| 3.3.6 | Event Model |
| 3.3.7 | Exception Handling |
| User-Defined Exceptions |
| Runtime Exceptions |
| Good Exception Handling |
| 3.3.8 | 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 |
| 3.3.9 | Object Identity |
| 3.4 | UNO Language Bindings |
| 3.4.1 | Java Language Binding |
| Getting a Service Manager |
| Transparent Use of Office UNO Components |
| Handling Interfaces |
| Type Mappings |
| 3.4.2 | 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 |
| Type Mappings |
| Using Weak References |
| Exception Handling in C++ |
| 3.4.3 | OpenOffice.org Basic |
| Handling UNO Objects |
| Mapping of UNO and Basic Types |
| Case Sensitivity |
| Exception Handling |
| Listeners |
| 3.4.4 | Automation Bridge |
| Introduction |
| Requirements |
| A Quick Tour |
| The Service Manager Component |
| Using UNO from Automation |
| Using Automation Objects From UNO |
| Type Mappings |
| Automation Objects with UNO Interfaces |
| DCOM |
| The Bridge Services |
| Unsupported COM Features |
| 3.4.5 | CLI Language Binding |
| About the Language Binding |
| Terms |
| Requirements |
| The Language Binding DLLs |
| Type Mapping |
| Lifetime Management and Obtaining Interfaces |
| Writing Client Programs |
| 4 | Writing UNO Components |
| 4.1 | Required Files |
| 4.2 | Using UNOIDL to Specify New Components |
| 4.2.1 | Writing the Specification |
| Preprocessing |
| Grouping Definitions in Modules |
| Simple Types |
| Defining an Interface |
| Defining a Service |
| Defining a Sequence |
| Defining a Struct |
| Defining an Exception |
| Predefining Values |
| Using Comments |
| Singleton |
| Reserved Types |
| Published Entities |
| 4.2.2 | Generating Source Code from UNOIDL Definitions |
| 4.3 | Component Architecture |
| 4.4 | Core Interfaces to Implement |
| 4.4.1 | XInterface |
| Requirements for queryInterface() |
| Reference Counting |
| 4.4.2 | XTypeProvider |
| Provided Types |
| ImplementationID |
| 4.4.3 | XServiceInfo |
| Implementation Name |
| Supported Service Names |
| 4.4.4 | XWeak |
| 4.4.5 | XComponent |
| Disposing of an XComponent |
| 4.4.6 | XInitialization |
| 4.4.7 | XMain |
| 4.4.8 | XAggregation |
| 4.4.9 | XUnoTunnel |
| 4.5 | Simple Component in Java |
| 4.5.1 | Class Definition with Helper Classes |
| XInterface, XTypeProvider and XWeak |
| XServiceInfo |
| 4.5.2 | Implementing your own Interfaces |
| 4.5.3 | Providing a Single Factory Using Helper Method |
| 4.5.4 | Write Registration Info Using Helper Method |
| 4.5.5 | Implementing without Helpers |
| XInterface |
| XTypeProvider |
| XComponent |
| 4.5.6 | Storing the Service Manager for Further Use |
| 4.5.7 | Create Instance with Arguments |
| 4.5.8 | Possible Structures for Java Components |
| One Implementation per Component File |
| Multiple Implementations per Component File |
| 4.5.9 | Running and Debugging Java Components |
| Debugging |
| The Java Environment in OpenOffice.org |
| Troubleshooting |
| 4.6 | C++ Component |
| 4.6.1 | Class Definition with Helper Template Classes |
| XInterface, XTypeProvider and XWeak |
| XServiceInfo |
| 4.6.2 | Implementing your own Interfaces |
| 4.6.3 | Providing a Single Factory Using a Helper Method |
| 4.6.4 | Write Registration Info Using a Helper Method |
| 4.6.5 | Provide Implementation Environment |
| 4.6.6 | Implementing without Helpers |
| XInterface Implementation |
| XTypeProvider Implementation |
| Providing a Single Factory |
| Write Registration Info |
| 4.6.7 | Storing the Service Manager for Further Use |
| 4.6.8 | Create Instance with Arguments |
| 4.6.9 | Multiple Components in One Dynamic Link Library |
| 4.6.10 | Building and Testing C++ Components |
| Build Process |
| Test Registration and Use |
| 4.7 | Integrating Components into OpenOffice.org |
| 4.7.1 | Protocol Handler |
| Overview |
| Implementation |
| Configuration |
| Installation |
| 4.7.2 | Jobs |
| Overview |
| Execution Environment |
| Implementation |
| Initialization |
| Returning Results |
| Configuration |
| Installation |
| Using the vnd.sun.star.jobs: URL Schema |
| List of supported Events |
| 4.7.3 | Add-Ons |
| Overview |
| Guidelines |
| Configuration |
| Installation |
| 4.7.4 | Disable Commands |
| Configuration |
| Disabling Commands at Runtime |
| 4.7.5 | Intercepting Context Menus |
| Register and Remove an Interceptor |
| Writing an Interceptor |
| 4.8 | File Naming Conventions |
| 4.9 | Deployment Options for Components |
| 4.9.1 | Background: UNO Registries |
| UNO Type Library |
| Component Registration |
| 4.9.2 | Command Line Registry Tools |
| Component Registration Tool |
| UNO Type Library Tools |
| 4.9.3 | Manual Component Installation |
| Manually Merging a Registry and Adding it to uno.ini or soffice.ini |
| 4.9.4 | Bootstrapping a Service Manager |
| 4.9.5 | Special Service Manager Configurations |
| Dynamically Modifying the Service Manager |
| Creating a ServiceManager from a Given Registry File |
| 4.10 | The UNO Executable |
| Standalone Use Case |
| Server Use Case |
| Using the uno Executable |
| 4.11 | Accessing Dialogs |
| 4.11.1 | Assigning Component Methods to Control Events |
| 4.11.2 | Using Dialogs in Components |
| Instantiate and display a dialog |
| Accept events created by dialog controls |
| 5 | Extensions |
| 5.1 | Extension Manager |
| 5.1.1 | Deployment Items |
| 5.1.2 | Installing Extensions for All or a Single User |
| 5.1.3 | Extension Manager in OpenOffice.org |
| 5.1.4 | unopkg |
| 5.1.5 | Location of installed Extensions |
| 5.2 | File Format |
| 5.3 | Extension Identifiers |
| 5.4 | Extension Versions |
| 5.5 | description.xml |
| 5.5.1 | Description of XML Elements |
| 5.5.2 | Example |
| 5.6 | Simple License |
| 5.6.1 | Determining the Locale of the License |
| 5.7 | Dependencies |
| 5.8 | System Integration |
| 5.9 | Online Update of Extensions |
| 5.9.1 | Running Online - Update |
| 5.9.2 | Concept |
| 5.9.3 | Example Scenario for Providing Updates |
| Using an Atom Feed |
| 5.9.4 | Migration of Update Information |
| 5.9.5 | Description of the Update Information |
| 5.9.6 | Description of Atom Feed |
| 5.9.7 | Examples |
| description.xml Containing Direct Reference to the Update Information |
| Using the Atom Feed |
| 5.10 | Options Dialog |
| 5.11 | Creating the GUI of the Options Page |
| 5.12 | Saving and Reading Data for the Options Page |
| 5.13 | Defining the Usage of Options Pages |
| 5.13.1 | The Options Dialog of the Extension Manager |
| 5.13.2 | Adding a Leaf to an Existing Node |
| 5.13.3 | Adding Several Leaves |
| 5.13.4 | Grouping of Leaves |
| 5.13.5 | Adding Nodes |
| 5.13.6 | Adding Several Nodes |
| 5.13.7 | Absolute Position of Leaves |
| 5.13.8 | Grouping of Nodes |
| 5.13.9 | Assigning Nodes to Modules |
| 5.13.10 | Defining a Module |
| 5.13.11 | Absolute Position of Nodes |
| 6 | Advanced UNO |
| 6.1 | Choosing an Implementation Language |
| 6.1.1 | Supported Programming Environments |
| Java |
| C++ |
| OpenOffice.org Basic |
| OLE Automation Bridge |
| Python |
| 6.1.2 | Use Cases |
| Java |
| C++ |
| OpenOffice.org Basic |
| OLE Automation |
| Python |
| 6.1.3 | Recommendation |
| 6.2 | Language Bindings |
| 6.2.1 | Implementing UNO Language Bindings |
| Overview of Language Bindings and Bridges |
| Implementation Options |
| 6.2.2 | UNO C++ bridges |
| Binary UNO Interfaces |
| C++ Proxy |
| Binary UNO Proxy |
| Additional Hints |
| 6.2.3 | UNO Reflection API |
| XTypeProvider Interface |
| Converter Service |
| CoreReflection Service |
| 6.2.4 | XInvocation Bridge |
| Scripting Existing UNO Objects |
| Implementing UNO objects |
| Example: Python Bridge PyUNO |
| 6.2.5 | Implementation Loader |
| Shared Library Loader |
| Bridges |
| 6.2.6 | Help with New Language Bindings |
| 6.3 | Differences Between UNO and Corba |
| 6.4 | UNO Design Patterns and Coding Styles |
| 6.4.1 | Double-Checked Locking |
| 7 | Office Development |
| 7.1 | OpenOffice.org Application Environment |
| 7.1.1 | Overview |
| Desktop Environment |
| Framework API |
| 7.1.2 | Using the Desktop |
| 7.1.3 | Using the Component Framework |
| Getting Frames, Controllers and Models from Each Other |
| Frames |
| Controllers |
| Models |
| Window Interfaces |
| 7.1.4 | Creating Frames Manually |
| 7.1.5 | Handling Documents |
| Loading Documents |
| Closing Documents |
| Storing Documents |
| Printing Documents |
| 7.1.6 | Using the Dispatch Framework |
| Command URL |
| Processing Chain |
| Dispatch Process |
| Dispatch Results |
| Dispatch Interception |
| 7.1.7 | Java Window Integration |
| The Window Handle |
| Using the Window Handle |
| More Remote Problems |
| 7.2 | Common Application Features |
| 7.2.1 | Clipboard |
| Using the Clipboard |
| OpenOffice.org Clipboard Data Formats |
| 7.2.2 | Internationalization |
| Introduction |
| Overview and Using the API |
| Implementing a New Locale |
| 7.2.3 | Linguistics |
| Services Overview |
| Using Spellchecker |
| Using Hyphenator |
| Using Thesaurus |
| Events |
| Implementing a Spell Checker |
| Implementing a Hyphenator |
| Implementing a Thesaurus |
| 7.2.4 | Integrating Import and Export Filters |
| Approaches |
| Document API Filter Development |
| XML Based Filter Development |
| 7.2.5 | Number Formats |
| Managing Number Formats |
| Applying Number Formats |
| 7.2.6 | Document Events |
| 7.2.7 | Path Organization |
| Path Settings |
| Path Variables |
| 7.2.8 | OpenOffice.org Single Sign-On API |
| Overview |
| Implementing the OpenOffice.org SSO API |
| 8 | Text Documents |
| 8.1 | Overview |
| 8.1.1 | Example: Fields in a Template |
| 8.1.2 | Example: Visible Cursor Position |
| 8.2 | Handling Text Document Files |
| 8.2.1 | Creating and Loading Text Documents |
| 8.2.2 | Saving Text Documents |
| Storing |
| Exporting |
| 8.2.3 | Printing Text Documents |
| Printer and Print Job Settings |
| Printing Multiple Pages on one Page |
| 8.3 | Working with Text Documents |
| 8.3.1 | Word Processing |
| Editing Text |
| Iterating over Text |
| Inserting a Paragraph where no Cursor can go |
| Sorting Text |
| Inserting Text Files |
| Auto Text |
| 8.3.2 | Formatting |
| 8.3.3 | Navigating |
| Cursors |
| Locating Text Contents |
| Search and Replace |
| 8.3.4 | Tables |
| Table Architecture |