LibreOffice LibreOffice 25.2 SDK API Reference

Public Member Functions | List of all members
XComponentContext Interface Referencepublished

Component context to be passed to a component via com::sun::star::lang::XSingleComponentFactory. More...

`import"XComponentContext.idl";`

Inheritance diagram for XComponentContext:

## Public Member Functions
any | getValueByName ([in] string Name)
| Gets a value from the context. More...
com::sun::star::lang::XMultiComponentFactory | getServiceManager ()
| Gets the service manager instance to be used from key `/singletons/com.sun.star.lang.theServiceManager`. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

Component context to be passed to a component via com::sun::star::lang::XSingleComponentFactory.

Arbitrary values (e.g. deployment values) can be retrieved from the context.

Developers Guide
  Professional UNO - Service Manager and Component Context
  First Steps - First Contact - Getting Started
  Professional UNO - Java - Getting a Service Manager
  Professional UNO - C++ - Establishing Interprocess Connections
  Professional UNO - UNO Interprocess Connections
  Professional UNO - C++ - Transparent Use of Office UNO Components
  Professional UNO - Java - Transparent Use of Office UNO Components

## Member Function Documentation

## ◆ getServiceManager()

com::sun::star::lang::XMultiComponentFactory getServiceManager | ( |  | ) |

Gets the service manager instance to be used from key `/singletons/com.sun.star.lang.theServiceManager`.

This method has been added for convenience, because the service manager is used very often.

Returns
  service manager; throws DeploymentException in case service manager is null

## ◆ getValueByName()

any getValueByName | ( | [in] string | Name | ) |

Gets a value from the context.

Parameters

  Name | name of value

Returns
  value

The documentation for this interface was generated from the following file:

- com/sun/star/uno/XComponentContext.idl