[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - librelogo/source

László Németh nemeth at numbertext.org
Tue Oct 29 13:04:12 CET 2013


 librelogo/source/LibreLogo/LibreLogo.py |   36 ++++++++++++++++++++++++++------
 1 file changed, 30 insertions(+), 6 deletions(-)

New commits:
commit 1d0c9f7d6bca4aedfc791681efdcf60c97654204
Author: László Németh <nemeth at numbertext.org>
Date:   Fri Oct 25 11:46:45 2013 +0200

    fdo#70858 librelogo: fix Logo program halt at font settings (Windows)
    
    Change-Id: I3c51ba693caa80c8b530a9eee932a48a125e2eca
    (cherry picked from commit 317d255aa7f1497cdfb929b884066202f721672c)
    Reviewed-on: https://gerrit.libreoffice.org/6431
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index 1367f3b..c0c6447 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -1313,6 +1313,30 @@ def __float__(x): # handle eg. float("10,5cm")
         x = eval(x)
     return float(x)
 
+def fontheight(n = -1):
+    if n != -1:
+        _.fontheight = n
+    else:
+        return _.fontheight
+
+def fontweight(n = -1):
+    if n != -1:
+        _.fontweight = n
+    else:
+        return _.fontweight
+
+def fontfamily(s = -1):
+    if s != -1:
+        _.fontfamily = s
+    else:
+        return _.fontfamily
+
+def fontstyle(n = -1):
+    if n != -1:
+        _.fontstyle = n
+    else:
+        return _.fontstyle
+
 def __loadlang__(lang, a):
     global comp, __colors__
     __colors__[lang] = {}
@@ -1383,13 +1407,13 @@ def __loadlang__(lang, a):
     [r"(?<!:)\b(?:%s)(\s+|$)" % a['FILLCOLOR'], "\n)fillcolor("],
     [r"(?<!:)\b(?:%s)(\s+|$)" % a['FILLSTYLE'], "\n)fillstyle("],
     [r"(?<!:)\b(?:%s)(\s+|$)" % a['FONTCOLOR'], "\n)fontcolor("],
-    [r"(?<!:)\b(?:%s)(\s+|$)" % a['FONTFAMILY'], "\nglobal _\n_.fontfamily="],
-    [r"(?<!:)\b(?:%s)(\s+|$)" % a['FONTHEIGHT'], "\nglobal _\n_.fontheight="],
-    [r"(?<!:)\b(?:%s)(\s+|$)" % a['FONTWEIGHT'], "\nglobal _\n_.fontweight="],
-    [r"(?<!:)\b(?:%s)(\s+|$)" % a['FONTSTYLE'], "\nglobal _\n_.fontstyle="],
+    [r"(?<!:)\b(?:%s)(\s+|$)" % a['FONTFAMILY'], "\n)fontfamily("],
+    [r"(?<!:)\b(?:%s)(\s+|$)" % a['FONTHEIGHT'], "\n)fontheight("],
+    [r"(?<!:)\b(?:%s)(\s+|$)" % a['FONTWEIGHT'], "\n)fontweight("],
+    [r"(?<!:)\b(?:%s)(\s+|$)" % a['FONTSTYLE'], "\n)fontstyle("],
     [r"(?<!:)\b(?:%s)(\s+|$)" % a['PENWIDTH'], "\n)pensize("],
-    [r"(?<!:)\b(?:%s)\b" % a['PENDOWN'], "\nglobal _\n__pen__(1)"],
-    [r"(?<!:)\b(?:%s)\b" % a['PENUP'], "\nglobal _\n__pen__(0)"],
+    [r"(?<!:)\b(?:%s)\b" % a['PENDOWN'], "\n__pen__(1)"],
+    [r"(?<!:)\b(?:%s)\b" % a['PENUP'], "\n__pen__(0)"],
     [r"(?<!:)\b(?:%s)\b" % a['HIDETURTLE'], "\nhideturtle()"],
     [r"(?<!:)\b(?:%s)\b" % a['SHOWTURTLE'], "\nshowturtle()"],
     [r"(?<!:)\b(?:%s)\b\[" % a['POSITION'], "position()["],


More information about the Libreoffice-commits mailing list