summaryrefslogtreecommitdiffstats
path: root/librelogo
Commit message (Collapse)AuthorAgeFilesLines
* sanitize LibreLogo callsLászló Németh2019-06-071-1/+50
| | | | | | | | | | | Change-Id: Ie4d9858e5b4b3e55ab08416fb9338d2df34ee5e1 Reviewed-on: https://gerrit.libreoffice.org/73627 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 1b63fa32bbd4a5b89d2ee3a53b28de4250c8dad3) Reviewed-on: https://gerrit.libreoffice.org/73638 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* LibreLogo: fix RANGE with a single function argumentLászló Németh2019-04-251-3/+3
| | | | | | | | | | | | | | | | in a FOR loop, by removing the range(x,,)-like double commas in this case, too, during program compilation. Previous empty (missing) argument of RANGE was checked by the terminating comma, but it can be a white space after it, as in the following example: FOR i IN RANGE COUNT 'letter' [ PRINT i ] Change-Id: I67d0a4f089be06f30003d1b979b8f1801dbfa2e9 Reviewed-on: https://gerrit.libreoffice.org/71263 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* Don't set LANG env var by accidentStephan Bergmann2019-04-181-4/+4
| | | | | | | | | | | | | ...as setting a GNU Make LANG var exports it to recipes as an env var, and see e.g. 56bc0b1a376f62570a7287e9bb4193e00360c978 "Don't set locale env vars on macOS" for potential problems caused by that. This is the core half of a change spanning the core and help repos. Change-Id: Ib7ae3b6edcef0b70e211a01aad4b3bd5c8905e06 Reviewed-on: https://gerrit.libreoffice.org/70929 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#124035 LibreLogo: support starting colon in variable namesLászló Németh2019-03-131-1/+1
| | | | | | | | | | Regression from the commit 740b99783b5480fcd1e5fce7c1beb5967d015041 "tdf#120413 LibreLogo: handle complex Logo expressions". Change-Id: Iaae54efacf86a03a6611c154a40068ed058d43e7 Reviewed-on: https://gerrit.libreoffice.org/69138 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* Adapt LibreLogo.py to Python 3.7 re.sub changeStephan Bergmann2018-11-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a build using the system Python during build (i.e., not using --enable-python=fully-internal) on Fedora 29 (where /usr/bin/python3 is 3.7.1), UITest_librelogo failed with > ====================================================================== > FAIL: test_compile_librelogo (compile.LibreLogoCompileTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/data/sbergman/lo-system/core/sw/qa/uitest/librelogo/compile.py", line 128, in test_compile_librelogo > self.assertEqual(test[1], re.sub(r'(\n| +\n)+', '\n', re.sub(r'\( ', '(', compiled)).strip()) > AssertionError: 'glob[52 chars]_#\n label(_y + _z)\n #_@L_i_N_e@_#\n#_@L_i_N_e@_#\nx(25, 26)' != 'glob[52 chars]_#\n label(_y + _z)\n #_@L_i_N_e@_#\n#_@L_i_N_e@_#\nx(25, ,26)' > global x > def x(_y, _z): > __checkhalt__() > #_@L_i_N_e@_# > label(_y + _z) > #_@L_i_N_e@_# > #_@L_i_N_e@_# > - x(25, 26)+ x(25, ,26)? + > > > ---------------------------------------------------------------------- due to an upstream Python change discussed at <https://bugs.python.org/issue34982#msg329418> "re.sub() different behavior in 3.7". I am not sure that upstream change really makes sense, despite that being explicitly confirmed in <https://bugs.python.org/issue34982#msg329420>. But lets tweak our code to adapt to that anyway. (There may be further places in LibreLogo.py that would need similar changes; I just fixed enough to make UITest_librelogo succeed for me.) Change-Id: I6c8f4b78f63953d582b88037fa56388b50af2b54 Reviewed-on: https://gerrit.libreoffice.org/63038 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Removed not-used variableAndrea Gelmini2018-11-061-1/+0
| | | | | | | | | | Not sure about this, but just to catch the eye of the pro. Git blame says 2012, so maybe it's really no more used Change-Id: I737f3a1b2803f6ce98cb461350db18d06e0bf981 Reviewed-on: https://gerrit.libreoffice.org/62910 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
* LibreLogo: function calls and definitions can be in any orderLászló Németh2018-11-061-12/+21
| | | | | | | | | | | | | with Logo syntax, too. Mutual recursion, for example drawing dragon curve (see in the unit test of the commit) doesn't need Python syntax any more to call the function before its definition. Change-Id: I93426a8c5be394fb4f1203e0490f7fa8d8491597 Reviewed-on: https://gerrit.libreoffice.org/62926 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* Fix typoAndrea Gelmini2018-11-051-2/+2
| | | | | | | | Change-Id: I9508839d67e5723db5f9155560fdaef333a689f8 Reviewed-on: https://gerrit.libreoffice.org/62911 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
* tdf#120413 LibreLogo: handle complex Logo expressionsLászló Németh2018-11-051-43/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of the incomplete heuristic parenthesis expansion, now expressions with Logo functions and with own procedures are parsed completely, solving several issues with complex Logo expressions. For example, now functions with more than 1 argument don't need explicit parenthesization. NOTE: to handle both Logo and Python syntaxes of function calls, we differentiate the forms "f(x)" and "f (x)". The second form is handled as Logo syntax, not the Python one: f x*2 y z -> f(x*2, y, z) f(x*2, x, z) -> f(x*2, y, z) f (x*2) y z -> f((x*2), y, z) so if you want to avoid of the following expansion: sin 45 + cos 45 -> sin(45 + cos(45)) it's possible to use the following parenthesizations: sin(45) + cos 45 -> sin(45) + cos(45) (sin 45) + cos 45 -> (sin(45)) + cos(45) but not sin (45) + cos 45 -> sin((45) + cos(45)) Change-Id: Ib0602b47b8b678a352313f471599d44d6904ce17 Reviewed-on: https://gerrit.libreoffice.org/62901 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* LibreLogo: stop program immediately at pressing CancelLászló Németh2018-11-051-0/+5
| | | | | | | | | | button of the inputbox or messagebox dialog window, instead of waiting for the next __checkhalt__() in a loop. Change-Id: I1366ad06152e70321a21e78a626f7a89eb5a7ea0 Reviewed-on: https://gerrit.libreoffice.org/62900 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* LibreLogo: support backslash escape sequence for apostrophesLászló Németh2018-10-261-3/+4
| | | | | | | | | (ASCII and typographical) and for enclosing quotes of string literals. Change-Id: I3caf3b707afa1fb41ba3afe9ff12ebce7ce63847 Reviewed-on: https://gerrit.libreoffice.org/62384 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* LibreLogo: add unit tests for program compilationLászló Németh2018-10-261-0/+3
| | | | | | | | | from LibreLogo to Python Change-Id: I39df100a13efe3573b33cb856701cbeb0d95954d Reviewed-on: https://gerrit.libreoffice.org/62364 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* LibreLogo: add unit testsLászló Németh2018-10-251-0/+3
| | | | | | | | | | | | | | | | for program running and command name expansion, and for following fixes: tdf#106792: regression in line length and continuous line drawing tdf#100941: line breaking by "magic wand" tdf#120422: program lines are different paragraphs by "magic wand" Also add function __is_alive__() to LibreLogo.py to check LibreLogo program termination via XScript API. Change-Id: If884b3fd608a6e8077be853eb2dd17fbdfff2011 Reviewed-on: https://gerrit.libreoffice.org/62263 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* tdf#120422 LibreLogo: fix page and line formatting of "magic wand"László Németh2018-10-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Format program lines as paragraphs, instead of a single paragraph with line breaks: - basic debug feature "jump to the bad line" works after formatting - fix 2-page editing area: page break before the LibreLogo program Now formatting of program lines doesn't depend on the actual regular expression setting of Search & Replace functionality of Writer, so this is the intended fix for tdf#100941 "LibreLogo: 'magic wand' icon inserts incorrect '\n' characters instead of paragraph breaks". NOTE: setting also AlgorithmType, not only AlgorithmType2 prevents crashing of LibreOffice at opening Search & Replace dialog after usage of the "magic wand" icon. partial revert of the commit b1a6d157683b8182089ed5854179c8da8c416304 Resolves: tdf#100941 LibreLogo: replace literal '\n' with newline Change-Id: I34f581278fdae8d41967800d05662e37b731b59d Reviewed-on: https://gerrit.libreoffice.org/61610 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
* LibreLogo: fix regression of line drawingLászló Németh2018-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | related to measurement changes, for example we got only 5.7 cm long line for "FORWARD 10cm", because the processed value measured in 0.0100 mm instead of the correct twips (pt/20 ~ 0.0176mm). Note: only the line drawing was shorter, the turtle path didn't change, so the turle could draw only dashed line for multiple FORWARD or BACK, instead of a continuous one. regression from commit 36bade04d3780bc54c51b46bb0b63e69789658a5 tdf106792 Get rid of SvxShapePolyPolygonBezier Change-Id: I16d75dbdadef5af9c545abc86575490559b3d54c Reviewed-on: https://gerrit.libreoffice.org/61145 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* tdf#113592 LibreLogo: add fallback localization to fix platform issuesLászló Németh2017-11-051-17/+212
| | | | | | | | | | | Update: python3 LibreLogo.py LibreLogo*.properties Change-Id: Ib631f53b47f1f00b14338534cc82d94f33c48233 Reviewed-on: https://gerrit.libreoffice.org/44203 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
* enum spelling: throught -> throughJustin Luth2017-04-121-4/+4
| | | | | | | | | | | | | git grep -l "[ _\.]THROUGHT" | xargs sed -i 's/THROUGHT/THROUGH/g' git grep -l -i "[ _\.]THROUGHT" | xargs sed -i 's/throught/through/g' In ENUMs: THROUGHT = THROUGH (preserved as valid alternate spelling) In ooxmlexport8 - unit test confirms THROUGH = THROUGHT Change-Id: Iae0fef9a8adcb96761989f38903a24ffb1b91e77 Reviewed-on: https://gerrit.libreoffice.org/35998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Wrong Unicode character referenceAdolfo Jayme Barrientos2017-03-291-1/+1
| | | | | | | Isn’t it better to just use the desired characters directly, given that “\uHEX”-style references are so error-prone? Change-Id: I307b1fad7a9e0a23a38925e3c84829f823decf6e
* Fix typosAndrea Gelmini2017-03-021-1/+1
| | | | | | | Change-Id: Ic6c41fbcc36c11a7528cde0986593a39c2d6738b Reviewed-on: https://gerrit.libreoffice.org/34803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#101603: fix lgnpath for MacOs in LibreLogoJulien Nabet2016-11-271-2/+6
| | | | | | | Change-Id: I280b6cd02a98037a71701a6a7a540c87de22d07f Reviewed-on: https://gerrit.libreoffice.org/31268 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* normalize existing emacs/vim mode-lines in python filesMichael Stahl2016-10-261-2/+2
| | | | | | | | | Bunch of these were setting C++ or Make modes and icky tabs... Also, reportedly Emacs can figure out to enable python-mode automatically. Change-Id: I50072488fb92cb4d27aa3f74f717a28ae3967543
* Resolves: tdf#100941 LibreLogo: replace literal '\n' with newlineTakeshi Abe2016-07-181-2/+2
| | | | | | | | | | | by simple SearchAlgorithms2's ABSOLUTE(=1), rather than using SearchAlgorithms' REGEXP(=1). BTW avoid RowDirection because it is for Calc only. Change-Id: I50ab460110ed43befb3e378e94f4fda0f2777f4d Reviewed-on: https://gerrit.libreoffice.org/27250 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* fix broken PICTURE (group handling) of LibreLogoLászló Németh2015-08-181-6/+6
| | | | | | | (a regression caused by the PyUNO changes of commit af8143bc40cf2cfbc12e77c9bb7de01b655f7b30) Change-Id: I62112555a997f8f57059de21e0f0b174f3c673c6
* Related: tdf#92287 Add LibreLogo Tango icons for future useAdolfo Jayme Barrientos2015-07-0218-0/+0
| | | | Change-Id: I8d1767c64fcdf68084590c7faf869700e7b6ddf3
* tdf#92287: Store the Breeze icons for LibreLogo in a subdir.Jan Holesovsky2015-07-0218-0/+0
| | | | Change-Id: Ib0492a20a83deba2dc4a59a4277072cf140b12c6
* Revert "Related: tdf#92287 Breeze: change LogoToolbar icons into breeze icons"Jan Holesovsky2015-07-0218-0/+0
| | | | | | | | We don't have a mechanism to use different icon set for extensions; let's do it at some stage, but until then, please let's not modify the icons to breeze only. This reverts commit 48ecae47a5d1911296549fd31378ff07b402d2ab.
* Related: tdf#92287 Breeze: change LogoToolbar icons into breeze iconsandreask2015-07-0218-0/+0
| | | | Change-Id: I8e576afc2d7d57b6b3d56788e69fc5e1fa3c39ab
* tdf#92368 fix saved positions of arcs, segments drawn by LibreLogoLászló Németh2015-06-271-0/+4
| | | | Change-Id: I8f622680ddd31d0a7048c14c85932ae495ae0f5e
* LibreLogo: CLOSE closes, FILL fills points, tooLászló Németh2015-05-181-2/+19
| | | | | | | | | | | | | | | Example: drawing square within a circle: PENUP REPEAT 4 [ FORWARD 100 POINT BACK 100 RIGHT 360/4 ] FILL CIRCLE 200 Change-Id: Ica3ce44306fc985717ff73e8a3dec5dddf69f19b
* tdf#90723 LibreLogo: missing oldlcap initializationLászló Németh2015-04-201-0/+1
| | | | Change-Id: I0781e4d8d9a9c2c9b8ef9968babeca8274d126ec
* avoid exceeding commandline limitsChristian Lohmaier2014-11-101-2/+1
| | | | | | | by using make's file function via the var2file wrapper instead of using loooooong echo statements Change-Id: Ie81007ad7de8c4e9f4d07724fba3cbe0e93f821d
* Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTINGTor Lillqvist2014-10-221-1/+1
| | | | | | | | Feature test macros that govern conditional compilation should be defined in config_*.h include files, not on the compilation command line. Change-Id: I40575a4762fd2564f10927b6f38a112dd9f9a3d7
* fdo#75109 librelogo: fix localized proceduresLászló Németh2014-03-311-1/+6
| | | | Change-Id: Ia6edb02b871a41828758ba5fd5376c811c4084cc
* librelogo UI fixes, gradients, log10, improved random colorsLászló Németh2014-03-183-28/+161
| | | | Change-Id: I7ef59f9ce589ab0d68b02c1b2ba61c061f9c51ae
* librelogo: keep comments at translationLászló Németh2014-02-041-1/+13
| | | | | | Bug report: http://openscope.org/browse/OOO-837 Change-Id: I5c17ed6059107ec8fc12bf9f411e52b22f131065
* LibreLogo is not a UNO componentStephan Bergmann2014-01-301-4/+0
| | | | Change-Id: I48055d84fd078a131ed8f620575a462fcb101019
* Remove bad Emacs mode lineStephan Bergmann2014-01-081-1/+0
| | | | Change-Id: Iffefd979cbe5c3ba8daafa92e33e9a288d2d906c
* Some ConfigurationProvider -> theDefaultProvider simplificationsStephan Bergmann2014-01-081-1/+1
| | | | Change-Id: I7c25cd94f8a1ca339f7423c26f21f13c7a68906d
* librelogo: fix messagebox (API changes)László Németh2014-01-071-2/+2
| | | | Change-Id: I7fe8c26b7ca93319658c14abd1142f1623141ce8
* fdo#73199 librelogo: path, interop. and color name fixesLászló Németh2014-01-011-2/+18
| | | | Change-Id: I201c498b0ff002ed92c2fcf9847ac1efc50b3fde
* gbuild: set Package default target to INSTDIRMichael Stahl2013-10-282-4/+0
| | | | Change-Id: I2bc45e4ba63f5faaee7389bcd9d7b3f563503186
* fdo#70951 librelogo: fix parsing problem of functionsLászló Németh2013-10-281-1/+1
| | | | Change-Id: I2e85a795064ee9e58f3389aec94c942f6ae77612
* fdo#70858 librelogo: fix Logo program halt at font settings (Windows)László Németh2013-10-251-6/+30
| | | | Change-Id: I3c51ba693caa80c8b530a9eee932a48a125e2eca
* librelogo: fix division with measurementsLászló Németh2013-10-251-4/+4
| | | | Change-Id: I2204002533bbb3e7c801b3228b0310a42b19a882
* librelogo: more invisible settings (on UI, hatching), see ChangeLogLászló Németh2013-10-242-12/+49
| | | | Change-Id: Icb0d195ba82b023d370847242b4e3b5546fa0320
* librelogo: fix Writer/Draw synchronization in cropped SVG exportLászló Németh2013-10-241-5/+12
| | | | Change-Id: Id7dc7a2853a8c56ee56eab55c078650e16c278fd
* librelogo: fix blinking LABELLászló Németh2013-10-241-0/+1
| | | | Change-Id: I807dda255b741996480116fab22377b39bf963b4
* librelogo: support linecap settingsLászló Németh2013-10-232-1/+23
| | | | Change-Id: I3d501900f4a2bc2424f4133e4fb9f3efe8b0c510
* librelogo: optional SVG/SMIL looping (at ending SLEEP)László Németh2013-10-231-6/+13
| | | | Change-Id: I3c05c5f7e1721a20e6eab12e2aa620aa917b7378
* librelogo: fix black (not refreshed) invisible filling colorLászló Németh2013-10-221-1/+1
| | | | Change-Id: If0f37d480a745a4d245c4c6cf114374223fda610