Closing a Connection.................................................................................................126
Example: A Connection Aware Client.........................................................................127
Service Manager and Component Context................................................................129
Service Manager........................................................................................................130
XMultiServiceFactory Interface ............................................................................130
XContentEnumerationAccess Interface ...............................................................131
XSet Interface ......................................................................................................132
Component Context...................................................................................................132
ComponentContext API .......................................................................................133
Availability.............................................................................................................135
Compatibility Issues and Migration Path...............................................................136
Using UNO Interfaces................................................................................................137
Properties...................................................................................................................140
Collections and Containers........................................................................................146
Event Model...............................................................................................................148
Exception Handling....................................................................................................150
User-Defined Exceptions .....................................................................................150
Runtime Exceptions .............................................................................................151
Good Exception Handling ....................................................................................152
Lifetime of UNO objects.............................................................................................154
acquire() and release()...............................................................................................154
The XComponent Interface........................................................................................155
Children of the XEventListener Interface....................................................................158
Weak Objects and References..................................................................................158
Differences Between the Lifetime of C++ and Java Objects......................................159
Object Identity............................................................................................................161
UNO Language Bindings...........................................................................................162
Java Language Binding..............................................................................................162
Getting a Service Manager........................................................................................163
Transparent Use of Office UNO Components............................................................165
The bootstrap method...........................................................................................165
SDK tooling ..........................................................................................................166
Finding a UNO Installation ...................................................................................167
Handling Interfaces....................................................................................................168
Type Mappings...........................................................................................................170
Mapping of Simple Types .....................................................................................170
Mapping of String .................................................................................................171
Mapping of Type ..................................................................................................171
Mapping of Any ....................................................................................................171
Mapping of Sequence Types......................................................................................173
Mapping of Enum Types............................................................................................174