summaryrefslogtreecommitdiff
path: root/librelogo
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-11-27 21:11:18 +0100
committerAndras Timar <atimar@suse.com>2012-11-28 21:22:47 +0100
commit78234602ceb6aaaff9996240b388be12fcff968f (patch)
treeab163b8dda42463167c1477638ce9d85bfb15e7f /librelogo
parent5c34ee433b9f1191d14d64214a923b321e667a4c (diff)
LibreLogo integration (extension -> normal code)
While efforts have been made to make LibreLogo work with Python 3.3, there are still a few bugs, for example large Logo programs do not run correctly and Translate button does not work. Bugfixing is in progress. Change-Id: I4227ff86084f51047861897189d2317322296139
Diffstat (limited to 'librelogo')
-rw-r--r--librelogo/Configuration_librelogo.mk20
-rw-r--r--librelogo/CustomTarget_librelogo.mk43
-rw-r--r--librelogo/Extension_librelogo.mk46
-rw-r--r--librelogo/Module_librelogo.mk4
-rw-r--r--librelogo/Zip_librelogo.mk49
-rw-r--r--librelogo/source/LibreLogo/LibreLogo.py267
-rw-r--r--librelogo/source/LibreLogoDummy.py24
-rw-r--r--librelogo/source/META-INF/manifest.xml9
-rw-r--r--librelogo/source/README43
-rw-r--r--librelogo/source/description-en-US.txt1
-rw-r--r--librelogo/source/description.xml20
-rw-r--r--librelogo/source/help/en-US/LibreLogo.xhp397
-rw-r--r--librelogo/source/help/en-US/help.tree18
-rw-r--r--librelogo/source/pythonpath/librelogodummy_path.py13
-rw-r--r--librelogo/source/registry/data/org/openoffice/Office/Addons.xcu286
-rw-r--r--librelogo/source/registry/data/org/openoffice/Office/UI/StartModuleWindowState.xcu28
-rw-r--r--librelogo/source/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu28
17 files changed, 233 insertions, 1063 deletions
diff --git a/librelogo/Configuration_librelogo.mk b/librelogo/Configuration_librelogo.mk
deleted file mode 100644
index cf2e6f45271d..000000000000
--- a/librelogo/Configuration_librelogo.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Configuration_Configuration,librelogo,nodeliver))
-
-$(eval $(call gb_Configuration_use_configuration,librelogo,registry))
-
-$(eval $(call gb_Configuration_add_localized_datas,librelogo,librelogo/source/registry/data,\
- org/openoffice/Office/Addons.xcu \
- org/openoffice/Office/UI/StartModuleWindowState.xcu \
- org/openoffice/Office/UI/WriterWindowState.xcu \
-))
-
-# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/librelogo/CustomTarget_librelogo.mk b/librelogo/CustomTarget_librelogo.mk
new file mode 100644
index 000000000000..903ca8ab5081
--- /dev/null
+++ b/librelogo/CustomTarget_librelogo.mk
@@ -0,0 +1,43 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,librelogo/locproperties))
+
+librelogo_DIR := $(call gb_CustomTarget_get_workdir,librelogo/locproperties)
+
+ifneq ($(strip $(gb_WITH_LANG)),)
+librelogo_LANGS := $(subst -,_,$(filter-out qtz,$(filter-out en-US,$(gb_WITH_LANG))))
+librelogo_LOCPROPERTIES := $(foreach lang,$(librelogo_LANGS),$(librelogo_DIR)/LibreLogo_$(lang).properties)
+else
+librelogo_LOCPROPERTIES :=
+endif
+
+librelogo_PROPMERGETARGET := $(call gb_Executable_get_target_for_build,propex)
+librelogo_PROPMERGECOMMAND := $(gb_Helper_set_ld_path) $(librelogo_PROPMERGETARGET)
+
+$(call gb_CustomTarget_get_target,librelogo/locproperties) : $(librelogo_LOCPROPERTIES)
+
+$(librelogo_DIR)/LibreLogo_%.properties : \
+ $(SRCDIR)/librelogo/source/pythonpath/LibreLogo_en_US.properties \
+ | $(librelogo_DIR)/.dir
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRP,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ LANG=$(subst _,-,$(subst $(librelogo_DIR)/LibreLogo_,,$(subst .properties,,$@))) && \
+ MERGEINPUT=`$(gb_MKTEMP)` && \
+ echo $(gb_POLOCATION)/$${LANG}/librelogo/source/pythonpath.po > $${MERGEINPUT} && \
+ $(librelogo_PROPMERGECOMMAND) \
+ -p librelogo \
+ -i $< \
+ -o $@ \
+ -m $${MERGEINPUT} \
+ -l $${LANG} && \
+ rm -rf $${MERGEINPUT} \
+ )
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/librelogo/Extension_librelogo.mk b/librelogo/Extension_librelogo.mk
deleted file mode 100644
index 8f525c3d449b..000000000000
--- a/librelogo/Extension_librelogo.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Extension_Extension,librelogo,librelogo/source))
-
-$(eval $(call gb_Extension_add_files,librelogo,icons,\
- $(SRCDIR)/librelogo/source/icons/lc_arrowshapes.circular-arrow.png \
- $(SRCDIR)/librelogo/source/icons/lc_arrowshapes.circular-leftarrow.png \
- $(SRCDIR)/librelogo/source/icons/lc_arrowshapes.down-arrow.png \
- $(SRCDIR)/librelogo/source/icons/lc_arrowshapes.up-arrow.png \
- $(SRCDIR)/librelogo/source/icons/lc_basicstop.png \
- $(SRCDIR)/librelogo/source/icons/lc_editglossary.png \
- $(SRCDIR)/librelogo/source/icons/lc_navigationbarleft.png \
- $(SRCDIR)/librelogo/source/icons/lc_newdoc.png \
- $(SRCDIR)/librelogo/source/icons/lc_runbasic.png \
- $(SRCDIR)/librelogo/source/icons/sc_arrowshapes.circular-arrow.png \
- $(SRCDIR)/librelogo/source/icons/sc_arrowshapes.circular-leftarrow.png \
- $(SRCDIR)/librelogo/source/icons/sc_arrowshapes.down-arrow.png \
- $(SRCDIR)/librelogo/source/icons/sc_arrowshapes.up-arrow.png \
- $(SRCDIR)/librelogo/source/icons/sc_basicstop.png \
- $(SRCDIR)/librelogo/source/icons/sc_editglossary.png \
- $(SRCDIR)/librelogo/source/icons/sc_navigationbarleft.png \
- $(SRCDIR)/librelogo/source/icons/sc_newdoc.png \
- $(SRCDIR)/librelogo/source/icons/sc_runbasic.png \
-))
-
-$(eval $(call gb_Extension_add_file,librelogo,LibreLogoDummy.py,$(SRCDIR)/librelogo/source/LibreLogoDummy.py))
-$(eval $(call gb_Extension_add_file,librelogo,pythonpath/librelogodummy_path.py,$(SRCDIR)/librelogo/source/pythonpath/librelogodummy_path.py))
-$(eval $(call gb_Extension_add_file,librelogo,LibreLogo/LibreLogo.py,$(SRCDIR)/librelogo/source/LibreLogo/LibreLogo.py))
-$(eval $(call gb_Extension_add_file,librelogo,Addons.xcu,$(call gb_XcuFile_for_extension,librelogo/source/registry/data/org/openoffice/Office/Addons.xcu)))
-$(eval $(call gb_Extension_add_file,librelogo,Office/UI/StartModuleWindowState.xcu,$(call gb_XcuFile_for_extension,librelogo/source/registry/data/org/openoffice/Office/UI/StartModuleWindowState.xcu)))
-$(eval $(call gb_Extension_add_file,librelogo,Office/UI/WriterWindowState.xcu,$(call gb_XcuFile_for_extension,librelogo/source/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu)))
-
-$(eval $(call gb_Extension_localize_properties,librelogo,pythonpath/LibreLogo_en_US.properties,$(SRCDIR)/librelogo/source/pythonpath/LibreLogo_en_US.properties))
-
-$(eval $(call gb_Extension_add_helpfile,librelogo,$(SRCDIR)/librelogo/source/help/en-US,org.openoffice.comp.pyuno.LibreLogo/LibreLogo.xhp,LibreLogo.xhp))
-
-$(eval $(call gb_Extension_add_helptreefile,librelogo,$(SRCDIR)/librelogo/source/help/en-US,help.tree,help.tree,org.openoffice.comp.pyuno.LibreLogo))
-
-# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/librelogo/Module_librelogo.mk b/librelogo/Module_librelogo.mk
index 6db9719138a0..caa4cf96efb0 100644
--- a/librelogo/Module_librelogo.mk
+++ b/librelogo/Module_librelogo.mk
@@ -13,8 +13,8 @@ ifneq ($(DISABLE_SCRIPTING),TRUE)
ifneq ($(DISABLE_PYTHON),TRUE)
$(eval $(call gb_Module_add_targets,librelogo,\
- Configuration_librelogo \
- Extension_librelogo \
+ CustomTarget_librelogo \
+ Zip_librelogo \
))
endif
diff --git a/librelogo/Zip_librelogo.mk b/librelogo/Zip_librelogo.mk
new file mode 100644
index 000000000000..617d0fd2ef8d
--- /dev/null
+++ b/librelogo/Zip_librelogo.mk
@@ -0,0 +1,49 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Zip_Zip,LibreLogo,$(WORKDIR)/Zip/LibreLogo))
+
+$(eval $(call gb_Zip_add_file,LibreLogo,python/LibreLogo/LibreLogo.py,\
+ $(SRCDIR)/librelogo/source/LibreLogo/LibreLogo.py \
+))
+
+$(eval $(call gb_Zip_add_file,LibreLogo,python/LibreLogo/LibreLogo_en_US.properties,\
+ $(SRCDIR)/librelogo/source/pythonpath/LibreLogo_en_US.properties \
+))
+
+librelogo_LANGS := $(subst -,_,$(filter-out qtz,$(filter-out en-US,$(gb_WITH_LANG))))
+
+$(eval $(foreach lang,$(librelogo_LANGS),\
+ $(call gb_Zip_add_file,LibreLogo,python/LibreLogo/LibreLogo_$(lang).properties,\
+ $(call gb_CustomTarget_get_workdir,librelogo/locproperties)/LibreLogo_$(lang).properties)))
+
+$(eval $(foreach icon,\
+ lc_arrowshapes.circular-arrow.png \
+ lc_arrowshapes.circular-leftarrow.png \
+ lc_arrowshapes.down-arrow.png \
+ lc_arrowshapes.up-arrow.png \
+ lc_basicstop.png \
+ lc_editglossary.png \
+ lc_navigationbarleft.png \
+ lc_newdoc.png \
+ lc_runbasic.png \
+ sc_arrowshapes.circular-arrow.png \
+ sc_arrowshapes.circular-leftarrow.png \
+ sc_arrowshapes.down-arrow.png \
+ sc_arrowshapes.up-arrow.png \
+ sc_basicstop.png \
+ sc_editglossary.png \
+ sc_navigationbarleft.png \
+ sc_newdoc.png \
+ sc_runbasic.png, \
+ $(call gb_Zip_add_file,LibreLogo,python/LibreLogo/icons/$(icon),\
+ $(SRCDIR)/librelogo/source/icons/$(icon) \
+)))
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index db697bd7a022..4fe0c92c8c14 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -7,12 +7,23 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
+from __future__ import unicode_literals
import sys, os, uno, unohelper
import re, random, traceback, itertools
import threading, time as __time__
-ctx = uno.getComponentContext()
-__lngpath__ = re.sub("[\w_.]*$", "", ctx.ServiceManager.createInstanceWithContext("org.openoffice.LibreLogo.LibreLogoDummy", ctx).get_path()) # instead of PackageInformationProvider, see #115393#
+try:
+ unicode
+except:
+ unicode, long = str, int # support python 3
+
+urebootstrap = os.environ["URE_BOOTSTRAP"]
+if "vnd.sun.star.pathname" in urebootstrap:
+ __lngpath__ = re.sub("^vnd.sun.star.pathname:(.*)program(/|\\)fundamental([.]ini|rc)$", "\\1", urebootstrap)
+else:
+ __lngpath__ = unohelper.fileUrlToSystemPath(re.sub("program/(fundamental.ini|fundamentalrc)$", "", urebootstrap))
+__lngpath__ = __lngpath__ + "share/Scripts/python/LibreLogo/".replace("/", os.sep)
+print (__lngpath__)
__translang__ = "cz|de|dk|en_US|es|fr|hu|it|nl|no|pl|pt|ru|se|sl" # FIXME supported languages for language guessing, expand this list, according to the localizations
__lng__ = {}
__docs__ = {}
@@ -125,7 +136,7 @@ def __l12n__(lng):
return __lng__[lng]
except:
try:
- __lng__[lng] = dict([[i.split("=")[0].strip(), i.split("=")[1].strip().decode("unicode-escape")] for i in open(__lngpath__ + "LibreLogo_" + lng + ".properties", 'r').readlines() if "=" in i])
+ __lng__[lng] = dict([[i.decode("unicode-escape").split("=")[0].strip(), i.decode("unicode-escape").split("=")[1].strip()] for i in open(__lngpath__ + "LibreLogo_" + lng + ".properties", 'rb').readlines() if b"=" in i])
return __lng__[lng]
except:
return None
@@ -208,7 +219,7 @@ def Input(s):
# dispose the dialog
controlContainer.dispose()
return inputtext
- except Exception, e:
+ except Exception as e:
__trace__()
def __string__(s, decimal = None): # convert decimal sign, localized BOOL and SET
@@ -257,10 +268,10 @@ def Random(r):
return list(r)[int(random.random() * len(r))]
def to_ascii(s):
- return s.encode("unicode-escape").replace("\u", "__u__").replace(r"\x", "__x__")
+ return s.encode("unicode-escape").decode("utf-8").replace("\\u", "__u__").replace(r"\x", "__x__")
def to_unicode(s):
- return s.replace("__x__", r"\x").replace("__u__", "\u").decode("unicode-escape")
+ return bytes(s.replace("__x__", r"\x").replace("__u__", "\\u"), "ascii").decode("unicode-escape")
def __trace__():
if 'PYUNO_LOGLEVEL' in os.environ:
@@ -281,7 +292,7 @@ def __translate__(arg = None):
# detect language
text = _.doc.getText().getString()
# remove comments and strings
- text = re.sub(r"[ ]*;[^\n]*", "", re.sub(ur"['„“‘«»「][^\n'”“‘’«»」]*['”“‘’«»」]", "", re.sub(r"^[ \t]*[;#][^\n]*", "", text)))
+ text = re.sub(r"[ ]*;[^\n]*", "", re.sub(r"['„“‘«»「][^\n'”“‘’«»」]*['”“‘’«»」]", "", re.sub(r"^[ \t]*[;#][^\n]*", "", text)))
text = " ".join(set(re.findall("(?u)\w+", text)) - set(re.findall("(?u)\w*\d+\w*", text))).lower() # only words
ctx = uno.getComponentContext()
guess = ctx.ServiceManager.createInstanceWithContext("com.sun.star.linguistic2.LanguageGuessing", ctx)
@@ -309,15 +320,15 @@ def __translate__(arg = None):
in2 = __l12n__(_.lng)['IN'].split("|")[0].upper()
if in1[0] == '-' and in2[0] != '-': # "for x y-in" -> "for x in y"
exception += ['IN']
- text = re.sub(ur"(?ui)\b((?:%s) +:?\w+) +([^\n]+)(?:%s) +(?=[[] |[[]\n)" % (lang['FOR'], in1), "\\1 %s \\2 " % in2, text)
- text = re.sub(ur"(?ui)(:?\b\w+|[[][^[\n]*])\b(?:%s)\b" % in1, "%s \\1" % in2, text)
+ text = re.sub(r"(?ui)\b((?:%s) +:?\w+) +([^\n]+)(?:%s) +(?=[[] |[[]\n)" % (lang['FOR'], in1), "\\1 %s \\2 " % in2, text)
+ text = re.sub(r"(?ui)(:?\b\w+|[[][^[\n]*])\b(?:%s)\b" % in1, "%s \\1" % in2, text)
elif in1[0] != '-' and in2[0] == '-': # "for x in y" -> "for x y-in"
exception += ['IN']
- text = re.sub(ur"(?ui)(?<=\n)((?:%s)\b +:?\w+) +(?:%s) +([^\n]+?) +(?=[[] |[[]\n)" % (lang['FOR'], in1), "\\1 \\2%s " % in2, text)
- text = re.sub(ur"(?ui)(?<!:)\b(?:%s) +(:?\b\w+|[[][^[\n]*])\b" % in1, "\\1%s" % in2, text)
+ text = re.sub(r"(?ui)(?<=\n)((?:%s)\b +:?\w+) +(?:%s) +([^\n]+?) +(?=[[] |[[]\n)" % (lang['FOR'], in1), "\\1 \\2%s " % in2, text)
+ text = re.sub(r"(?ui)(?<!:)\b(?:%s) +(:?\b\w+|[[][^[\n]*])\b" % in1, "\\1%s" % in2, text)
for i in set(lang) - set(exception):
- text = re.sub(ur'(?ui)(?<!:)\b(%s)\b' % lang[i], __l12n__(_.lng)[i].split("|")[0].upper(), text)
- text = re.sub(ur"(?<=\d)[%s](?=\d)" % lang['DECIMAL'], __l12n__(_.lng)['DECIMAL'], text)
+ text = re.sub(r'(?ui)(?<!:)\b(%s)\b' % lang[i], __l12n__(_.lng)[i].split("|")[0].upper(), text)
+ text = re.sub(r"(?<=\d)[%s](?=\d)" % lang['DECIMAL'], __l12n__(_.lng)['DECIMAL'], text)
# decode strings
quoted = u"(?ui)(?<=%s)(%%s)(?=%s)" % (__l12n__(_.lng)['LEFTSTRING'][0], __l12n__(_.lng)['RIGHTSTRING'][0])
@@ -548,7 +559,7 @@ def run(arg=None, arg2 = -1):
if arg2 == -1:
arg2 = _.doc.getText().getString()
if len(arg2) > 20000:
- if MessageBox(_.doc.CurrentController.Frame.ContainerWindow, __l12n__(_.lng)['ERR_NOTAPROGRAM'], __l12n__(_.lng)['LIBRELOGO'], "querybox", __YES_NO_CANCEL__) <> 2:
+ if MessageBox(_.doc.CurrentController.Frame.ContainerWindow, __l12n__(_.lng)['ERR_NOTAPROGRAM'], __l12n__(_.lng)['LIBRELOGO'], "querybox", __YES_NO_CANCEL__) != 2:
with __lock__:
__thread__ = None
return None
@@ -718,7 +729,7 @@ def __draw__(d):
def __zoom__():
z = _.doc.CurrentController.getViewSettings().ZoomValue
- if z <> _.zoomvalue:
+ if z != _.zoomvalue:
_.zoomvalue = z
return True
return False
@@ -742,7 +753,7 @@ def __go__(shapename, n, dot = False, preciseAngle = -1):
dx = n * sin((pi/180)*(max(turtle.RotateAngle, preciseAngle)/100))
dy = n * cos((pi/180)*(max(turtle.RotateAngle, preciseAngle)/100))
turtle.setPosition(__Point__(pos.X + dx / __MM10_TO_TWIP__, pos.Y + dy / __MM10_TO_TWIP__))
- if (_.pencolor <> _.oldlc or _.pensize <> _.oldlw or _.linestyle <> _.oldls or _.linejoint <> _.oldlj):
+ if (_.pencolor != _.oldlc or _.pensize != _.oldlw or _.linestyle != _.oldls or _.linejoint != _.oldlj):
__removeshape__(__ACTUAL__)
shape = None
else:
@@ -851,7 +862,7 @@ def point():
_.pen, _.linestyle = oldpen, oldstyle
def __boxshape__(shapetype, l):
- if type(l) <> type([]): # default for circle and square
+ if type(l) != type([]): # default for circle and square
l = [l, l]
turtle = __getshape__(__TURTLE__)
shape = __draw__(shapetype + "Shape")
@@ -1144,111 +1155,111 @@ def __loadlang__(lang, a):
repcount = a['REPCOUNT'].split('|')[0]
loopi = itertools.count()
loop = lambda r: "%(i)s = 1\n%(orig)s%(j)s = %(i)s\n%(i)s += 1\n" % \
- { "i": repcount + str(loopi.next()), "j": repcount, "orig": re.sub( ur"(?ui)(?<!:)\b%s\b" % repcount, repcount + str(loopi.next()-1), r.group(0)) }
+ { "i": repcount + str(loopi.next()), "j": repcount, "orig": re.sub( r"(?ui)(?<!:)\b%s\b" % repcount, repcount + str(loopi.next()-1), r.group(0)) }
__comp__[lang] = [
- [ur"(?<!:)\b(?:%s) [[]" % a['GROUP'], "\n__groupstart__()\nfor __groupindex__ in range(2):\n[\nif __groupindex__ == 1:\n[\n__groupend__()\nbreak\n]\n"],
- [ur"(?<!:)\b(?:%s)\b" % a['GROUP'], "\n__removeshape__(__ACTUAL__)\n"],
- [ur"(\n| )][ \n]*\[(\n| )", "\n]\nelse:\n[\n"], # if/else block
- [ur"(?<!\n)\[(?= |\n)", ":\n[\n"], # start block
- [ur"( ]|\n]$)", "\n]\n"], # finish block
- [ur"(?<!:)\b(?:%s)\b" % a['FOR'], "\nfor"],
- [ur"(?<!:)\b(?:%s)\b" % a['REPEAT'], "\n__repeat__"],
- [ur"(?<!:)\b(?:%s)\b" % a['BREAK'], "\nbreak"],
- [ur"(?<!:)\b(?:%s)\b" % a['CONTINUE'], "\ncontinue"],
- [ur"(?<!:)\b(?:%s)\b" % a['REPCOUNT'], repcount],
- [ur"(?<!:)\b(?:%s)\b" % a['IF'], "\nif"],
- [ur"(?<!:)\b(?:%s)\b" % a['WHILE'], "\nwhile"],
- [ur"(?<!:)\b(?:%s)\b" % a['OUTPUT'], "\nreturn"],
- [ur"\n(if|while|return) [^\n]*", lambda r: re.sub("(?<![=!<>])=(?!=)", "==", r.group(0))], # = -> ==, XXX x = y = 1?
- [ur"(?<=\n)(for\b :?\w+) ([^\n]+)(?<=\w|]|}|\))(?=-|:)(?:%s)\b" % a['IN'], "\\1 in \\2"], # "for x y-in" -> "for x in y"
- [ur"(:?\b\w+|[[][^[\n]*])\b(?:%s)\b" % a['IN'], "in \\1"], # "x y-in" -> "x in y"
- [ur"(?<!:)\b(?:%s)\b" % a['IN'], "in"],
- [ur"(?<!:)\b(?:%s)\b[ \t]+(:?\w+)\b(?! in\b)" % a['FOR'], "\nfor \\1 in"],
- [ur"(?<=\n)__repeat__ :\n", "while True:\n"], # infinite loop
- [ur"(?<=\n)(for|while) (?!__groupindex__)[^\n]*:\n\[\n", loop], # loop variables for repcount (not groupindex loop)
- [ur"(?<=\n)__repeat__([^\n]*\w[^\n]*):(?=\n)", "for %s in range(1, 1+int(\\1)):" % repcount], # repeat block
- [ur"(?<=\d)[%s](?=\d)" % a['DECIMAL'], "."], # decimal sign
- [ur"(?<!/)/(?!/)", "*1.0/"], # fix division: /1 -> /1.0, but not with //
- [ur"\b([0-9]+([,.][0-9]+)?)(%s)\b" % a['HOUR'], "\\1*30"], # 12h = 12*30°
- [ur"(?<=\d)(%s)" % a['DEG'], ""], # 1° -> 1
- [ur"(?<!:)\b(?:__def__)[ \t]+(\w+)\b[ \t]*([:]?\w[^\n]*)", "\ndef \\1(\\2):\n["],
- [ur"(?<!:)\b(?:__def__)\s+(\w+)", "\ndef \\1():\n["],
- [ur"(?<!:)\b(?:%s)\b" % a['END'], "\n]"],
- [ur"(?<!:)\b(?:%s)\b" % a['GLOBAL'], "global"],
- [ur"(?<!:)\b(?:%s)\b" % a['TRUE'], "True"],
- [ur"(?<!:)\b(?:%s)\b" % a['FALSE'], "False"],
- [ur"(?<!:)\b(?:%s)\b" % a['NOT'], "not"],
- [ur"(?<!:)\b(?:%s)\b" % a['AND'], "and"],
- [ur"(?<!:)\b(?:%s)\b" % a['OR'], "or"],
- [ur"(?<!:)\b(?:%s)\b" % a['INT'], "__int__"],
- [ur"(?<!:)\b(?:%s)\b" % a['FLOAT'], "__float__"],
- [ur"(?<!:)\b(?:%s)\b" % a['STR'], "__string__"],
- [ur"(?<!:)\b(?:%s)\b" % a['COUNT'], "len"],
- [ur"(?<!:)\b(?:%s)\b" % a['ROUND'], "round"],
- [ur"(?<!:)\b(?:%s)\b" % a['ABS'], "abs"],
- [ur"(?<!:)\b(?:%s)\b" % a['SIN'], "sin"],
- [ur"(?<!:)\b(?:%s)\b" % a['COS'], "cos"],
- [ur"(?<!:)\b(?:%s)\b" % a['PI'], "pi"],
- [ur"(?<!:)\b(?:%s)\b" % a['SQRT'], "sqrt"],
- [ur"(?<!:)\b(?:%s)\b" % a['MIN'], "min"],
- [ur"(?<!:)\b(?:%s)\b" % a['MAX'], "max"],
- [ur"(?<!:)\b(?:%s)\b" % a['STOP'], "\nreturn None"],
- [ur"(?<!:)\b(?:%s)\b" % a['CLEARSCREEN'], "\n__cs__()"],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['PENCOLOR'], "\n)pencolor("],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['PENSTYLE'], "\n)penstyle("],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['PENJOINT'], "\n)penjoint("],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['FILLCOLOR'], "\n)fillcolor("],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['FILLSTYLE'], "\n)fillstyle("],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['FONTCOLOR'], "\n)fontcolor("],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['FONTFAMILY'], "\nglobal _\n_.fontfamily="],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['FONTHEIGHT'], "\nglobal _\n_.fontheight="],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['FONTWEIGHT'], "\nglobal _\n_.fontweight="],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['FONTSTYLE'], "\nglobal _\n_.fontstyle="],
- [ur"(?<!:)\b(?:%s)(\s+|$)" % a['PENWIDTH'], "\n)pensize("],
- [ur"(?<!:)\b(?:%s)\b" % a['PENDOWN'], "\nglobal _\n__pen__(1)"],
- [ur"(?<!:)\b(?:%s)\b" % a['PENUP'], "\nglobal _\n__pen__(0)"],
- [ur"(?<!:)\b(?:%s)\b" % a['HIDETURTLE'], "\nhideturtle()"],
- [ur"(?<!:)\b(?:%s)\b" % a['SHOWTURTLE'], "\nshowturtle()"],
- [ur"(?<!:)\b(?:%s)\b\[" % a['POSITION'], "position()["],
- [ur"(?<!:)\b(?:%s)\b(?!\()" % a['POSITION'], "\n)position("],
- [ur"(?<!:)\b(?:%s)\b" % a['HEADING'], "\n)heading("],
- [ur"(?<!:)\b(?:%s)\b" % a['PAGESIZE'], "pagesize()"],
- [ur"(?<!:)\b(?:%s)\b" % a['POINT'], "\npoint()"],
- [ur"(?<!:)\b(?:%s)\b" % (a['ELLIPSE'] + "|" + a['CIRCLE']), "\n)ellipse("],
- [ur"(?<!:)\b(?:%s)\b" % (a['RECTANGLE'] + "|" + a['SQUARE']), "\n)rectangle("],
- [ur"(?<!:)\b(?:%s)\b" % a['CLOSE'], "\n__fillit__(False)"],
- [ur"(?<!:)\b(?:%s)\b" % a['FILL'], "\n__fillit__()"],
- [ur"(?<!:)\b(?:%s)\b" % a['LABEL'], "\n)label("],
- [ur"(?<!:)\b(?:%s)\b" % a['TEXT'], "\n)text(__getshape__(__ACTUAL__),"],
- [ur"(text\([ \t]*\"[^\"\n\)]*)", "\\1\"\n"],
- [ur"(?<!:)\b(?:%s)\b" % a['HOME'], "\nturtlehome()"],
- [ur"(?<!:)\b(?:%s)\b" % a['SLEEP'], "\n)sleep("],
- [ur"(?<!:)\b(?:%s)\b" % a['FORWARD'], "\n)forward("],
- [ur"(?<!:)\b(?:%s)\b" % a['BACKWARD'], "\n)backward("],
- [ur"(?<!:)\b(?:%s)\b" % a['TURNRIGHT'], "\n)turnright("],
- [ur"(?<!:)\b(?:%s)\b" % a['RANDOM'], "Random"],
- [ur"(?<!:)\b(?:%s)\b(?= \d)" % 'Random', "random.random()*"],
- [ur"(?<!:)\b(?:%s)\b" % a['SET'], "set"],
- [ur"(?<!:)\b(?:%s)\b" % a['RANGE'], "range"],
- [ur"(?<!:)\b(?:%s)\b" % a['LIST'], "list"],
- [ur"(?<!:)\b(?:%s)\b" % a['TUPLE'], "tuple"],
- [ur"(?<!:)\b(?:%s)\b" % a['SORTED'], "sorted"],
- [ur"(?<!:)\b(?:%s)\b ?\(" % a['RESEARCH'], "re.search('(?u)'+"],
- [ur"(?<!:)\b(?:%s)\b ?\(" % a['RESUB'], "re.sub('(?u)'+"],
- [ur"(?<!:)\b(?:%s)\b ?\(" % a['REFINDALL'], "re.findall('(?u)'+"],
- [ur"(?<!:)\b(?:%s)\b" % a['ANY'], "u'any'"],
- [ur"(?<!:)\b(?:%s) (\w+|[[][^\]]*])\b" % a['INPUT'], " Input(\\1)"],
- [ur"(?<!:)\b(?:%s)\b" % a['PRINT'], "\n)Print("],
- [ur"(?<!:)\b(?:%s)\b" % a['TURNLEFT'], "\n)turnleft("],
- [ur"\b([0-9]+([,.][0-9]+)?)(%s)\b" % a['PT'], "\\1"],
- [ur"\b([0-9]+([,.][0-9]+)?)(%s)(?!\w)" % a['INCH'], "\\1*72"],
- [ur"\b([0-9]+([,.][0-9]+)?)(%s)\b" % a['MM'], "\\1*%s" % __MM_TO_PT__],
- [ur"\b([0-9]+([,.][0-9]+)?)(%s)\b" % a['CM'], "\\1*%s*10" % __MM_TO_PT__],
- [ur"\b(__(?:int|float|string)__len|round|abs|sin|cos|sqrt|set|list|tuple|sorted)\b ((?:\w|\d+([,.]\d+)?|[-+*/]| )+)\)" , "\\1(\\2))" ], # fix parsing: (1 + sqrt x) -> (1 + sqrt(x))
- [ur"(?<=[-*/=+,]) ?\n\)(\w+)\(", "\\1()"], # read attributes, eg. x = fillcolor
- [ur"(?<=return) ?\n\)(\w+)\(", "\\1()"], # return + user function
- [ur"(?<=(?:Print|label)\() ?\n\)(\w+)\(", "\\1()\n"] # Print/label + user function
+ [r"(?<!:)\b(?:%s) [[]" % a['GROUP'], "\n__groupstart__()\nfor __groupindex__ in range(2):\n[\nif __groupindex__ == 1:\n[\n__groupend__()\nbreak\n]\n"],
+ [r"(?<!:)\b(?:%s)\b" % a['GROUP'], "\n__removeshape__(__ACTUAL__)\n"],
+ [r"(\n| )][ \n]*\[(\n| )", "\n]\nelse:\n[\n"], # if/else block
+ [r"(?<!\n)\[(?= |\n)", ":\n[\n"], # start block
+ [r"( ]|\n]$)", "\n]\n"], # finish block
+ [r"(?<!:)\b(?:%s)\b" % a['FOR'], "\nfor"],
+ [r"(?<!:)\b(?:%s)\b" % a['REPEAT'], "\n__repeat__"],
+ [r"(?<!:)\b(?:%s)\b" % a['BREAK'], "\nbreak"],
+ [r"(?<!:)\b(?:%s)\b" % a['CONTINUE'], "\ncontinue"],
+ [r"(?<!:)\b(?:%s)\b" % a['REPCOUNT'], repcount],
+ [r"(?<!:)\b(?:%s)\b" % a['IF'], "\nif"],
+ [r"(?<!:)\b(?:%s)\b" % a['WHILE'], "\nwhile"],
+ [r"(?<!:)\b(?:%s)\b" % a['OUTPUT'], "\nreturn"],
+ [r"\n(if|while|return) [^\n]*", lambda r: re.sub("(?<![=!<>])=(?!=)", "==", r.group(0))], # = -> ==, XXX x = y = 1?
+ [r"(?<=\n)(for\b :?\w+) ([^\n]+)(?<=\w|]|}|\))(?=-|:)(?:%s)\b" % a['IN'], "\\1 in \\2"], # "for x y-in" -> "for x in y"
+ [r"(:?\b\w+|[[][^[\n]*])\b(?:%s)\b" % a['IN'], "in \\1"], # "x y-in" -> "x in y"
+ [r"(?<!:)\b(?:%s)\b" % a['IN'], "in"],
+ [r"(?<!:)\b(?:%s)\b[ \t]+(:?\w+)\b(?! in\b)" % a['FOR'], "\nfor \\1 in"],
+ [r"(?<=\n)__repeat__ :\n", "while True:\n"], # infinite loop
+ [r"(?<=\n)(for|while) (?!__groupindex__)[^\n]*:\n\[\n", loop], # loop variables for repcount (not groupindex loop)
+ [r"(?<=\n)__repeat__([^\n]*\w[^\n]*):(?=\n)", "for %s in range(1, 1+int(\\1)):" % repcount], # repeat block
+ [r"(?<=\d)[%s](?=\d)" % a['DECIMAL'], "."], # decimal sign
+ [r"(?<!/)/(?!/)", "*1.0/"], # fix division: /1 -> /1.0, but not with //
+ [r"\b([0-9]+([,.][0-9]+)?)(%s)\b" % a['HOUR'], "\\1*30"], # 12h = 12*30°
+ [r"(?<=\d)(%s)" % a['DEG'], ""], # 1° -> 1
+ [r"(?<!:)\b(?:__def__)[ \t]+(\w+)\b[ \t]*([:]?\w[^\n]*)", "\ndef \\1(\\2):\n["],
+ [r"(?<!:)\b(?:__def__)\s+(\w+)", "\ndef \\1():\n["],
+ [r"(?<!:)\b(?:%s)\b" % a['END'], "\n]"],
+ [r"(?<!:)\b(?:%s)\b" % a['GLOBAL'], "global"],
+ [r"(?<!:)\b(?:%s)\b" % a['TRUE'], "True"],
+ [r"(?<!:)\b(?:%s)\b" % a['FALSE'], "False"],
+ [r"(?<!:)\b(?:%s)\b" % a['NOT'], "not"],
+ [r"(?<!:)\b(?:%s)\b" % a['AND'], "and"],
+ [r"(?<!:)\b(?:%s)\b" % a['OR'], "or"],
+ [r"(?<!:)\b(?:%s)\b" % a['INT'], "__int__"],
+ [r"(?<!:)\b(?:%s)\b" % a['FLOAT'], "__float__"],
+ [r"(?<!:)\b(?:%s)\b" % a['STR'], "__string__"],
+ [r"(?<!:)\b(?:%s)\b" % a['COUNT'], "len"],
+ [r"(?<!:)\b(?:%s)\b" % a['ROUND'], "round"],
+ [r"(?<!:)\b(?:%s)\b" % a['ABS'], "abs"],
+ [r"(?<!:)\b(?:%s)\b" % a['SIN'], "sin"],
+ [r"(?<!:)\b(?:%s)\b" % a['COS'], "cos"],
+ [r"(?<!:)\b(?:%s)\b" % a['PI'], "pi"],
+ [r"(?<!:)\b(?:%s)\b" % a['SQRT'], "sqrt"],
+ [r"(?<!:)\b(?:%s)\b" % a['MIN'], "min"],
+ [r"(?<!:)\b(?:%s)\b" % a['MAX'], "max"],
+ [r"(?<!:)\b(?:%s)\b" % a['STOP'], "\nreturn None"],
+ [r"(?<!:)\b(?:%s)\b" % a['CLEARSCREEN'], "\n__cs__()"],
+ [r"(?<!:)\b(?:%s)(\s+|$)" % a['PENCOLOR'], "\n)pencolor("],
+ [r"(?<!:)\b(?:%s)(\s+|$)" % a['PENSTYLE'], "\n)penstyle("],
+ [r"(?<!:)\b(?:%s)(\s+|$)" % a['PENJOINT'], "\n)penjoint("],
+ [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['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['HIDETURTLE'], "\nhideturtle()"],
+ [r"(?<!:)\b(?:%s)\b" % a['SHOWTURTLE'], "\nshowturtle()"],
+ [r"(?<!:)\b(?:%s)\b\[" % a['POSITION'], "position()["],
+ [r"(?<!:)\b(?:%s)\b(?!\()" % a['POSITION'], "\n)position("],
+ [r"(?<!:)\b(?:%s)\b" % a['HEADING'], "\n)heading("],
+ [r"(?<!:)\b(?:%s)\b" % a['PAGESIZE'], "pagesize()"],
+ [r"(?<!:)\b(?:%s)\b" % a['POINT'], "\npoint()"],
+ [r"(?<!:)\b(?:%s)\b" % (a['ELLIPSE'] + "|" + a['CIRCLE']), "\n)ellipse("],
+ [r"(?<!:)\b(?:%s)\b" % (a['RECTANGLE'] + "|" + a['SQUARE']), "\n)rectangle("],
+ [r"(?<!:)\b(?:%s)\b" % a['CLOSE'], "\n__fillit__(False)"],
+ [r"(?<!:)\b(?:%s)\b" % a['FILL'], "\n__fillit__()"],
+ [r"(?<!:)\b(?:%s)\b" % a['LABEL'], "\n)label("],
+ [r"(?<!:)\b(?:%s)\b" % a['TEXT'], "\n)text(__getshape__(__ACTUAL__),"],
+ [r"(text\([ \t]*\"[^\"\n\)]*)", "\\1\"\n"],
+ [r"(?<!:)\b(?:%s)\b" % a['HOME'], "\nturtlehome()"],
+ [r"(?<!:)\b(?:%s)\b" % a['SLEEP'], "\n)sleep("],
+ [r"(?<!:)\b(?:%s)\b" % a['FORWARD'], "\n)forward("],
+ [r"(?<!:)\b(?:%s)\b" % a['BACKWARD'], "\n)backward("],
+ [r"(?<!:)\b(?:%s)\b" % a['TURNRIGHT'], "\n)turnright("],
+ [r"(?<!:)\b(?:%s)\b" % a['RANDOM'], "Random"],
+ [r"(?<!:)\b(?:%s)\b(?= \d)" % 'Random', "random.random()*"],
+ [r"(?<!:)\b(?:%s)\b" % a['SET'], "set"],
+ [r"(?<!:)\b(?:%s)\b" % a['RANGE'], "range"],
+ [r"(?<!:)\b(?:%s)\b" % a['LIST'], "list"],
+ [r"(?<!:)\b(?:%s)\b" % a['TUPLE'], "tuple"],
+ [r"(?<!:)\b(?:%s)\b" % a['SORTED'], "sorted"],
+ [r"(?<!:)\b(?:%s)\b ?\(" % a['RESEARCH'], "re.search('(?u)'+"],
+ [r"(?<!:)\b(?:%s)\b ?\(" % a['RESUB'], "re.sub('(?u)'+"],
+ [r"(?<!:)\b(?:%s)\b ?\(" % a['REFINDALL'], "re.findall('(?u)'+"],
+ [r"(?<!:)\b(?:%s)\b" % a['ANY'], "u'any'"],
+ [r"(?<!:)\b(?:%s) (\w+|[[][^\]]*])\b" % a['INPUT'], " Input(\\1)"],
+ [r"(?<!:)\b(?:%s)\b" % a['PRINT'], "\n)Print("],
+ [r"(?<!:)\b(?:%s)\b" % a['TURNLEFT'], "\n)turnleft("],
+ [r"\b([0-9]+([,.][0-9]+)?)(%s)\b" % a['PT'], "\\1"],
+ [r"\b([0-9]+([,.][0-9]+)?)(%s)(?!\w)" % a['INCH'], "\\1*72"],
+ [r"\b([0-9]+([,.][0-9]+)?)(%s)\b" % a['MM'], "\\1*%s" % __MM_TO_PT__],
+ [r"\b([0-9]+([,.][0-9]+)?)(%s)\b" % a['CM'], "\\1*%s*10" % __MM_TO_PT__],
+ [r"\b(__(?:int|float|string)__len|round|abs|sin|cos|sqrt|set|list|tuple|sorted)\b ((?:\w|\d+([,.]\d+)?|[-+*/]| )+)\)" , "\\1(\\2))" ], # fix parsing: (1 + sqrt x) -> (1 + sqrt(x))
+ [r"(?<=[-*/=+,]) ?\n\)(\w+)\(", "\\1()"], # read attributes, eg. x = fillcolor
+ [r"(?<=return) ?\n\)(\w+)\(", "\\1()"], # return + user function
+ [r"(?<=(?:Print|label)\() ?\n\)(\w+)\(", "\\1()\n"] # Print/label + user function
]
def __concatenation__(r): # keep line positions with extra line breaks
@@ -1278,7 +1289,7 @@ def __compil__(s):
rmsp = re.compile(r"[ ]*([=+*/]|==|<=|>=|<>|!=|-[ ]+)[ ]*")
chsp = re.compile(r"[ \t]+")
chch = re.compile(r"(?u)(?<!\w):(?=\w)")
- parenfix = re.compile(ur"(?ui)(\([^\(\[\]\)]+)]\)")
+ parenfix = re.compile(r"(?ui)(\([^\(\[\]\)]+)]\)")
# remove CR characters and split lines
s = re.sub(r'[ \t\r]*(?=\n)', '', s)
@@ -1307,11 +1318,11 @@ def __compil__(s):
s = re.sub(r"[ ]*;[^\n]*", "", s)
# n-dash and m-dash as minus signs
- s = re.sub(ur"(?u)[–—]", "-", s)
+ s = re.sub(r"(?u)[–—]", "-", s)
# replace procedure names
- s = re.sub(ur"(?i)^[ ]*(%s)[ ]+" % __l12n__(_.lng)['TO'], "__def__ ", s)
- s = re.sub(ur"(?i)\n[ ]*(%s)[ ]+" % __l12n__(_.lng)['TO'], "\n__def__ ", s)
+ s = re.sub(r"(?i)^[ ]*(%s)[ ]+" % __l12n__(_.lng)['TO'], "__def__ ", s)
+ s = re.sub(r"(?i)\n[ ]*(%s)[ ]+" % __l12n__(_.lng)['TO'], "\n__def__ ", s)
subnames = re.findall(u"(?iu)(?<=__def__ )\w+", s)
globs = ""
functions = ["range", "__int__", "__float__", "Random", "Input", "__string__", "len", "round", "abs", "sin", "cos", "sqrt", "set", "list", "tuple", "re.sub", "re.search", "re.findall", "sorted", "min", "max"]
@@ -1319,7 +1330,7 @@ def __compil__(s):
if len(subnames) > 0:
globs = "global %s" % ", ".join(subnames)
# search user functions (function calls with two or more arguments need explicite Python parentheses)
- functions += [ re.findall("(?u)\w+",i[0])[0] for i in re.findall(ur"""(?iu)(?<=__def__ )([^\n]*)\n # beginning of a procedure
+ functions += [ re.findall("(?u)\w+",i[0])[0] for i in re.findall(r"""(?iu)(?<=__def__ )([^\n]*)\n # beginning of a procedure
(?:[^\n]*(?<!\b(%(END)s))\n)* # 0 or more lines (not END)
[^\n]*\b(?:%(OUTPUT)s)\b[^\n]*\n # line with OUTPUT (functions = procedures with OUTPUT)
(?:[^\n]*(?<!\b(?:%(END)s))\n)* # 0 or more lines (not END)
@@ -1327,7 +1338,7 @@ def __compil__(s):
# add line breaks before procedure calls
procedures = set(subnames) - set(functions)
if len(procedures) > 0:
- s = re.sub(ur"(?<!__def__)(?<![-+=*/])(?<!%s)(?:^|[ \t]+)(" % ")(?<!".join(functions) + "|".join(procedures) + ")", r"\n\1", s)
+ s = re.sub(r"(?<!__def__)(?<![-+=*/])(?<!%s)(?:^|[ \t]+)(" % ")(?<!".join(functions) + "|".join(procedures) + ")", r"\n\1", s)
# compile native Logo
for i in __comp__[_.lng]:
@@ -1336,7 +1347,7 @@ def __compil__(s):
indent = 0
result = ""
func = re.compile("(?iu)(def (\w+))(\(.*\):)")
- expr = ur"""(?iu)(?<!def[ ])(?<![:\w])%(name)s(?!\w)(?!\()(?![ ]\()
+ expr = r"""(?iu)(?<!def[ ])(?<![:\w])%(name)s(?!\w)(?!\()(?![ ]\()
(
([ ]+\[*([-+]|\([ ]?)*((%(functions)s)\b[ ]*\(*)*
(?:[0-9]+([,.][0-9]+)?|:?\w+(?:[.]\w+[\(]?[\)]?)?]*|\[])]*[\)]*
@@ -1377,7 +1388,7 @@ def __compil__(s):
if j in i:
if names[j][0] == 0:
if not j in functions:
- i = re.sub(ur"(?iu)(?<!def )(?<![_\w])\b%s\b(?!\w)" %j, j+'()', i)
+ i = re.sub(r"(?iu)(?<!def )(?<![_\w])\b%s\b(?!\w)" %j, j+'()', i)
else:
r = names[j][1].search(i)
if r:
diff --git a/librelogo/source/LibreLogoDummy.py b/librelogo/source/LibreLogoDummy.py
deleted file mode 100644
index fc3ef12ad950..000000000000
--- a/librelogo/source/LibreLogoDummy.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# dummy UNO component to get the path of the localizations
-import uno, unohelper, os, sys
-from com.sun.star.lang import XMain
-class LibreLogoDummyComponent(XMain, unohelper.Base):
- def __init__( self, ctx ):
- self.ctx = ctx
-
- def get_path(self):
- import librelogodummy_path
- return librelogodummy_path.get_path()
-
-g_ImplementationHelper = unohelper.ImplementationHelper()
-g_ImplementationHelper.addImplementation( \
- LibreLogoDummyComponent,"org.openoffice.comp.pyuno.LibreLogoDummy",("org.openoffice.LibreLogo.LibreLogoDummy",),)
-
-# vim: set noet sw=4 ts=4:
diff --git a/librelogo/source/META-INF/manifest.xml b/librelogo/source/META-INF/manifest.xml
deleted file mode 100644
index a10be2952af5..000000000000
--- a/librelogo/source/META-INF/manifest.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<manifest:manifest>
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=Python" manifest:full-path="LibreLogoDummy.py"/>
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.framework-script" manifest:full-path="LibreLogo"/>
- <manifest:file-entry manifest:full-path="Office/UI/StartModuleWindowState.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
- <manifest:file-entry manifest:full-path="Office/UI/WriterWindowState.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
- <manifest:file-entry manifest:full-path="Addons.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.help" manifest:full-path="help"/>
-</manifest:manifest> \ No newline at end of file
diff --git a/librelogo/source/README b/librelogo/source/README
deleted file mode 100644
index ffe5ea0a1611..000000000000
--- a/librelogo/source/README
+++ /dev/null
@@ -1,43 +0,0 @@
-LibreOffice Logo 0.2 RC2
-
-License: GNU LGPL & GPL, MPL
-
-Home page: http://www.numbertext.org/logo
-
-(c) László Németh (nemeth at numbertextdotorg)
-
-FSF.hu Foundation, http://www.fsf.hu
-
-Icons copyright: OpenOffice.org/LibreOffice
-
-Introduction
-============
-
-LibreLogo is a Logo-like programming language with interactive vectorgraphics for education and DTP
-
-- presentation: http://www.numbertext.org/logo/librelogo.pdf
-- basic Logo syntax for back compability with educational Logo systems
-- interactive vectorgraphics in LibreOffice Writer
-- native commands (easily translatable)
-- Python data structures (list, tuple, set, dictionary) and other Python features
-
-Usage
-=====
-
-See Logo in LibreOffice Help and http://www.numbertext.org/logo for documentation.
-
-Translation
-===========
-
-create your_language_id.lng in LibreOffice/ based on en.lng.
-
-Compilation:
-
-python make.py
-
-Development
-===========
-
-LibreLogo uses the PyUNO scripting framework, so Addons.xcu URLs depend from the
-full name of the package. Modify them according to the package name with the
-version number.
diff --git a/librelogo/source/description-en-US.txt b/librelogo/source/description-en-US.txt
deleted file mode 100644
index 6e9566518da8..000000000000
--- a/librelogo/source/description-en-US.txt
+++ /dev/null
@@ -1 +0,0 @@
-Programming language and environment for education, graphic design and desktop publishing. Usage: View→Toolbars→Logo toolbar in Writer. See Logo in LibreOffice Help.
diff --git a/librelogo/source/description.xml b/librelogo/source/description.xml
deleted file mode 100644
index 6711d7806ccb..000000000000
--- a/librelogo/source/description.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<description xmlns="http://openoffice.org/extensions/description/2006"
- xmlns:d="http://openoffice.org/extensions/description/2006"
- xmlns:xlink="http://www.w3.org/1999/xlink">
- <identifier value="org.openoffice.comp.pyuno.LibreLogo" />
- <display-name>
- <name lang="en-US">LibreLogo</name>
- </display-name>
- <version value="0.2rc2" />
- <publisher>
- <name lang="en-US" xlink:href="http://www.numbertext.org/logo">László Németh</name>
- <name lang="hu" xlink:href="http://www.numbertext.org/logo">Németh László</name>
- </publisher>
- <extension-description>
- <src lang="en-US" xlink:href="description-en-US.txt" />
- </extension-description>
- <dependencies>
- <OpenOffice.org-minimal-version value="3.2" d:name="OpenOffice.org 3.2" />
- </dependencies>
-</description>
diff --git a/librelogo/source/help/en-US/LibreLogo.xhp b/librelogo/source/help/en-US/LibreLogo.xhp
deleted file mode 100644
index 33dc2cc14d16..000000000000
--- a/librelogo/source/help/en-US/LibreLogo.xhp
+++ /dev/null
@@ -1,397 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<helpdocument version="1.0">
-
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
--->
-
-<meta>
-<topic id="LibreLogo" indexer="include" status="PUBLISH">
-<title id="title" xml-lang="en-US">LibreLogo</title>
-<filename>/org.openoffice.comp.pyuno.LibreLogo/LibreLogo.xhp</filename>
-</topic>
-</meta>
-<body>
-
-<bookmark xml-lang="en-US" branch="index" id="bm1">
-<bookmark_value>LibreLogo</bookmark_value>
-<bookmark_value>Logo</bookmark_value>
-<bookmark_value>Turtle graphics</bookmark_value>
-</bookmark>
-<bookmark xml-lang="en-US" branch="hid/.HelpId:addon_LibreLogo.OfficeToolBar" id="bm2" localize="false"/>
-<paragraph role="heading" level="1" xml-lang="en-US" id="hd_170">LibreLogo</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_180">LibreLogo is a simple, native, Logo-like programming environment with turtle vector graphics for teaching of computing (programming and word processing), DTP and graphic design. See http://www.numbertext.org/logo/librelogo.pdf.</paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_220">LibreLogo toolbar</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_230">The LibreLogo toolbar (View » Toolbars » Logo) contains turtle moving, program run and stop, home and clear screen and syntax highlighting/translating icons and an input bar (command line).</paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_240">Turtle moving icons</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_250">They are equivalents of the Logo commands “FORWARD 10”, “BACK 10”, “LEFT 15”, “RIGHT 15”. Clicking on one of the icons will also focus the turtle shape scrolling the page to its position.</paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_280">Program run and start</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_290">Click on the icon “run” to execute the text of the Writer document as a LibreLogo program.</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_300">Click on the icon “stop” to stop the program execution.</paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_310">Home</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_320">Click on the icon “home” to reset the position and settings of the turtle.</paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_330">Clear screen</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_340">Click on the icon “clear screen” to remove the drawing objects of the document.</paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_350">Command line</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_360">Hit Enter in the command line to execute its content. To stop the program use the icon “stop”.</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_370">Hold down the Enter to repeat the command line, for example, on the following command sequence:</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_380">&#160;FORWARD&#160;200&#160;LEFT&#160;89<br/></paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_390">To reset the command line click triple in it or press Ctrl-A to select the previous commands, and type the new commands.</paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_400">Syntax highlighting/Translating</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_410">It expands and upper case Logo commands in the Writer document. Change the language of the document (Tools » Options » Language Settings » Languages » Western) and click on this icon to translate the Logo program to the selected language.</paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_420">Program editing</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_430">LibreLogo drawings and programs use the same Writer document. The LibreLogo canvas is on the first page of the Writer document. You can insert a page break before the LibreLogo programs and set the zoom/font size for a comfortable two page layout for LibreLogo programming: left (first) page is the canvas, right (second) page is for the LibreLogo programs.</paragraph>
-<paragraph role="heading" level="1" xml-lang="en-US" id="hd_440">LibreLogo programming language</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_450">LibreLogo is a native, easily localisable, Logo-like programming language. It is back-compatible with the older Logo systems in the case of the simple Logo programs used in education, eg.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_460">&#160;TO&#160;triangle&#160;:size<br/>&#160;REPEAT&#160;3&#160;[<br/>&#160;&#160;&#160;FORWARD&#160;:size<br/>&#160;&#160;&#160;LEFT&#160;120<br/>&#160;]<br/>&#160;END<br/>&#160;<br/>&#160;triangle&#160;10&#160;triangle&#160;100&#160;triangle&#160;200<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_470">Differences from the Logo programming language</paragraph>
-<list type="unordered">
- <listitem>
- <paragraph role="listitem" xml-lang="en-US" id="par_480">List members are comma separated: POSITION [0, 0]</paragraph>
- </listitem>
- <listitem>
- <paragraph role="listitem" xml-lang="en-US" id="par_490">Program blocks and lists are different</paragraph>
- </listitem>
- <listitem>
- <list type="unordered">
- <listitem>
- <paragraph role="listitem" xml-lang="en-US" id="par_500">Program blocks need space or new line at parenthesization: REPEAT 10 [ forward 10 left 36 ]</paragraph>
- </listitem>
- <listitem>
- <paragraph role="listitem" xml-lang="en-US" id="par_510">Lists need close parenthesization: POSITION [0, 0], and not POSITION [ 0, 0 ]</paragraph>
- </listitem>
- </list>
- </listitem>
- <listitem>
- <paragraph role="listitem" xml-lang="en-US" id="par_520">1-line function declarations have not supported yet (TO and END need new lines).</paragraph>
- </listitem>
-</list>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_530">Other features of LibreLogo</paragraph>
-<list type="unordered">
- <listitem>
- <paragraph role="listitem" xml-lang="en-US" id="par_540">The colon is optional before the variable names.</paragraph>
- <paragraph role="code" xml-lang="en-US" id="par_550">&#160;TO&#160;triangle&#160;size<br/>&#160;&#160;&#160;REPEAT&#160;3&#160;[&#160;FORWARD&#160;size&#160;LEFT&#160;120&#160;]<br/>&#160;END<br/></paragraph>
- </listitem>
- <listitem>
- <paragraph role="paragraph" xml-lang="en-US" id="par_560">String notation supports also orthographical and Python syntax.</paragraph>
- <paragraph role="code" xml-lang="en-US" id="par_570">&#160;PRINT&#160;"word ;&#160;original&#160;Logo&#160;syntax<br/>&#160;PRINT&#160;“Arbitrary&#160;text.” ;&#160;orthography,&#160;Writer<br/>&#160;PRINT&#160;'Arbitrary&#160;text.' ;&#160;Python&#160;syntax<br/></paragraph>
- </listitem>
- <listitem>
- <paragraph role="paragraph" xml-lang="en-US" id="par_580">Python list and string handling</paragraph>
- <paragraph role="code" xml-lang="en-US" id="par_590">&#160;PRINT&#160;“text”[2] ;&#160;print&#160;“x”<br/>&#160;PRINT&#160;“text”[1:3] ;&#160;print&#160;“ex”<br/></paragraph>
- </listitem>
- <listitem>
- <paragraph role="paragraph" xml-lang="en-US" id="par_600">Python-like FOR loop</paragraph>
- </listitem>
- <listitem>
- <paragraph role="paragraph" xml-lang="en-US" id="par_610">Python-like variable declaration:</paragraph>
- <paragraph role="code" xml-lang="en-US" id="par_620">&#160;x&#160;=&#160;15<br/>&#160;PRINT&#160;x<br/></paragraph>
- </listitem>
- <listitem>
- <paragraph role="paragraph" xml-lang="en-US" id="par_630">There are no extra query functions:</paragraph>
- <paragraph role="code" xml-lang="en-US" id="par_640">&#160;PRINT&#160;FILLCOLOR<br/>&#160;p&#160;=&#160;POSITION<br/>&#160;PRINT&#160;p<br/>&#160;REPEAT&#160;10&#160;[&#160;POSITION&#160;ANY&#160;POSITION&#160;p&#160;]<br/></paragraph>
- </listitem>
- <listitem>
- <paragraph role="paragraph" xml-lang="en-US" id="par_650">Alternative parenthesization in function calls</paragraph>
- <paragraph role="code" xml-lang="en-US" id="par_660">&#160;TO&#160;star&#160;size&#160;color<br/>&#160;FILLCOLOR&#160;color<br/>&#160;REPEAT&#160;5&#160;[&#160;LEFT&#160;72&#160;FORWARD&#160;size&#160;RIGHT&#160;144&#160;FORWARD&#160;size&#160;]<br/>&#160;FILL<br/>&#160;END<br/>&#160;<br/>&#160;star&#160;100&#160;“red”<br/>&#160;star&#160;(100,&#160;“green”)<br/>&#160;star(100,&#160;“blue”)<br/></paragraph>
- </listitem>
-</list>
-<paragraph role="heading" level="1" xml-lang="en-US" id="hd_670">LibreLogo commands</paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_680">Basic syntax</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_690">Case sensitivity</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_700">Commands, color constants are case insensitive:</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_710">&#160;PRINT&#160;“Hello,&#160;World!”<br/>&#160;print&#160;“Hello,&#160;World,&#160;again!”<br/></paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_720">Variable names are case sensitive:</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_730">&#160;a&#160;=&#160;5<br/>&#160;A&#160;=&#160;7<br/>&#160;PRINT&#160;a<br/>&#160;PRINT&#160;A<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_740">Program lines</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_750">Lines of a LibreLogo program are paragraphs in the LibreOffice Writer document. A program line can contain multiple commands:</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_760">&#160;PRINT&#160;“Hello,&#160;World!”&#160;PRINT&#160;“LibreLogo”<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_770">Comments</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_780">Lines or line parts are comments from a semicolon to the end of the line (paragraph):</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_790">&#160;;&#160;some&#160;comments<br/>&#160;PRINT&#160;5&#160;*&#160;5 ;&#160;some&#160;comments<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_800">Break program lines to multiple paragraphs</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_810">It’s possible to break a program line for more paragraphs using the character tilde at the end of the line:</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_820">&#160;PRINT&#160;“This&#160;is&#160;a&#160;very&#160;long&#160;”&#160;+&#160;~<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;“warning&#160;message”<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_830">Turtle moving</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_840">FORWARD (fd)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_850">&#160;FORWARD&#160;10 ;&#160;move&#160;forward&#160;10pt&#160;(1pt&#160;=&#160;1/72&#160;inch)<br/>&#160;FORWARD&#160;10pt ;&#160;see&#160;above<br/>&#160;FORWARD&#160;0.5in ;&#160;move&#160;forward&#160;0.5&#160;inch&#160;(1&#160;inch&#160;=&#160;2.54&#160;cm)<br/>&#160;FORWARD&#160;1" ;&#160;see&#160;above<br/>&#160;FD&#160;1mm<br/>&#160;FD&#160;1cm<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_860">BACK (bk)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_870">&#160;BACK&#160;10&#160;;&#160;move&#160;back&#160;10pt<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_880">LEFT (lt)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_890">&#160;LEFT&#160;90 ;&#160;turn&#160;counterclockwise&#160;90&#160;degrees<br/>&#160;LEFT&#160;90° ;&#160;see&#160;above<br/>&#160;LT&#160;3h ;&#160;see&#160;above&#160;(clock&#160;position)<br/>&#160;LT&#160;any ;&#160;turn&#160;to&#160;a&#160;random&#160;position<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_900">RIGHT (rt)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_910">&#160;RIGHT&#160;90 ;&#160;turn&#160;clockwise&#160;90&#160;degrees<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_920">PENUP (pu)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_930">&#160;PENUP ;&#160;turtle&#160;will&#160;move&#160;without&#160;drawing<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_940">PENDOWN (pd)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_950">&#160;PENDOWN ;&#160;turtle&#160;will&#160;move&#160;with&#160;drawing<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_960">POSITION (pos)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_970">&#160;POSITION&#160;[0,&#160;0] ;&#160;turn&#160;and&#160;move&#160;to&#160;the&#160;top-left&#160;corner<br/>&#160;POSITION&#160;PAGESIZE ;&#160;turn&#160;and&#160;move&#160;to&#160;the&#160;bottom-right&#160;corner<br/>&#160;POSITION&#160;[PAGESIZE[0],&#160;0]&#160;;&#160;turn&#160;and&#160;move&#160;to&#160;the&#160;top-right&#160;corner<br/>&#160;POSITION&#160;ANY ;&#160;turn&#160;and&#160;move&#160;to&#160;a&#160;random&#160;position<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_980">HEADING (seth)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_990">&#160;HEADING&#160;0 ;&#160;turn&#160;north<br/>&#160;HEADING&#160;12h ;&#160;see&#160;above<br/>&#160;HEADING&#160;ANY ;&#160;turn&#160;to&#160;a&#160;random&#160;position<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_1000">Other turtle commands</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1010">HIDETURTLE (ht)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1020">&#160;HIDETURTLE ;&#160;hide&#160;turtle&#160;(until&#160;the&#160;showturtle&#160;command)<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1030">SHOWTURTLE (st)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1040">&#160;SHOWTURTLE ;&#160;show&#160;turtle<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1050">HOME</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1060">&#160;HOME ;&#160;reset&#160;initial&#160;turtle&#160;settings&#160;and&#160;position<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1070">CLEARSCREEN (cs)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1080">&#160;CLEARSCREEN ;&#160;remove&#160;drawing&#160;objects&#160;of&#160;the&#160;document<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1090">FILL and CLOSE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1100">&#160;FILL ;&#160;close&#160;and&#160;fill&#160;the&#160;actual&#160;line&#160;shape<br/>&#160;CLOSE ;&#160;close&#160;the&#160;actual&#160;line&#160;shape<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_1110">Pen settings</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1120">PENSIZE (ps)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1130">&#160;PENSIZE&#160;100 ;&#160;line&#160;width&#160;is&#160;100&#160;points<br/>&#160;PENSIZE&#160;ANY ;&#160;equivalent&#160;of&#160;PENSIZE&#160;RANDOM&#160;10<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1140">PENCOLOR/PENCOLOUR (pc)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1150">&#160;PENCOLOR&#160;“red” ;&#160;set&#160;red&#160;pen&#160;color&#160;(by&#160;color&#160;name,&#160;see&#160;color&#160;constants)<br/>&#160;PENCOLOR&#160;[255,&#160;255,&#160;0] ;&#160;set&#160;yellow&#160;color&#160;(RGB&#160;list)<br/>&#160;PENCOLOR&#160;0xffff00 ;&#160;set&#160;yellow&#160;color&#160;(hexa&#160;code)<br/>&#160;PENCOLOR&#160;0 ;&#160;set&#160;black&#160;color&#160;(0x000000)<br/>&#160;PENCOLOR&#160;ANY ;&#160;random&#160;color<br/>&#160;PENCOLOR&#160;[5] ;&#160;set&#160;red&#160;color&#160;(by&#160;color&#160;identifier,&#160;see&#160;color&#160;constants)<br/>&#160;PENCOLOR&#160;“invisible” ;&#160;invisible&#160;pen&#160;color&#160;for&#160;shapes&#160;without&#160;visible&#160;outline<br/>&#160;PENCOLOR&#160;“~red” ;&#160;set&#160;random&#160;red&#160;color<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1160">PENJOINT/LINEJOINT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1170">&#160;PENJOINT&#160;“rounded” ;&#160;rounded&#160;line&#160;joint&#160;(default)<br/>&#160;PENJOINT&#160;“miter” ;&#160;sharp&#160;line&#160;joint<br/>&#160;PENJOINT&#160;“bevel” ;&#160;bevel&#160;line&#160;joint<br/>&#160;PENJOINT&#160;“none” ;&#160;without&#160;line&#160;joint<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1180">PENSTYLE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1190">&#160;PENSTYLE&#160;“solid” ;&#160;solid&#160;line&#160;(default)<br/>&#160;PENSTYLE&#160;“dotted” ;&#160;dotted&#160;line<br/>&#160;PENSTYLE&#160;“dashed” ;&#160;dashed&#160;line<br/>&#160;<br/>&#160;;&#160;custom&#160;dot–dash&#160;pattern&#160;specified&#160;by&#160;a&#160;list&#160;with&#160;the&#160;following&#160;arguments:<br/>&#160;;&#160;–&#160;number&#160;of&#160;the&#160;neighbouring&#160;dots<br/>&#160;;&#160;–&#160;length&#160;of&#160;a&#160;dot<br/>&#160;;&#160;–&#160;number&#160;of&#160;the&#160;neighbouring&#160;dashes<br/>&#160;;&#160;–&#160;length&#160;of&#160;a&#160;dash<br/>&#160;;&#160;–&#160;distance&#160;of&#160;the&#160;dots/dashes<br/>&#160;;&#160;–&#160;type&#160;(optional):<br/>&#160;;&#160;&#160;&#160;0&#160;=&#160;dots&#160;are&#160;rectangles&#160;(default)<br/>&#160;;&#160;&#160;&#160;2&#160;=&#160;dots&#160;are&#160;squares&#160;(lengths&#160;and&#160;distances&#160;are&#160;relative&#160;to&#160;the&#160;pensize)<br/>&#160;<br/>&#160;PENSTYLE&#160;[3,&#160;1mm,&#160;2,&#160;4mm,&#160;2mm,&#160;2] ;&#160;...––...––...––<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_1200">Fill settings</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1210">FILLCOLOR/FILLCOLOUR (fc)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1220">&#160;FILLCOLOR&#160;“blue” ;&#160;fill&#160;with&#160;blue&#160;color,&#160;see&#160;also&#160;PENCOLOR<br/>&#160;FILLCOLOR&#160;“invisible”&#160;CIRCLE&#160;10 ;&#160;unfilled&#160;circle<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1230">FILLSTYLE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1240">&#160;FILLSTYLE&#160;0 ;&#160;fill&#160;without&#160;hatches&#160;(default)<br/>&#160;FILLSTYLE&#160;1 ;&#160;black&#160;single&#160;hatches&#160;(horizontal)<br/>&#160;FILLSTYLE&#160;2 ;&#160;black&#160;single&#160;hatches&#160;(45&#160;degrees)<br/>&#160;FILLSTYLE&#160;3 ;&#160;black&#160;single&#160;hatches&#160;(-45&#160;degrees)<br/>&#160;FILLSTYLE&#160;4 ;&#160;black&#160;single&#160;hatches&#160;(vertical)<br/>&#160;FILLSTYLE&#160;5 ;&#160;red&#160;crossed&#160;hatches&#160;(45&#160;degrees)<br/>&#160;FILLSTYLE&#160;6 ;&#160;red&#160;crossed&#160;hatches&#160;(0&#160;degrees)<br/>&#160;FILLSTYLE&#160;7 ;&#160;blue&#160;crossed&#160;hatches&#160;(45&#160;degrees)<br/>&#160;FILLSTYLE&#160;8 ;&#160;blue&#160;crossed&#160;hatches&#160;(0&#160;degrees)<br/>&#160;FILLSTYLE&#160;9 ;&#160;blue&#160;triple&#160;crossed<br/>&#160;FILLSTYLE&#160;10 ;&#160;black&#160;wide&#160;single&#160;hatches&#160;(45&#160;degrees)<br/>&#160;<br/>&#160;;&#160;custom&#160;hatches&#160;specified&#160;by&#160;a&#160;list&#160;with&#160;the&#160;following&#160;arguments:<br/>&#160;;&#160;–&#160;style&#160;(1&#160;=&#160;single,&#160;2&#160;=&#160;double,&#160;3&#160;=&#160;triple&#160;hatching)<br/>&#160;;&#160;–&#160;color<br/>&#160;;&#160;–&#160;distance<br/>&#160;;&#160;–&#160;degree<br/>&#160;<br/>&#160;FILLSTYLE&#160;[2,&#160;“green”,&#160;3pt,&#160;15°] ;&#160;green&#160;crossed&#160;hatches&#160;(15&#160;degrees)<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_1250">Drawing objects</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1260">CIRCLE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1270">&#160;CIRCLE&#160;100 ;&#160;draw&#160;a&#160;circle&#160;shape&#160;(diameter&#160;=&#160;100pt)<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1280">ELLIPSE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1290">&#160;ELLIPSE&#160;[50,&#160;100] ;&#160;draw&#160;an&#160;ellipse&#160;with&#160;50&#160;and&#160;100&#160;diameters<br/>&#160;ELLIPSE&#160;[50,&#160;100,&#160;2h,&#160;12h] ;&#160;draw&#160;an&#160;elliptical&#160;sector&#160;(from&#160;2h&#160;clock&#160;position&#160;to&#160;12h)<br/>&#160;ELLIPSE&#160;[50,&#160;100,&#160;2h,&#160;12h,&#160;2]&#160;&#160;;&#160;draw&#160;an&#160;elliptical&#160;segment<br/>&#160;ELLIPSE&#160;[50,&#160;100,&#160;2h,&#160;12h,&#160;3]&#160;&#160;;&#160;draw&#160;an&#160;elliptical&#160;arc<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1300">SQUARE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1310">&#160;SQUARE&#160;100 ;&#160;draw&#160;a&#160;square&#160;shape&#160;(size&#160;=&#160;100pt)<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1320">RECTANGLE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1330">&#160;RECTANGLE&#160;[50,&#160;100] ;&#160;draw&#160;a&#160;rectange&#160;shape&#160;(50×100pt)<br/>&#160;RECTANGLE&#160;[50,&#160;100,&#160;50] ;&#160;draw&#160;a&#160;rectangle&#160;<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1340">POINT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1350">&#160;POINT ;&#160;draw&#160;a&#160;point&#160;with&#160;size&#160;and&#160;color&#160;of&#160;the&#160;pen<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1360">LABEL</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1370">&#160;LABEL&#160;“text” ;&#160;print&#160;text&#160;in&#160;the&#160;turte&#160;position<br/>&#160;LABEL&#160;'text' ;&#160;see&#160;above<br/>&#160;LABEL&#160;"text ;&#160;see&#160;above&#160;(only&#160;for&#160;single&#160;words)<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1380">TEXT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1390">&#160;CIRCLE&#160;10&#160;TEXT&#160;“text” ;&#160;set&#160;text&#160;of&#160;the&#160;actual&#160;drawing&#160;object<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_1400">Font settings</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1410">FONTCOLOR/FONTCOLOUR</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1420">&#160;FONTCOLOR&#160;“green” ;&#160;set&#160;font&#160;color<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1430">FONTFAMILY</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1440">&#160;FONTFAMILY&#160;“Linux&#160;Libertine&#160;G” ;&#160;set&#160;font&#160;(family)<br/>&#160;FONTFAMILY&#160;“Linux&#160;Libertine&#160;G:smcp=1” ;&#160;set&#160;also&#160;font&#160;feature&#160;(small&#160;caps)<br/>&#160;FONTFAMILY&#160;“Linux&#160;Libertine&#160;G:smcp=1&amp;onum=1” ;&#160;small&#160;caps&#160;+&#160;old&#160;figures<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1450">FONTSIZE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1460">&#160;FONTSIZE&#160;12 ;&#160;set&#160;12pt<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1470">FONTWEIGHT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1480">&#160;FONTWEIGHT&#160;“bold” ;&#160;set&#160;bold&#160;font<br/>&#160;FONTWEIGHT&#160;“normal” ;&#160;set&#160;normal&#160;weight<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1490">FONTSTYLE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1500">&#160;FONTSTYLE&#160;“italic” ;&#160;set&#160;italic&#160;variant<br/>&#160;FONTSTYLE&#160;“normal” ;&#160;set&#160;normal&#160;variant<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_1510">PICTURE (pic)</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1520">PICTURE is for </paragraph>
-<list type="unordered">
- <listitem>
- <paragraph role="listitem" xml-lang="en-US" id="par_1530">shape grouping;</paragraph>
- </listitem>
- <listitem>
- <paragraph role="listitem" xml-lang="en-US" id="par_1540">starting new line shapes;</paragraph>
- </listitem>
- <listitem>
- <paragraph role="listitem" xml-lang="en-US" id="par_1550">keeping the consistency of positions and line shapes at the left border.</paragraph>
- </listitem>
-</list>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1560">Shape grouping</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1570">&#160;;&#160;PICTURE&#160;[&#160;LibreLogo_commands&#160;]<br/>&#160;PICTURE&#160;[&#160;FORWARD&#160;100&#160;CIRCLE&#160;100&#160;] ;&#160;tree-like&#160;grouped&#160;shape<br/></paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1580">See also “Group” in LibreOffice Writer Help.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1590">&#160;TO&#160;tree&#160;location<br/>&#160;&#160;&#160;PENUP&#160;POSITION&#160;location&#160;HEADING&#160;0&#160;PENDOWN<br/>&#160;&#160;&#160;PICTURE&#160;[&#160;FORWARD&#160;100&#160;CIRCLE&#160;100&#160;] ;&#160;tree-like&#160;grouped&#160;shape<br/>&#160;END<br/>&#160;<br/>&#160;PICTURE&#160;[&#160;tree&#160;[30,&#160;50]&#160;tree&#160;[100,&#160;50]&#160;] ;&#160;grouped&#160;shapes&#160;in&#160;a&#160;grouped&#160;shape<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1600">Starting new line shapes</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1610">&#160;PICTURE ;&#160;start&#160;a&#160;new&#160;line&#160;shape<br/>&#160;FORWARD&#160;10&#160;PICTURE&#160;FORWARD&#160;10 ;&#160;two&#160;line&#160;shapes<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1620">Consistency at the left border</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1630">Use picture to keep the consistency of positions and line shapes at the left border of Writer:</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1640">&#160;PICTURE&#160;[&#160;CIRCLE&#160;20&#160;POSITION&#160;[-100,&#160;100]&#160;CIRCLE&#160;20&#160;]<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_1650">Loops</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1660">REPEAT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1670">&#160;;&#160;REPEAT&#160;number&#160;[&#160;commands&#160;]<br/>&#160;<br/>&#160;REPEAT&#160;10&#160;[&#160;FORWARD&#160;10&#160;LEFT&#160;45&#160;CIRCLE&#160;10&#160;] ;&#160;repeat&#160;10&#160;times<br/></paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1680">&#160;;&#160;number&#160;is&#160;optional<br/>&#160;<br/>&#160;REPEAT&#160;[&#160;POSITION&#160;ANY&#160;] ;&#160;endless&#160;loop<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1690">REPCOUNT</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1700">Loop variable (also in the FOR and WHILE loops).</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1710">&#160;REPEAT&#160;100&#160;[&#160;FORWARD&#160;REPCOUNT&#160;LEFT&#160;90&#160;]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1720">FOR IN</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1730">Loop for the list elements:</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1740">&#160;FOR&#160;i&#160;IN&#160;[1,&#160;5,&#160;7,&#160;9,&#160;11]&#160;[<br/>&#160;&#160;&#160;FORWARD&#160;i<br/>&#160;&#160;&#160;LEFT&#160;90<br/>&#160;]<br/></paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1750">Loop for the characters of a character sequence:</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1760">&#160;FOR&#160;i&#160;IN&#160;“text”&#160;[<br/>&#160;&#160;&#160;LABEL&#160;i<br/>&#160;&#160;&#160;FORWARD&#160;10<br/>&#160;]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1770">WHILE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1780">&#160;WHILE&#160;TRUE&#160;[&#160;POSITION&#160;ANY&#160;] ;&#160;endless&#160;loop<br/>&#160;WHILE&#160;REPCOUNT&#160;&lt;=&#160;10&#160;[&#160;FORWARD&#160;50&#160;LEFT&#160;36&#160;] ;&#160;as&#160;REPEAT&#160;10&#160;[&#160;...&#160;]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1790">BREAK</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1800">Stop the loop.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1810">&#160;REPEAT&#160;[ ;&#160;endless&#160;loop<br/>&#160;&#160;&#160;POSITION&#160;ANY<br/>&#160;&#160;&#160;IF&#160;REPCOUNT&#160;=&#160;100&#160;[&#160;BREAK&#160;]&#160;&#160;;&#160;equivalent&#160;of&#160;the&#160;REPEAT&#160;100&#160;[&#160;...&#160;]<br/>&#160;]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1820">CONTINUE</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1830">Jump into the next iteration of the loop.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1840">&#160;REPEAT&#160;100&#160;[<br/>&#160;&#160;&#160;POSITION&#160;ANY<br/>&#160;&#160;&#160;IF&#160;REPCOUNT&#160;%&#160;2&#160;&lt;>&#160;0&#160;[&#160;CONTINUE&#160;]<br/>&#160;&#160;&#160;CIRCLE&#160;10 ;&#160;draw&#160;circles&#160;on&#160;every&#160;2nd&#160;positions<br/>&#160;]<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_1850">Conditions</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1860">IF</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1870">&#160;;&#160;IF&#160;condition&#160;[&#160;true&#160;block&#160;]<br/>&#160;;&#160;IF&#160;condition&#160;[&#160;true&#160;block&#160;]&#160;[&#160;false&#160;block&#160;]<br/>&#160;<br/>&#160;IF&#160;a&#160;&lt;&#160;10&#160;[&#160;PRINT&#160;“Small”&#160;]<br/>&#160;IF&#160;a&#160;&lt;&#160;10&#160;[&#160;PRINT&#160;“Small”&#160;]&#160;[&#160;PRINT&#160;“Big”&#160;]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1880">AND, OR, NOT</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1890">Logical operators.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1900">&#160;IF&#160;a&#160;&lt;&#160;10&#160;AND&#160;NOT&#160;a&#160;&lt;&#160;5&#160;[&#160;PRINT&#160;“5,&#160;6,&#160;7,&#160;8&#160;or&#160;9”&#160;]<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_1910">Subroutines</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1920">TO, END</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1930">New word (or procedure).</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1940">&#160;TO&#160;triangle<br/>&#160;&#160;&#160;REPEAT&#160;[&#160;FORWARD&#160;100&#160;RIGHT&#160;120&#160;]&#160;FILL<br/>&#160;END<br/>&#160;<br/>&#160;REPEAT&#160;10&#160;[&#160;triangle&#160;PENUP&#160;POSITION&#160;ANY&#160;PENDOWN&#160;]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1950">OUTPUT</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1960">Return value of the function.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_1970">&#160;TO&#160;randomletter<br/>&#160;&#160;&#160;OUTPUT&#160;RANDOM&#160;“qwertzuiopasdfghjklyxcvbnm”<br/>&#160;END<br/>&#160;<br/>&#160;PRINT&#160;randomletter&#160;+&#160;randomletter&#160;+&#160;randomletter ;&#160;print&#160;3-letter&#160;random&#160;character&#160;sequence<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_1980">STOP</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_1990">Return from the procedure.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2000">&#160;TO&#160;example&#160;number<br/>&#160;&#160;&#160;IF&#160;number&#160;&lt;&#160;0&#160;[&#160;STOP&#160;]<br/>&#160;&#160;&#160;PRINT&#160;SQRT&#160;number ;&#160;print&#160;square&#160;root<br/>&#160;]<br/>&#160;<br/>&#160;example&#160;100<br/>&#160;example&#160;-1 ;&#160;without&#160;output&#160;and&#160;error<br/>&#160;example&#160;25<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_2010">Default variables</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2020">ANY</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_2030">Default random value of colors, etc.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2040">&#160;PENCOLOR&#160;ANY ;&#160;random&#160;pen&#160;color<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2050">TRUE</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_2060">Logical value.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2070">&#160;WHILE&#160;TRUE&#160;[&#160;POSITION&#160;ANY&#160;] ;&#160;endless&#160;loop<br/>&#160;PRINT&#160;TRUE ;&#160;print&#160;true<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2080">FALSE</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_2090">Logical value.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2100">&#160;WHILE&#160;NOT&#160;FALSE&#160;[&#160;POSITION&#160;ANY&#160;] ;&#160;endless&#160;loop<br/>&#160;PRINT&#160;FALSE ;&#160;print&#160;false<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2110">PAGESIZE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2120">&#160;PRINT&#160;PAGESIZE ;&#160;print&#160;list&#160;of&#160;the&#160;page&#160;sizes&#160;in&#160;points,&#160;eg.&#160;[595.30,&#160;841.89]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2130">PI/π</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2140">&#160;PRINT&#160;PI ;&#160;print&#160;3.14159265359<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_2150">Input/Output</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2160">PRINT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2170">&#160;PRINT&#160;“text” ;&#160;print&#160;“text”&#160;in&#160;a&#160;dialog&#160;box<br/>&#160;PRINT&#160;5&#160;+&#160;10 ;&#160;print&#160;15<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2180">INPUT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2190">&#160;PRINT&#160;INPUT&#160;“Input&#160;value?” ;&#160;ask&#160;and&#160;print&#160;a&#160;string&#160;by&#160;a&#160;query&#160;dialog&#160;box<br/>&#160;PRINT&#160;FLOAT&#160;(INPUT&#160;“First&#160;number?”)&#160;+&#160;FLOAT&#160;(INPUT&#160;“Second&#160;number?”)&#160;;&#160;simple&#160;calculator<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_2200">SLEEP</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2210">&#160;SLEEP&#160;1000 ;&#160;wait&#160;for&#160;1000&#160;ms&#160;(1&#160;sec)<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_2220">GLOBAL</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_2230">Set global variables used in procedures.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2240">&#160;GLOBAL&#160;about<br/>&#160;about&#160;=&#160;“LibreLogo”<br/>&#160;<br/>&#160;TO&#160;example<br/>&#160;&#160;&#160;PRINT&#160;about<br/>&#160;&#160;&#160;GLOBAL&#160;about ;&#160;when&#160;we&#160;want&#160;to&#160;add&#160;a&#160;new&#160;value<br/>&#160;&#160;&#160;about&#160;=&#160;“new&#160;value&#160;for&#160;the&#160;global&#160;variable”<br/>&#160;END<br/>&#160;<br/>&#160;example<br/>&#160;PRINT&#160;about<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_2250">Functions</paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2260">RANDOM</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2270">&#160;PRINT&#160;RANDOM&#160;100 ;&#160;random&#160;float&#160;number&#160;(0&#160;&lt;=&#160;x&#160;&lt;&#160;100)<br/>&#160;PRINT&#160;RANDOM&#160;“text” ;&#160;random&#160;letter&#160;of&#160;the&#160;“text”<br/>&#160;PRINT&#160;RANDOM&#160;[1,&#160;2] ;&#160;random&#160;list&#160;element&#160;(1&#160;or&#160;2)<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2280">INT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2290">&#160;PRINT&#160;INT&#160;3.8 ;&#160;print&#160;3&#160;(integer&#160;part&#160;of&#160;3.8)<br/>&#160;PRINT&#160;INT&#160;RANDOM&#160;100 ;&#160;random&#160;integer&#160;number&#160;(0&#160;&lt;=&#160;x&#160;&lt;&#160;100)<br/>&#160;PRINT&#160;INT&#160;“7” ;&#160;convert&#160;the&#160;string&#160;parameter&#160;to&#160;integer<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2300">FLOAT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2310">&#160;;&#160;convert&#160;the&#160;string&#160;parameter&#160;to&#160;float&#160;number<br/>&#160;PRINT&#160;2&#160;*&#160;FLOAT&#160;“5.5” ;&#160;print&#160;11.0<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2320">STR</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2330">&#160;;&#160;convert&#160;the&#160;number&#160;parameter&#160;to&#160;string<br/>&#160;PRINT&#160;“Result:&#160;”&#160;+&#160;STR&#160;5 ;&#160;print&#160;“Result:&#160;5”<br/>&#160;PRINT&#160;10&#160;*&#160;STR&#160;5 ;&#160;print&#160;5555555555<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2340">SQRT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2350">&#160;PRINT&#160;SQRT&#160;100 ;&#160;print&#160;10,&#160;square&#160;root&#160;of&#160;100<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2360">SIN</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2370">&#160;PRINT&#160;SIN&#160;90&#160;*&#160;PI/180 ;&#160;print&#160;1.0&#160;(sinus&#160;of&#160;90°&#160;in&#160;radians)<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2380">COS</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2390">&#160;PRINT&#160;COS&#160;0&#160;*&#160;PI/180 ;&#160;print&#160;1.0&#160;(sinus&#160;of&#160;0°&#160;in&#160;radians)<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2400">ROUND</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2410">&#160;PRINT&#160;ROUND&#160;3.8 ;&#160;print&#160;4&#160;(rounding&#160;3.8)<br/>&#160;PRINT&#160;ROUND&#160;RANDOM&#160;100 ;&#160;random&#160;integer&#160;number&#160;(0&#160;&lt;=&#160;x&#160;&lt;=&#160;100)<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2420">ABS</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2430">&#160;PRINT&#160;ABS&#160;-10 ;&#160;print&#160;10,&#160;absolute&#160;value&#160;of&#160;-10<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2440">COUNT</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2450">&#160;PRINT&#160;COUNT&#160;“text” ;&#160;print&#160;4,&#160;character&#160;count&#160;of&#160;“text”<br/>&#160;PRINT&#160;COUNT&#160;[1,&#160;2,&#160;3] ;&#160;print&#160;3,&#160;size&#160;of&#160;the&#160;list<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2460">SET</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2470">&#160;;&#160;Convert&#160;list&#160;to&#160;Python&#160;set<br/>&#160;PRINT&#160;SET&#160;[4,&#160;5,&#160;6,&#160;6] ;&#160;print&#160;{4,&#160;5,&#160;6}<br/>&#160;PRINT&#160;SET&#160;[4,&#160;5,&#160;6,&#160;6]&#160;|&#160;SET&#160;[4,&#160;1,&#160;9] ;&#160;print&#160;{1,&#160;4,&#160;5,&#160;6,&#160;9},&#160;union<br/>&#160;PRINT&#160;SET&#160;[4,&#160;5,&#160;6,&#160;6]&#160;&amp;&#160;SET&#160;[4,&#160;1,&#160;9] ;&#160;print&#160;{4},&#160;intersection<br/>&#160;PRINT&#160;SET&#160;([4,&#160;5,&#160;6,&#160;6])&#160;-&#160;SET&#160;[4,&#160;1,&#160;9] ;&#160;print&#160;{5,&#160;6},&#160;difference<br/>&#160;PRINT&#160;SET&#160;[4,&#160;5,&#160;6,&#160;6]&#160;^&#160;SET&#160;[4,&#160;1,&#160;9] ;&#160;print&#160;{1,&#160;5,&#160;6,&#160;9},&#160;symmetric&#160;difference&#160;&#160;<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2480">RANGE</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2490">&#160;;&#160;Python-like&#160;list&#160;generation<br/>&#160;PRINT&#160;RANGE&#160;10 ;&#160;print&#160;[0,&#160;1,&#160;2,&#160;3,&#160;4,&#160;5,&#160;6,&#160;7,&#160;8,&#160;9]<br/>&#160;PRINT&#160;RANGE&#160;3&#160;10 ;&#160;print&#160;[3,&#160;4,&#160;5,&#160;6,&#160;7,&#160;8,&#160;9]<br/>&#160;PRINT&#160;RANGE&#160;3&#160;10&#160;3 ;&#160;print&#160;[3,&#160;6,&#160;9]<br/>&#160;<br/>&#160;FOR&#160;i&#160;in&#160;RANGE&#160;10&#160;50&#160;10&#160;[ ;&#160;loop&#160;for&#160;[10,&#160;20,&#160;30,&#160;40]<br/>&#160;&#160;&#160;FORWARD&#160;i<br/>&#160;&#160;&#160;LEFT&#160;90<br/>&#160;]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2500">LIST</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2510">&#160;;&#160;remove&#160;the&#160;repeating&#160;elements&#160;of&#160;a&#160;list&#160;using&#160;set&#160;and&#160;list&#160;conversion<br/>&#160;PRINT&#160;LIST&#160;(SET&#160;[1,&#160;3,&#160;5,&#160;5,&#160;2,&#160;1]) ;&#160;print&#160;[1,&#160;3,&#160;5,&#160;2]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2520">TUPLE</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_2530">Conversion to Python tuple (non-modifiable list)</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2540">&#160;PRINT&#160;TUPLE&#160;[4,&#160;5]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2550">SORTED</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_2560">It returns with a sorted list.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2570">&#160;PRINT&#160;SORTED&#160;[5,&#160;1,&#160;3,&#160;4] ;&#160;print&#160;[1,&#160;3,&#160;4,&#160;5]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2580">SUB</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_2590">Substitue character sequences using regex (regular expression) patterns.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2600">&#160;PRINT&#160;SUB&#160;(“t”,&#160;“T”,&#160;“text”) ;&#160;print&#160;“Text”,&#160;replacing&#160;“t”&#160;with&#160;“T”<br/>&#160;PRINT&#160;SUB&#160;(“(.)”,&#160;“\\1\\1”,&#160;“text”)&#160;;&#160;print&#160;“tteexxtt”,&#160;doubling&#160;every&#160;characters<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2610">SEARCH</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_2620">Search character sequences patterns using regex patterns.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2630">&#160;IF&#160;SEARCH&#160;(“\w”,&#160;word)&#160;[&#160;PRINT&#160;“Letter&#160;in&#160;the&#160;word.”&#160;]<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2640">FINDALL</paragraph>
-<paragraph role="paragraph" xml-lang="en-US" id="par_2650">Find all character sequences in the input string matching the given regex pattern.</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2660">&#160;PRINT&#160;FINDALL(“\w+”,&#160;“Dogs,&#160;cats.”) ;&#160;print&#160;[“Dogs”,&#160;“cats”],&#160;the&#160;list&#160;of&#160;the&#160;words.<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2670">MIN</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2680">&#160;PRINT&#160;MIN&#160;[1,&#160;2,&#160;3] ;&#160;print&#160;1,&#160;the&#160;lowest&#160;element&#160;of&#160;the&#160;list<br/></paragraph>
-<paragraph role="heading" level="3" xml-lang="en-US" id="hd_2690">MAX</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2700">&#160;PRINT&#160;MAX&#160;[1,&#160;2,&#160;3] ;&#160;print&#160;3,&#160;the&#160;greatest&#160;element&#160;of&#160;the&#160;list<br/></paragraph>
-<paragraph role="heading" level="2" xml-lang="en-US" id="hd_2710">Color constants</paragraph>
-<paragraph role="code" xml-lang="en-US" id="par_2720">&#160;PENCOLOR&#160;“SILVER” ;&#160;set&#160;by&#160;name<br/>&#160;PENCOLOR&#160;[1] ;&#160;set&#160;by&#160;identifiers<br/>&#160;PENCOLOR&#160;“~SILVER” ;&#160;random&#160;silver&#160;color<br/>&#160;<br/></paragraph>
-<table><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2740">Identifier</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2750">Name</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2770">0</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2780">BLACK</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2800">1</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2810">SILVER</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2830">2</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2840">GRAY/GREY</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2860">3</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2870">WHITE</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2890">4</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2900">MAROON</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2920">5</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2930">RED</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2950">6</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2960">PURPLE</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2980">7</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_2990">FUCHSIA/MAGENTA</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3010">8</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3020">GREEN</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3040">9</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3050">LIME</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3070">10</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3080">OLIVE</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3100">11</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3110">YELLOW</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3130">12</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3140">NAVY</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3160">13</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3170">BLUE</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3190">14</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3200">TEAL</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3220">15</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3230">AQUA</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3250">16</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3260">PINK</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3280">17</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3290">TOMATO</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3310">18</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3320">ORANGE</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3340">19</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3350">GOLD</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3370">20</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3380">VIOLET</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3400">21</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3410">SKYBLUE</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3430">22</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3440">CHOCOLATE</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3460">23</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3470">BROWN</paragraph></tablecell>
-</tablerow><tablerow>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3490">24</paragraph></tablecell>
-<tablecell><paragraph role="tablecontent" xml-lang="en-US" id="par_3500">INVISIBLE</paragraph></tablecell>
-</tablerow></table>
-</body></helpdocument>
diff --git a/librelogo/source/help/en-US/help.tree b/librelogo/source/help/en-US/help.tree
deleted file mode 100644
index 10d79ef2958a..000000000000
--- a/librelogo/source/help/en-US/help.tree
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
--->
-
-<tree_view>
-<help_section application="swriter" id="02" title="LibreLogo">
- <node id="0225" title="LibreLogo">
- <topic id="help/org.openoffice.comp.pyuno.LibreLogo/LibreLogo.xhp">LibreLogo</topic>
- </node>
-</help_section>
-</tree_view>
diff --git a/librelogo/source/pythonpath/librelogodummy_path.py b/librelogo/source/pythonpath/librelogodummy_path.py
deleted file mode 100644
index 3ab8495ecc1f..000000000000
--- a/librelogo/source/pythonpath/librelogodummy_path.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-import uno, re, sys, os, traceback
-def get_path():
- return os.path.join(os.path.dirname(sys.modules[__name__].__file__), __name__ + ".py")
-
-# vim: set noet sw=4 ts=4:
diff --git a/librelogo/source/registry/data/org/openoffice/Office/Addons.xcu b/librelogo/source/registry/data/org/openoffice/Office/Addons.xcu
deleted file mode 100644
index 3f608d7302a1..000000000000
--- a/librelogo/source/registry/data/org/openoffice/Office/Addons.xcu
+++ /dev/null
@@ -1,286 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
--->
-
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
- <node oor:name="AddonUI">
- <node oor:name="OfficeToolBar">
- <node oor:name="LibreLogo.OfficeToolBar" oor:op="replace">
- <node oor:name="m01" oor:op="replace">
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$goforward?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Forward</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- <node oor:name="m02" oor:op="replace">
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$gobackward?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Back</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- <node oor:name="m03" oor:op="replace">
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$left?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Left</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- <node oor:name="m04" oor:op="replace">
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$right?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Right</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- <node oor:name="m05" oor:op="replace">
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$run?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Start (the program in the Writer document)</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- <node oor:name="m06" oor:op="replace">
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$stop?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Stop</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- <node oor:name="m07" oor:op="replace">
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$home?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Home</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- <node oor:name="m08" oor:op="replace">
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$clearscreen?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Clear screen</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- <node oor:name="m09" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$commandline?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Logo command line (press F1 here for help)</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="ControlType" oor:type="xs:string">
- <value>Editfield</value>
- </prop>
- <prop oor:name="Width" oor:type="xs:long">
- <value>300</value>
- </prop>
- </node>
- <node oor:name="m10" oor:op="replace">
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$__translate__?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Uppercase commands, also translate them to the language of the document</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="Images">
- <node oor:name="logo-forward" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$goforward?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmallURL">
- <value>%origin%/icons/sc_arrowshapes.up-arrow.png</value>
- </prop>
- <prop oor:name="ImageBigURL">
- <value>%origin%/icons/lc_arrowshapes.up-arrow.png</value>
- </prop>
- </node>
- </node>
- <node oor:name="logo-backward" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$gobackward?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmallURL">
- <value>%origin%/icons/sc_arrowshapes.down-arrow.png</value>
- </prop>
- <prop oor:name="ImageBigURL">
- <value>%origin%/icons/lc_arrowshapes.down-arrow.png</value>
- </prop>
- </node>
- </node>
- <node oor:name="logo-left" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$left?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmallURL">
- <value>%origin%/icons/sc_arrowshapes.circular-leftarrow.png</value>
- </prop>
- <prop oor:name="ImageBigURL">
- <value>%origin%/icons/lc_arrowshapes.circular-leftarrow.png</value>
- </prop>
- </node>
- </node>
- <node oor:name="logo-right" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$right?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmallURL">
- <value>%origin%/icons/sc_arrowshapes.circular-arrow.png</value>
- </prop>
- <prop oor:name="ImageBigURL">
- <value>%origin%/icons/lc_arrowshapes.circular-arrow.png</value>
- </prop>
- </node>
- </node>
- <node oor:name="logo-run" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$run?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmallURL">
- <value>%origin%/icons/sc_runbasic.png</value>
- </prop>
- <prop oor:name="ImageBigURL">
- <value>%origin%/icons/lc_runbasic.png</value>
- </prop>
- </node>
- </node>
- <node oor:name="logo-stop" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$stop?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmallURL">
- <value>%origin%/icons/sc_basicstop.png</value>
- </prop>
- <prop oor:name="ImageBigURL">
- <value>%origin%/icons/lc_basicstop.png</value>
- </prop>
- </node>
- </node>
- <node oor:name="logo-home" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$home?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmallURL">
- <value>%origin%/icons/sc_navigationbarleft.png</value>
- </prop>
- <prop oor:name="ImageBigURL">
- <value>%origin%/icons/lc_navigationbarleft.png</value>
- </prop>
- </node>
- </node>
- <node oor:name="logo-clearscreen" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$clearscreen?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmallURL">
- <value>%origin%/icons/sc_newdoc.png</value>
- </prop>
- <prop oor:name="ImageBigURL">
- <value>%origin%/icons/lc_newdoc.png</value>
- </prop>
- </node>
- </node>
- <node oor:name="logo-translate" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:librelogo.oxt|LibreLogo|LibreLogo.py$__translate__?language=Python&amp;location=user:uno_packages</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmallURL">
- <value>%origin%/icons/sc_editglossary.png</value>
- </prop>
- <prop oor:name="ImageBigURL">
- <value>%origin%/icons/lc_editglossary.png</value>
- </prop>
- </node>
- </node>
-
- </node>
-
- </node>
-</oor:component-data>
diff --git a/librelogo/source/registry/data/org/openoffice/Office/UI/StartModuleWindowState.xcu b/librelogo/source/registry/data/org/openoffice/Office/UI/StartModuleWindowState.xcu
deleted file mode 100644
index 96e63938d634..000000000000
--- a/librelogo/source/registry/data/org/openoffice/Office/UI/StartModuleWindowState.xcu
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
--->
-
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="StartModuleWindowState" oor:package="org.openoffice.Office.UI">
- <node oor:name="UIElements">
- <node oor:name="States">
- <node oor:name="private:resource/toolbar/addon_LibreLogo.OfficeToolBar" oor:op="replace">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Logo</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Locked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/librelogo/source/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu b/librelogo/source/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
deleted file mode 100644
index 8d87c561d0c2..000000000000
--- a/librelogo/source/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
--->
-
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="WriterWindowState" oor:package="org.openoffice.Office.UI">
- <node oor:name="UIElements">
- <node oor:name="States">
- <node oor:name="private:resource/toolbar/addon_LibreLogo.OfficeToolBar" oor:op="replace">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Logo</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Locked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- </node>
- </node>
-</oor:component-data>