Bug 38889 - Make macro editing easier
Summary: Make macro editing easier
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Jens Carl
URL:
Whiteboard: target:6.3.0
Keywords: difficultyInteresting, easyHack, skillCpp, topicUI
Depends on:
Blocks: Macro-UI
  Show dependency treegraph
 
Reported: 2011-07-01 08:00 UTC by Björn Michaelsen
Modified: 2019-11-22 09:06 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Attachments
Writerdoc with lot of macro's inside (4.28 MB, application/vnd.oasis.opendocument.text)
2015-12-11 15:05 UTC, Fernand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2011-07-01 08:00:22 UTC
Background: When you launch the macro editor for a document with macros (Tools->Macros->Organise Macros->Basic) - you end up with an horrible UI. Firstly the tree simply doesn't expand easily - it should be far more helpful around expanding nodes so you can see macros. But more annoyingly - even if you know there is a macro in a spreadsheet - you can't open the basic editor until you have found, and clicked onto it, then selected edit. That is just annoying; particularly since the resulting editor has tabs that show you all the macros from each sheet. We should simplify that to make it far easier to run, edit (and demo editing) macros. Design and develop the organizer for attachment elsewhere like the Tools->Macros->Run... menu item: there are three macro organizers in OO now. Some of the code is in basctl/source/basicide/macrodlg.* I believe.

Skills: simple C++ programming, willingness to learn a bit of VCL
Comment 1 Björn Michaelsen 2011-11-09 09:52:17 UTC
Rotating this into the featured EasyHacks on the wiki. However, this looks rather underspecified to me, thus:

@Cristoph: Could you re-CC anyone on the design team guide any possible takers along?
Comment 2 Christoph 2011-11-17 13:56:50 UTC
(In reply to comment #1)
> @Cristoph: Could you re-CC anyone on the design team guide any possible takers
> along?

Michel Renon started a whiteboard page:
https://wiki.documentfoundation.org/Design/Whiteboard/Macros_Dialogs

According to his mail on the design list "It's a very first idea, lots of details may be enhanced."
Comment 3 Pallav Shinghal 2012-03-23 21:26:17 UTC
Hi. I'd like to start working on this. However, this would be my first bug. Could someone guide me where to begin?
Comment 4 Björn Michaelsen 2012-04-04 05:45:39 UTC
Adding Noel Power to CC. Could you pick up and mentor Pallav along?
Comment 5 Noel Power 2012-04-05 01:34:22 UTC
I wasn't aware of this bug/easyhack ( someone else must have opened it ) but in master now mostly this has already been started. I wonder though are you a student ? if so have you considered gsoc ? http://www.google-melange.com/gsoc/homepage/google/gsoc2012

Libreoffice is participating in gsoc and in particular http://wiki.documentfoundation.org/Development/Gsoc/Ideas#Bunch_of_Basic_IDE_improvements which includes this easy hack. The ideas link above also contains a link to the work sofar. Are you interested in gsoc?
Comment 6 Juetho 2012-09-06 14:44:36 UTC
I confirm these problems. In addition, if one calls macros twice, one has to open the complete path twice: MyMacros / LibO Macros / Database > Standard > Module. It would be better if the previous path would be reopened immediately. Or Björn's suggestion would be realized. Jürgen
Comment 7 Marc Weber 2012-10-22 16:30:00 UTC
Important:
Add a help item telling you where to find basics about
- what basic is
- what functions are builtin (with some googling and grepping sources you can find out - but there should be better ways)
- basic syntax and where to look it up

It would be nice if you could open many modules at the same time.

It would be nice if the manager would show all scripting types (python,bean,js,basic) in the same window. (Thus one "Organize Macros" item for all languages)

It would be nice if you could use an external editor like vim, emacs,... for editing files. I know that macros are not stored in files -but maybe a "view" could be created on disk such as $HOMe/libre-office-macros/doc/ which could then be edited - and libre office could check for updates and sync back
Comment 8 Björn Michaelsen 2012-10-23 11:57:29 UTC
@Marc: Please dont extend the scope of a bug esp. if it is an EasyHack. If in doubt, open a new separate bug.
Comment 9 sonakshinathani 2013-06-22 10:39:22 UTC
I'd really like to work on this bug.As I am a beginner(actually it will be my first bug then). I need guidance from someone.can anyone guide me out?
Comment 10 Björn Michaelsen 2013-10-04 18:47:37 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 11 Alex Thurgood 2015-01-03 17:41:21 UTC Comment hidden (no-value)
Comment 12 Amit Chaudhary 2015-01-20 13:43:15 UTC
hi I want to work on this , its my first bug ! can someone please guide me for this?
Comment 13 jani 2015-12-11 08:37:15 UTC
A test document would be good, the problems described seems to need a combination of a "normal" document and macros and not macros alone.

Tested with 2 simple macros in a document, and that seems insufficient.

Does anybody have a real nasty document ?
Comment 14 Fernand 2015-12-11 14:21:38 UTC
I have documents but what do you mean with nasty ?
- lot of content in the Document
- lot of macro's inside the document
Comment 15 Fernand 2015-12-11 15:05:22 UTC
Created attachment 121225 [details]
Writerdoc with lot of macro's inside
Comment 16 Michael Meeks 2015-12-11 15:33:03 UTC
Heh - JanI is looking at this now and I got him a document.
Comment 17 Robinson Tryon (qubit) 2015-12-14 06:58:41 UTC Comment hidden (obsolete)
Comment 18 Michael Stahl (allotropia) 2016-01-26 17:54:09 UTC
skillVcl doesn't exist
Comment 19 Robinson Tryon (qubit) 2016-02-18 14:52:29 UTC Comment hidden (obsolete)
Comment 20 jani 2016-04-18 07:39:22 UTC Comment hidden (obsolete)
Comment 21 jani 2016-05-19 06:04:23 UTC Comment hidden (obsolete)
Comment 22 jani 2016-06-20 05:41:35 UTC Comment hidden (obsolete)
Comment 23 jani 2016-07-21 07:30:14 UTC Comment hidden (obsolete)
Comment 24 Howard Johnson 2017-11-21 06:15:55 UTC
I noticed that in LO v5.4 Calc & Writer have an improvement:

  Tools | Macros | Edit Macros

This makes it much easier to edit macros.

Base, Draw, & Impress could benefit from a similar feature I think.
Comment 25 Omer Fatih Celik 2019-03-23 19:12:37 UTC
Hello,

If I understand correctly this issue is fixed on Calc and Writer with edit macros option, can someone help me start on implementing the same solution for Base, Draw, Impress and Math?
Comment 26 Omer Fatih Celik 2019-03-23 19:24:48 UTC Comment hidden (obsolete, spam)
Comment 27 Muhammet Kara 2019-04-05 10:21:28 UTC
(In reply to Howard Johnson from comment #24)
> I noticed that in LO v5.4 Calc & Writer have an improvement:
> 
>   Tools | Macros | Edit Macros
> 
> This makes it much easier to edit macros.
> 
> Base, Draw, & Impress could benefit from a similar feature I think.

The same command can be added to the Tools > Macros menu of Base, Draw, & Impress.

Until it is added by default, you can also add it for your installation by using the Customize dialog (Tools > Customize).
Comment 28 Commit Notification 2019-05-09 07:40:19 UTC
Jens Carl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/62b7faa167162b5e35746c546be1a758dd8f29d2%5E%21

Related tdf#38889: Sync sub menus Tools > Macros

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 29 Heiko Tietze 2019-05-09 07:45:53 UTC
Jens, Björn: please resolve the ticket as fixed if you think its done.