ooodev.adapter.frame.dispatch_partial module

class ooodev.adapter.frame.dispatch_partial.DispatchPartial(component, interface=com.sun.star.frame.XDispatch)[source]

Bases: object

Partial class for XDispatch.

Parameters:
  • component (XDispatch) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.frame.XDispatch)[source]

Constructor

Parameters:
  • component (XDispatch) – UNO Component that implements com.sun.star.frame.XDispatch interface.

  • interface (UnoInterface, optional) – The interface to be validated. Defaults to XDispatch.

Return type:

None

add_status_listener(control, url)[source]

Registers a listener of a control for a specific URL at this object to receive status events.

It is only allowed to register URLs for which this XDispatch was explicitly queried. Additional arguments (#... or ?...) will be ignored.

Note: Notifications can’t be guaranteed! This will be a part of interface XNotifyingDispatch.

Return type:

None

Parameters:
  • control (com.sun.star.frame.XStatusListener) –

  • url (com.sun.star.util.URL) –

dispatch(url, *args)[source]

dispatches (executes) a URL

It is only allowed to dispatch URLs for which this XDispatch was explicitly queried. Additional arguments (#... or ?...) are allowed.

Controlling synchronous or asynchronous mode happens via readonly boolean Flag SynchronMode

By default, and absent any arguments, SynchronMode is considered False and the execution is performed asynchronously (i.e. dispatch() returns immediately, and the action is performed in the background). But when set to True, dispatch() processes the request synchronously

Return type:

None

Parameters:
  • url (com.sun.star.util.URL) –

  • args (PropertyValue) –

remove_status_listener(Control, url)[source]

unregisters a listener from a control.

Return type:

None

Parameters:
  • Control (com.sun.star.frame.XStatusListener) –

  • url (com.sun.star.util.URL) –