Bug 92771 - "run macros" dialog shows libraries in wrong section
Summary: "run macros" dialog shows libraries in wrong section
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-UI
  Show dependency treegraph
 
Reported: 2015-07-15 17:31 UTC by Lionel Elie Mamane
Modified: 2024-10-19 03:18 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
organise macros screenshot (49.49 KB, image/png)
2015-07-15 17:31 UTC, Lionel Elie Mamane
Details
attach macro screenshot (442.80 KB, image/png)
2015-07-15 17:31 UTC, Lionel Elie Mamane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2015-07-15 17:31:08 UTC
Created attachment 117262 [details]
organise macros screenshot

Compare attached screenshots.

The "Run Macros" and "Assign Macro to event" dialogs show libraries
 CT2N
 WikiEditor
 hunart
 typo
in "My Macros", but should show them in "LibreOffice(Dev) Macros"

The "Organise Macros" dialog shows it correctly.
Comment 1 Lionel Elie Mamane 2015-07-15 17:31:46 UTC
Created attachment 117263 [details]
attach macro screenshot
Comment 2 raal 2015-07-17 17:08:00 UTC
I can confirm with Version: 5.1.0.0.alpha1+
Build ID: 9be553f4c61f220ebbe212dc76cb9cce4ae1c106
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-07-13_22:45:19
Comment 3 raal 2015-10-15 05:58:08 UTC
bibisect-win32-5.0, oldest version contains bug too.
git checkout oldest: Version: 4.5.0.0.alpha0+
Build ID: 57d6b92b69a31260dea0d84fcd1fc5866ada7adb
Comment 4 raal 2015-10-20 16:47:44 UTC
reproduced in Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e
Comment 5 Robinson Tryon (qubit) 2015-12-14 05:32:48 UTC Comment hidden (obsolete)
Comment 6 raal 2016-10-13 17:54:47 UTC
repro Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 7 QA Administrators 2017-10-23 14:11:50 UTC Comment hidden (obsolete)
Comment 8 Aron Budea 2017-11-01 18:42:52 UTC
Doesn't seem to be a regression to me, eg. in 3.4.0.1 there's no WikiEditor entry, in 3.5.0.3 it starts out in My Macros.
Comment 9 Aron Budea 2017-11-01 18:43:58 UTC
Still repro with 5.4.2.2, btw.
Comment 10 QA Administrators 2018-11-02 03:50:57 UTC Comment hidden (obsolete)
Comment 11 tagezi 2018-11-07 03:45:05 UTC
I can not confirm it in
Version: 6.0.6.2
Build ID: 1:6.0.6-0ubuntu0.18.04.1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: ru-RU (ru_RU.UTF-8); Calc: group
Comment 12 himajin100000 2018-11-07 06:52:13 UTC
I can reproduce this, with my own local build rebased to commit 6896f39ffd8a6c4b32b8f601a6a93678247456bd

I needed --enable-ext-ct2n when I used autogen.sh on cygwin, which official nightly builds does not seem to have.
Comment 13 Lionel Elie Mamane 2018-11-07 08:41:11 UTC
Reproduced in 6.1.0.3 (Debian build)
Comment 14 himajin100000 2018-11-08 19:03:27 UTC
note: I have enabled the CT2N extension only for my local build.

"Run Macro" collects all data from

https://opengrok.libreoffice.org/xref/core/cui/source/customize/cfgutil.cxx?r=f3ce30ec#692
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/BrowseNodeFactoryImpl.cxx?r=0787ce88#607
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/BrowseNodeFactoryImpl.cxx?r=0787ce88#560
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/BrowseNodeFactoryImpl.cxx?r=0787ce88#270
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/BrowseNodeFactoryImpl.cxx?r=0787ce88#284
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/BrowseNodeFactoryImpl.cxx?r=0787ce88#285
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/MasterScriptProviderFactory.cxx?r=3af50058#49
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/MasterScriptProviderFactory.cxx?r=3af50058#54
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/ActiveMSPList.cxx?r=3a51daea#84
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/ActiveMSPList.cxx?r=3a51daea#187
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/ActiveMSPList.cxx?r=3a51daea#239
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/ActiveMSPList.cxx?r=3a51daea#54
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/MasterScriptProvider.cxx?r=36880d76#88

https://opengrok.libreoffice.org/xref/core/cui/source/customize/cfgutil.cxx?r=f3ce30ec#720
https://opengrok.libreoffice.org/xref/core/cui/source/customize/cfgutil.cxx?r=f3ce30ec#556
https://opengrok.libreoffice.org/xref/core/cui/source/customize/cfgutil.cxx?r=f3ce30ec#546
https://opengrok.libreoffice.org/xref/core/cui/source/customize/cfgutil.cxx?r=f3ce30ec#585

https://opengrok.libreoffice.org/xref/core/cui/source/customize/cfgutil.cxx?r=f3ce30ec#1041

