Bug 126390 - Redevelop Tools Macro Submenu for Multiple Computer Languages
Summary: Redevelop Tools Macro Submenu for Multiple Computer Languages
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-UI
  Show dependency treegraph
 
Reported: 2019-07-14 20:40 UTC by Konstantin Kharlamov
Modified: 2023-01-28 07:50 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Tools Macros Proposed Menu (27.53 KB, image/png)
2021-08-08 05:23 UTC, flywire
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kharlamov 2019-07-14 20:40:32 UTC
# Steps to reproduce

1. Open lowriter or localc
2. Go to Tools → Macros → Organize Macros → Python…

## Expected

In the new window the "Create" button should be active, so a user can create a macro.

## Actual

"Create" button is grayed out.

# Additional information

This looks very bad: there's at least a question on StackOverflow about it with 21k views https://stackoverflow.com/questions/21413664/how-to-run-python-macros-in-libreoffice
Comment 1 Oliver Brinzing 2019-07-15 16:59:53 UTC
issue seems to be inherited from OpenOfffice
Comment 2 Roman Kuznetsov 2019-07-16 21:02:03 UTC
Konstantin, unfortunately for using Python macroses in LO, you shoud install APSO extension https://extensions.libreoffice.org/extensions/apso-alternative-script-organizer-for-python
Comment 3 Konstantin Kharlamov 2019-07-16 23:03:34 UTC
(In reply to Roman Kuznetsov from comment #2)
> Konstantin, unfortunately for using Python macroses in LO, you shoud install
> APSO extension
> https://extensions.libreoffice.org/extensions/apso-alternative-script-
> organizer-for-python

Thanks, so, for this menu to work this extension needs to be shipped with LO out-of-the-box then?
Comment 4 Julien Nabet 2019-09-17 10:07:11 UTC
Xisco/Heiko: from UI point of view, if Python macro isn't provided out-of-the-box, shouldn't Python menu entry be removed by default?
Indeed an extension can add an entry and at least we wouldn't have a disabled button by default. I had also searched how to use this feature and had given up.
Comment 5 Konstantin Kharlamov 2019-09-17 10:17:16 UTC
Vast majority of systems has Python installed. Please, just distribute the extension necessary to make it work by default. The extension doesn't weight too much, or does it?
Comment 6 Heiko Tietze 2019-09-17 11:34:00 UTC
(In reply to Julien Nabet from comment #4)
> if Python macro isn't provided... shouldn't Python menu entry be removed

You still can _Run_ the macro. Or edit. So hiding the entry makes no sense to me.

I would rather not distinguish between the languages at the menu and have Run, Edit (could also be started from the Organize dialog), and Organize there. And at the Run/Organize dialog we could have a filter for the different types.
Comment 7 Julien Nabet 2019-09-17 12:07:05 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to Julien Nabet from comment #4)
> > if Python macro isn't provided... shouldn't Python menu entry be removed
> ...
> I would rather not distinguish between the languages at the menu and have
> Run, Edit (could also be started from the Organize dialog), and Organize
> there. And at the Run/Organize dialog we could have a filter for the
> different types.

Sorry, I meant removing "Create" button in Python part.
(Also, it astonishes me that we embed rhino for Javascript macro + beanshell and nothing for Python but that's another story).
Comment 8 Kevin Suo 2020-10-26 01:07:58 UTC
This is not a bug, but I agree to make this an enhancenent request. To write python macros, one must manually create this .py files with your text editor and place it in the required location. This is well documented, see:
https://help.libreoffice.org/6.4/en-US/text/sbasic/python/main0000.html

I suggest, when clicking on the create button, the user be directed to the help page, or to a popup dialog explaining how to create a python macro. I think it's the basic skills that one understand these explanation when one can write macros in python.

APSO is great, but in my opinion a lot of improvements should be made before it can be bundled as default.
Comment 9 flywire 2021-08-08 05:23:02 UTC
Created attachment 174130 [details]
Tools Macros Proposed Menu
Comment 10 flywire 2021-08-08 05:53:09 UTC
(In reply to Heiko Tietze from comment #6)
> I would rather not distinguish between the languages at the menu and have
> Run, Edit (could also be started from the Organize dialog), and Organize
> there. And at the Run/Organize dialog we could have a filter for the
> different types.

Yes, totally agree. See Tools Macros Proposed Menu in comment above.


(In reply to Kevin Suo from comment #8)
> To write
> python macros, one must manually create this .py files with your text editor
> and place it in the required location. This is well documented, see:
> https://help.libreoffice.org/6.4/en-US/text/sbasic/python/main0000.html
> ... 
> APSO is great, but in my opinion a lot of improvements should be made before
> it can be bundled as default.

Get real, those are 20th-century instructions. Users expect an IDE. APSO is a nice simple implementation requiring NO improvements to be better than what is provided.

The complexity for users to write a simple python macro is an enormous challenge a good interface would help overcome.
Comment 11 flywire 2021-08-08 06:15:08 UTC
Some context: https://superuser.com/q/1297120/514126

If I go to Tools > Macros > Organize macros... > Python, the options for creating new macros are grayed out. After digging a bit on the internet, I discovered that apparently LibreOffice (well, actually upstream OpenOffice) doesn't have its own Python IDE "yet", so they just put a grayed out button in the UI with no explanation as a placeholder. I say "yet" in quotes because I found people complaining about this in 2012 just to be told that it will be fixed any day now.
Comment 12 Julien Nabet 2021-08-15 20:29:34 UTC
Can't help here=>uncc myself.
Comment 13 Roman Kuznetsov 2023-01-28 07:50:14 UTC
If we some day will decide to rework the macro dialogs as I wrote in bug 120658 it will fix this problem too I think, because we will have only one dialog for all supported script languages