Description: In dialog "Basic Macros" (menu "Tools - Macros - Organize Macros - Basic") the content of column "Existing Macros" is alphabetical sorted. In earlier versions of LibO (e. g. 5.4.7.2) it wasn't. Alphabetical sorting of that column is rather uncomfortable, as the procedures of a basic module aren't shown the way the user has grouped them in their module. Please, remove the alphabetical sorting feature of that column. (Alphabetical sorting in Column "Macro Form" is okay, but not in column "Existing Macros".) Steps to Reproduce: 1. Menu "Tools - Macros - Organize Macros - Basic" opens dialog "Basic Macros". 2. Column "Existing Macros" on the right. Actual Results: Items in that column are alphabetical sorted. In earlier versions of LibO (e.g. 5.4.7.2) they weren't, which is more comfortable. Expected Results: The items (= procedures within a macro module) should be sorted according to their position in their module. Reproducible: Always User Profile Reset: No Additional Info: Version: 6.4.4.2 Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: de-DE (de_DE.UTF-8); UI-Language: en-US Calc: threaded
Created attachment 162981 [details] sample file
The changes was done on purpose in https://git.libreoffice.org/core/+/1dd8cde5cd2e692a442b6885c59634fba3737284%5E! in order to fix bug 70813 Adding UX Team to decide what to do and proceed
We could add the possibility to sort the macro list either way, for instance, using the right click event or an additional button.
(In reply to Xisco Faulí from comment #2) > The changes was done on purpose in This patch aims to fix typos. Adding Andrea and Julian. I sympathize with the idea to keep the function order.
(In reply to Heiko Tietze from comment #4) > (In reply to Xisco Faulí from comment #2) > > The changes was done on purpose in > > This patch aims to fix typos. Adding Andrea and Julian. > > I sympathize with the idea to keep the function order. ouch, wrong link: https://git.libreoffice.org/core/+/1dd8cde5cd2e692a442b6885c59634fba3737284%5E%21
Bug 70813 talks about inconsistencies. I don't see why we should keep the user oder. Andreas Heimisch, what do you think? Sorry Andrea & Julien for the noise.
I think we should give the user the possibility to chose and keep the chosen sorting.
(In reply to Andreas Heinisch from comment #7) > I think we should give the user the possibility to chose and keep the chosen > sorting. Okay => NEW. Would be cool if you get time to implement this.
Would you prefer it using a right click menu or rather a specific button?
No new interaction, it's just about the order of entries. Right now it is alphabetically but should become what the macro file provides like function foo() ... function aaa() should be listed as - foo - aaa
I don't remember exactly where I changed this behaviour, but prior all these sorting changes, it was sorted like requested in this report.
It was this change: https://github.com/LibreOffice/core/commit/aee3aa2610971936d6f402365ebf34c14847ab44, but without the m_xMacroBox->make_sorted(); at line 497, but imho, we just have to drop https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/macrodlg.cxx?r=cd0ab2cf#80.
Tested with and without the patch and both return C,B,A. Xisco, could you please review?
Created attachment 163066 [details] Before the patch: list is sorted alphabetically
Created attachment 163067 [details] After the patch: list is sorted according to their position
Created attachment 163071 [details] Tools - Macros - Run Macro ( LibreOffice 4.4 )
Created attachment 163072 [details] Tools - Macros - Organize Macros - Basic ( with fix for bug 70813 )
Created attachment 163073 [details] Tools - Macros - Organize Macros - Basic ( without fix for bug 70813 )
So, the problem is, there are two dialogs. - First Dialog ( Tools - Macros - Run Macro ) -> has been sorted alphabetically since at least ( see screenshot ) Version: 4.3.0.0.alpha1+ Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e - Second Dialog ( Tools - Macros - Organize Macros - Basic ) -> Sorted alphabetically since https://git.libreoffice.org/core/+/1dd8cde5cd2e692a442b6885c59634fba3737284%5E%21 so the behaviour should be changed in both dialogs simultaneously
Commit https://git.libreoffice.org/core/+/1dd8cde5cd2e692a442b6885c59634fba3737284%5E%21 lead to a problem with the TreeBox, so it was fixed in https://github.com/LibreOffice/core/commit/aee3aa2610971936d6f402365ebf34c14847ab44. My current commit (https://gerrit.libreoffice.org/c/core/+/98783) should restore the sorting in the second dialog. I will add the specific sorting for the first dialog.
A question: Should it be possible that the user makes a sort decision and this decision is kept for the entire document or should it the list always be sorted by document order and the user has the possibility to sort it in alphabetic order, which is lost after the document is closed?
(In reply to Andreas Heinisch from comment #21) > A question: Should it be possible that the user makes a sort decision and > this decision is kept for the entire document or should it the list always > be sorted by document order and the user has the possibility to sort it in > alphabetic order, which is lost after the document is closed? In general, storing user decisions is desirable. In this particular case I guess not many macros have such a long list of functions that alphabetical sorting is needed. To cut it short, remember the last user choice if it's very easy to implement with no drawbacks or just always start with the given sequence and allow to sort alphabetically.
Personally, I would keep it simple and not write any additional options in the config file. To sum it up, the default option is document order and the user has the possibility to sort it alphabetically and vice versa.
(In reply to Andreas Heinisch from comment #23) > Personally, I would keep it simple and not write any additional options in > the config file. To sum it up, the default option is document order and the > user has the possibility to sort it alphabetically and vice versa. Yes. Call it maybe "Sort >" with "( ) Alphabetical order" and "(o) Proper sequence" (radio buttons, default is "proper").
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/327091048c8cbcad0178dfd8e06813153e861e5e tdf#134331 - Added possibility to sort macros via context menu It will be available in 7.1.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.
(In reply to Commit Notification from comment #25) > Andreas Heinisch committed a patch related to this issue. Please change the status to Resolved/Fixed when done. Thanks a lot for taking care.