LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XConfiguration Interface Reference

A configuration describes the resources of an application like panes, views, and tool bars and their relationships that are currently active or are requested to be activated. More...

import"XConfiguration.idl";

Inheritance diagram for XConfiguration:
XCloneable XInterface

Public Member Functions

sequence< XResourceIdgetResources ([in] XResourceId xAnchorId, [in] string sTargetURLPrefix, [in] AnchorBindingMode eSearchMode)
 Returns the list of resources that are bound directly and/or indirectly to the given anchor. More...
 
boolean hasResource ([in] XResourceId xResourceId)
 
void addResource ([in] XResourceId xResourceId)
 Add a resource to the configuration. More...
 
void removeResource ([in] XResourceId xResourceId)
 Remove a resource from the configuration. More...
 
- Public Member Functions inherited from XCloneable
com::sun::star::util::XCloneable createClone ()
 creates a copy of the object. 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

A configuration describes the resources of an application like panes, views, and tool bars and their relationships that are currently active or are requested to be activated.

Resources are specified by ResourceId structures rather than references so that not only the current configuration but also a requested configuration can be represented.

Direct manipulation of a configuration object is not advised with the exception of the ConfigurationController and objects that implement the XConfigurationChangeRequest interface.

See also
XConfigurationController

Member Function Documentation

◆ addResource()

void addResource ( [in] XResourceId  xResourceId)

Add a resource to the configuration.

This method should be used only by objects that implement the XConfigurationRequest interface or by the configuration controller.

Parameters
xResourceIdThe resource to add to the configuration. When the specified resource is already part of the configuration then this call is silently ignored.
Exceptions
IllegalArgumentExceptionWhen an empty resource id is given then an IllegalArgumentException is thrown.

◆ getResources()

sequence<XResourceId> getResources ( [in] XResourceId  xAnchorId,
[in] string  sTargetURLPrefix,
[in] AnchorBindingMode  eSearchMode 
)

Returns the list of resources that are bound directly and/or indirectly to the given anchor.

A URL filter can reduce the set of returned resource ids.

Parameters
xAnchorIdThis anchor typically is either a pane or an empty XResourceId object. An empty reference is treated like an XResourceId object.
sTargetURLPrefixWhen a non-empty string is given then resource ids are returned only when their resource URL matches this prefix, i.e. when it begins with this prefix or is equal to it. Characters with special meaning to URLs are not interpreted. In the typical usage the prefix specifies the type of a resource. A typical value is "private:resource/floater/", which is the prefix for pane URLs. In a recursive search, only resource ids at the top level are matched against this prefix.

Use an empty string to prevent filtering out resource ids.

Parameters
eSearchModeThis flag defines whether to return only resources that are directly bound to the given anchor or a recursive search is to be made. Note that for the recursive search and an empty anchor all resource ids are returned that belong to the configuration.
Returns
The set of returned resource ids may be empty when there are no resource ids that match all conditions. The resources in the sequence are ordered with respect to the XResourceId::compareTo() method.

◆ hasResource()

boolean hasResource ( [in] XResourceId  xResourceId)

Returns whether the specified resource is part of the configuration.

This is independent of whether the resource does really exist and is active, i.e. has a visible representation in the GUI.

Parameters
xResourceIdThe id of a resource. May be empty (empty reference or empty XResourceId object) in which case FALSE is returned.
Returns
Returns TRUE when the resource is part of the configuration and FALSE when it is not.

◆ removeResource()

void removeResource ( [in] XResourceId  xResourceId)

Remove a resource from the configuration.

This method should be used only by objects that implement the XConfigurationRequest interface or by the configuration controller.

Parameters
xResourceIdThe resource to remove from the configuration. When the specified resource is not part of the configuration then this call is silently ignored.
Exceptions
IllegalArgumentExceptionWhen an empty resource id is given then an IllegalArgumentException is thrown.

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