ooodev.adapter.document.document_event_broadcaster_partial module
- class ooodev.adapter.document.document_event_broadcaster_partial.DocumentEventBroadcasterPartial(component, interface=com.sun.star.document.XDocumentEventBroadcaster)[source]
Bases:
objectPartial class for XDocumentEventBroadcaster.
- Parameters:
component (XDocumentEventBroadcaster) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.document.XDocumentEventBroadcaster)[source]
Constructor
- Parameters:
component (XDocumentEventBroadcaster) – UNO Component that implements
com.sun.star.container.XDocumentEventBroadcasterinterface.interface (UnoInterface, optional) – The interface to be validated. Defaults to
XDocumentEventBroadcaster.
- Return type:
None
- add_document_event_listener(listener)[source]
Registers a listener which is notified about document events
- Return type:
None- Parameters:
listener (com.sun.star.document.XDocumentEventListener) –
- notify_document_event(event_name, view_controller, supplement)[source]
Causes the broadcaster to notify all registered listeners of the given event
The method will create a DocumentEvent instance with the given parameters, and fill in the Source member (denoting the broadcaster) as appropriate.
Whether the actual notification happens synchronously or asynchronously is up to the implementor of this method. However, implementations are encouraged to specify this, for the list of supported event types, in their service contract.
Implementations might also decide to limit the list of allowed events (means event names) at their own discretion. Again, in this case they’re encouraged to document this in their service contract.
- Raises:
com.sun.star.lang.IllegalArgumentException –
IllegalArgumentExceptioncom.sun.star.lang.NoSupportException –
NoSupportException
- Return type:
None- Parameters:
event_name (str) –
view_controller (com.sun.star.frame.XController2) –
supplement (Any) –