ooodev.adapter.document.storage_change_listener module

class ooodev.adapter.document.storage_change_listener.StorageChangeListener(trigger_args=None, subscriber=None)[source]

Bases: AdapterBase, XStorageChangeListener

allows to be notified when a document is switched to a new storage.

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

Any

__init__(trigger_args=None, subscriber=None)[source]

Constructor

Parameters:
  • trigger_args (GenericArgs, Optional) – Args that are passed to events when they are triggered.

  • subscriber (XStorageBasedDocument, optional) – An UNO object that implements the XStorageBasedDocument interface. If passed in then this listener instance is automatically added to it.

Return type:

None

notifyStorageChange(document, storage)[source]

Event is invoked when document switches to another storage.

When this method is triggered it raises the notifyStorageChange event. The event data is a dictionary with the following keys:

  • document: The document that is being switched to another storage.

  • storage: The new storage that the document is being switched to.

Return type:

None

Parameters:
  • document (com.sun.star.uno.XInterface) –

  • storage (com.sun.star.embed.XStorage) –