ooodev.adapter.ucb.command_processor_partial module
- class ooodev.adapter.ucb.command_processor_partial.CommandProcessorPartial(component, interface=com.sun.star.ucb.XCommandProcessor)[source]
Bases:
object
Partial Class XCommandProcessor.
- Parameters:
component (XCommandProcessor) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.ucb.XCommandProcessor)[source]
Constructor
- Parameters:
component (XCommandProcessor) – UNO Component that implements
com.sun.star.ucb.XCommandProcessor
interface.interface (UnoInterface, optional) – The interface to be validated. Defaults to
XCommandProcessor
.
- Return type:
None
- abort(cmd_id)[source]
ends the command associated with the given id.
Not every command can be aborted. It’s up to the implementation to decide whether this method will actually end the processing of the command or simply do nothing.
- Return type:
None
- Parameters:
cmd_id (int) –
- create_command_identifier()[source]
Creates a unique identifier for a command.
This identifier can be used to abort the execution of the command associated with that identifier. Note that it is generally not necessary to obtain a new id for each command, because commands are executed synchronously. So the id for a command is valid again after a command previously associated with this id has finished. In fact you only should get one identifier per thread and assign it to every command executed by that thread.
Also, after a call to
abort()
, an identifier should not be used any longer (and instead be released by a call toXCommandProcessor2.releaseCommandIdentifier()
), because it may well abort all further calls toexecute()
.To avoid ever-increasing resource consumption, the identifier should be released via
XCommandProcessor2.releaseCommandIdentifier()
when it is no longer used.- Return type:
int
- execute(cmd, cmd_id, env)[source]
Executes a command.
Common command definitions can be found in the specification of the service Content.
- Raises:
com.sun.star.uno.Exception –
Exception
CommandAbortedException –
CommandAbortedException
- Return type:
Any
- Parameters:
cmd (com.sun.star.ucb.Command) –
cmd_id (int) –
env (com.sun.star.ucb.XCommandEnvironment) –