https://opengrok.libreoffice.org/xref/core/scripting/source/provider/MasterScriptProvider.cxx?r=36880d76#398
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/MasterScriptProvider.cxx?r=36880d76#357
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/ProviderCache.cxx?r=e61e4e56#43
https://opengrok.libreoffice.org/xref/core/scripting/source/provider/ProviderCache.cxx?r=e61e4e56#131
https://opengrok.libreoffice.org/xref/core/scripting/source/basprov/basprov.cxx?r=ba796f2c#80
https://opengrok.libreoffice.org/xref/core/scripting/source/basprov/basprov.cxx?r=ba796f2c#439
https://opengrok.libreoffice.org/xref/core/scripting/source/basprov/basprov.cxx?r=ba796f2c#152

https://opengrok.libreoffice.org/xref/core/basic/source/uno/namecont.cxx?r=58abc742#2165
https://opengrok.libreoffice.org/xref/core/basic/source/uno/namecont.cxx?r=58abc742#578

So, isLibraryShared checks if the library is either in  "share/basic" or in "share/uno_packages"
=============
C:\Users\himajin1000000>dir C:\build\instdir\share\basic
 Volume in drive C is OS
 Volume Serial Number is 8C65-30D7

 Directory of C:\build\instdir\share\basic

2018/03/29  12:07    <DIR>          .
2018/03/29  12:07    <DIR>          ..
2018/03/29  12:07    <DIR>          Access2Base
2018/03/29  12:07    <DIR>          Depot
2018/03/29  12:07             1,764 dialog.xlc
2018/03/29  12:07    <DIR>          Euro
2018/03/29  12:07    <DIR>          FormWizard
2018/03/29  12:07    <DIR>          Gimmicks
2018/03/29  12:07    <DIR>          ImportWizard
2018/03/29  12:07             1,763 script.xlc
2018/03/29  12:07    <DIR>          ScriptBindingLibrary
2018/03/29  12:07    <DIR>          Template
2018/03/29  12:07    <DIR>          Tools
2018/03/29  12:07    <DIR>          Tutorials
               2 File(s)          3,527 bytes
              12 Dir(s)  811,383,205,888 bytes free
=======================
C:\Users\himajin1000000>dir C:\build\instdir\share\extensions
 Volume in drive C is OS
 Volume Serial Number is 8C65-30D7

 Directory of C:\build\instdir\share\extensions

2018/11/04  05:32    <DIR>          .
2018/11/04  05:32    <DIR>          ..
2018/11/04  05:37    <DIR>          ConvertTextToNumber
2018/03/08  00:30                23 package.txt
               1 File(s)             23 bytes
               3 Dir(s)  811,382,972,416 bytes free
==========================
so, ConvertTextToNumber is not treated as "Shared"

------------------
On the other hand, "Organize Macros" is associated with "uno:MacroDialog"

https://opengrok.libreoffice.org/xref/core/framework/source/uielement/macrosmenucontroller.cxx?r=e1a969ca#80
https://opengrok.libreoffice.org/xref/core/sfx2/sdi/sfx.sdi?r=e0aa9310#2381
https://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appserv.cxx?r=dc185878#1496
https://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appserv.cxx?r=dc185878#1242
https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/basobj2.cxx?r=c2139caf#48
https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/macrodlg.cxx?r=44688e49#109
https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/bastype3.cxx?r=44688e49#148
https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/bastype3.cxx?r=44688e49#149

but hereafter there seems nothing to check which folder the libraries are stored. so it looks to me all scripts are added to user and already-loaded scripts are not added. (though it may look as if LibreOffice Macros are shared)

https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/bastype2.cxx?r=44688e49#191
https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/bastype2.cxx?r=44688e49#220
https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/scriptdocument.cxx?r=ccb2a1f6#347
https://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appbas.cxx?r=663fd3d6#115
https://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appbas.cxx?r=663fd3d6#97
https://opengrok.libreoffice.org/xref/core/basic/source/basmgr/basicmanagerrepository.cxx?r=d02587d7#254
https://opengrok.libreoffice.org/xref/core/basic/source/basmgr/basicmanagerrepository.cxx#setApplicationBasicManager
https://opengrok.libreoffice.org/xref/core/basic/source/basmgr/basicmanagerrepository.cxx?r=d02587d7#285
https://opengrok.libreoffice.org/xref/core/basic/source/basmgr/basicmanagerrepository.cxx?r=d02587d7#273

for "Organize Macro", one function that "could" be called is 
https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/scriptdocument.cxx?r=819149fb#951

honestly speaking, I still haven't found the source code part in LibraryContainer that searches "share/extensions"
Comment 15 QA Administrators 2019-11-21 03:32:45 UTC Comment hidden (obsolete)
Comment 16 QA Administrators 2021-11-21 03:58:55 UTC Comment hidden (obsolete)
Comment 17 QA Administrators 2024-10-19 03:18:19 UTC
Dear Lionel Elie Mamane,

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 with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

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) from https://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: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug