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.
See also
- 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(xDocument, xStorage)[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:
xDocument (com.sun.star.uno.XInterface) –
xStorage (com.sun.star.embed.XStorage) –