In python its valid syntax making `tuple assignments` like: x, y, z = 42, math.pi, 99 or PY3 also: x, y , *all_the_rest = some_list_with_undefined_length unfortunatly the functions in Scripts with those assignments, becomes no visible in the GUI. here's the patch to fix this issue: --- /opt/libreoffice4.4/program/pythonscript.py #old +++ /opt/libreoffice4.4/program/pythonscript.py #new @@ -403,7 +403,12 @@ allFuncs.append(node.name) elif isinstance(node, ast.Assign): for target in node.targets: - if target.id == "g_exportedScripts": + try: + identifier = target.id + except AttributeError: + identifier = "" + pass + if identifier == "g_exportedScripts": for value in node.value.elts: g_exportedScripts.append(value.id) return g_exportedScripts
Created attachment 116467 [details] patch for $program/pythonscript.py
see also http://ask.libreoffice.org/en/question/51702/macro-selector-failing-to-find-python-macros/
I also have this or a very similar problem: tuple assignments at the global scope result in the functions in that script to become not visible from the GUI.
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.1.5 or 5.2.1 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20160920
Bug still present with same behaviour in LibreOffice 5.1.5.2 (x64) Windows 10.0.14393
Hi @oz_dkj@yahoo.co.uk On filing the bug I has already posted the fix … … tomorrow is Bug-hunting-session for 5.3 … but nobody of the Devs since 1 1/2 year was able to copy&paste 6 lines of sourcecode that should frustrate many "bughunters"
i'm sorry that nobody looked at this patch here, but generally developers don't often have time to search bugzilla for things that don't look like serious bugs, so we recommend to send patches to our gerrit code review server. https://wiki.documentfoundation.org/Development/gerrit
Werner Tietz committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7ef47336411389ac492729bef52fe62aebe90f5a tdf#92007 python scripts with tuple-assignments fails on access from GUI It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Werner Tietz committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9a6d78b722f3a49f71a680e49cf64e7cfb637c43&h=libreoffice-5-3 tdf#92007 python scripts with tuple-assignments fails on access from GUI It will be available in 5.3.3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.