Kaydet (Commit) 78234602 authored tarafından Andras Timar's avatar Andras Timar

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
üst 5c34ee43
# -*- 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:
# -*- 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:
# -*- 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:
......@@ -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
......
# -*- 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:
# -*- 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:
<?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
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.
Programming language and environment for education, graphic design and desktop publishing. Usage: View→Toolbars→Logo toolbar in Writer. See Logo in LibreOffice Help.
<?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>
This diff is collapsed.
<?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>
# -*- 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:
<?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>
<?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>
......@@ -123,6 +123,7 @@ $(eval $(call gb_Configuration_add_spool_langpack,registry,officecfg/registry/da
$(eval $(call gb_Configuration_add_localized_datas,registry,officecfg/registry/data,\
org/openoffice/Setup.xcu \
org/openoffice/Office/Accelerators.xcu \
org/openoffice/Office/Addons.xcu \
org/openoffice/Office/Common.xcu \
org/openoffice/Office/SFX.xcu \
org/openoffice/Office/DataAccess.xcu \
......
......@@ -720,6 +720,20 @@
<value>true</value>
</prop>
</node>
<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>
<prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
<value>false</value>
</prop>
</node>
</node>
</node>
</oor:component-data>
......@@ -213,6 +213,7 @@ MY_FILES_main = \
$(MY_XCU)/Inet.xcu \
$(MY_XCU)/Interaction.xcu \
$(MY_XCU)/Office/Accelerators.xcu \
$(MY_XCU)/Office/Addons.xcu \
$(MY_XCU)/Office/Calc.xcu \
$(MY_XCU)/Office/Canvas.xcu \
$(MY_XCU)/Office/Common.xcu \
......
......@@ -136,6 +136,15 @@ File gid_File_Scripts_Python
Name = "ScriptsPython.zip";
End
//LibreLogo turtle graphics
File gid_File_LibreLogo
TXT_FILE_BODY;
Styles = (ARCHIVE);
Dir = gid_Dir_Share_Scripts;
Name = "LibreLogo.zip";
End
// Scripting Framework Python configuration settings
File gid_File_Share_Registry_Pyuno_Xcd
......
......@@ -57,6 +57,7 @@ Module gid_Module_Optional_Pyuno
gid_File_Lib_Python_So,
gid_File_Lib_Python3_So,
gid_File_Scripts_Python,
gid_File_LibreLogo,
gid_File_Share_Registry_Pyuno_Xcd);
Unixlinks = (gid_Unixlink_Python_Headers,
gid_Unixlink_Python_LibreOfficePython,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment