[Libreoffice-commits] core.git: librelogo/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Nov 5 15:27:28 UTC 2018


 librelogo/source/LibreLogo/LibreLogo.py |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 8537d88d4f13bf5b4a6f556a9742d4e0dab316bb
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Mon Oct 29 13:18:30 2018 +0100
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Mon Nov 5 16:22:13 2018 +0100

    LibreLogo: stop program immediately at pressing Cancel
    
    button of the inputbox or messagebox dialog window, instead
    of waiting for the next __checkhalt__() in a loop.
    
    Change-Id: I1366ad06152e70321a21e78a626f7a89eb5a7ea0
    Reviewed-on: https://gerrit.libreoffice.org/62900
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>

diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index 626c5d210f09..103b6061244e 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -303,10 +303,13 @@ def Input(s):
         if inputtext:
             inputtext = e.Text
         else:
+            # Cancel button
             __halt__ = True
 
         # dispose the dialog
         controlContainer.dispose()
+        # stop program at pressing Cancel
+        __checkhalt__()
         return inputtext
     except Exception:
         __trace__()
@@ -333,7 +336,9 @@ def Print(s):
     global __halt__
     s = __string__(s, _.decimal)
     if not MessageBox(_.doc.CurrentController.Frame.ContainerWindow, s[:500] + s[500:5000].replace('\n', ' '), "", "messbox", __OK_CANCEL__):
+        # stop program at pressing Cancel
         __halt__ = True
+        __checkhalt__()
 
 def MessageBox(parent, message, title, msgtype = "messbox", buttons = __OK__):
     msgtypes = ("messbox", "infobox", "errorbox", "warningbox", "querybox")


More information about the Libreoffice-commits mailing list