Files
odfstudio/wizards/source/scriptforge/python
Jean-Pierre Ledure 992b393be8 ScriptForge - (scriptforge.py) ignore PythonShell in bridge mode
Bridge mode = python dialogs with LO process via socket.

Behaviour before actual patch:
  the exception.PythonShell() method gives a Python error on the
     from apso_utils import console
  statement, because the APSO libraries are not in the
  pythonpath.
  (They are set in the path by the exension in macro mode)

New behaviour:
  the exception.PythonShell() method does nothing,
  the import statement is not executed, hence no error.

The rationale behind is:
  - in bridge mode, the macro run is started in practice
    from either a Python console or an IDE console
    that receive evntual print() statements outputs
  - there is no need for an APSO console that, anyway, should
    not receive any output of print() statements, except
    if redirection of the output towards the APSO console
    (run in the [LO] process) was possible, quod non.
  - the same script may be executed in both bridge and macro modes
    without change

Change-Id: Id7c8eb19cd074bf39f470d84b5eb48880e908f39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139772
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2022-09-11 17:31:34 +02:00
..