diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2023-01-27 16:39:42 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2023-01-27 16:54:19 +0000 |
commit | 96302e0bbadfe3ed33af4a14a33a44bab3f5f0d4 (patch) | |
tree | 77c1b075e25b54001a03ebbe51dc21d9a14a066f /wizards/source/scriptforge | |
parent | 46becac127859a742e1f702bcde718304efcde69 (diff) |
ScriptForge (SF_Document) Echo() method freezes screen updates
While a script is executed any display update
resulting from that execution is done immediately.
For performance reasons it might be an advantage
to differ the display updates up to the end of the script.
This is where pairs of Echo() methods to set
and reset the removal of the immediate updates
may be beneficial.
Optionally the actual mouse pointer can be
modified to the image of an hourglass.
Arguments:
EchoOn: when False, the display updates are suspended.
Default = True.
Multiple calls with EchoOn = False are harmless.
Hourglass: when True, the mouse pointer is changed
to an hourglass. Default = False.
The mouse pointer needs to be inside the actual
document's window.
Note that it is very likely that at the least
manual movement of the mouse, the operating system
or the LibreOffice process will take back
the control of the mouse icon and its usual behaviour.
The method may be called from any document, including Calc and
Writer, or form document.
It may be invoked from Basic and Python user scripts.
Echo() should be documented in the sfdocument.xhp help page.
Change-Id: I4d669f5e332131bd1b2efcd33b7a98b304796ad1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146258
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Diffstat (limited to 'wizards/source/scriptforge')
-rw-r--r-- | wizards/source/scriptforge/python/scriptforge.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wizards/source/scriptforge/python/scriptforge.py b/wizards/source/scriptforge/python/scriptforge.py index 7abd8ff67716..a67dca437fd1 100644 --- a/wizards/source/scriptforge/python/scriptforge.py +++ b/wizards/source/scriptforge/python/scriptforge.py @@ -1993,6 +1993,9 @@ class SFDocuments: def CreateMenu(self, menuheader, before = '', submenuchar = '>'): return self.ExecMethod(self.vbMethod, 'CreateMenu', menuheader, before, submenuchar) + def Echo(self, echoon = True, hourglass = False): + return self.ExecMethod(self.vbMethod, 'Echo', echoon, hourglass) + def ExportAsPDF(self, filename, overwrite = False, pages = '', password = '', watermark = ''): return self.ExecMethod(self.vbMethod, 'ExportAsPDF', filename, overwrite, pages, password, watermark) |