<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - "run macros" dialog shows libraries in wrong section"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=92771#c14">Comment # 14</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - "run macros" dialog shows libraries in wrong section"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=92771">bug 92771</a>
              from <span class="vcard"><a class="email" href="mailto:himajin100000@gmail.com" title="himajin100000@gmail.com">himajin100000@gmail.com</a>
</span></b>
        <pre>note: I have enabled the CT2N extension only for my local build.

"Run Macro" collects all data from

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

<a href="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#720</a>
<a href="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#556</a>
<a href="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#546</a>
<a href="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#585</a>

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

<a href="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#398</a>
<a href="https://opengrok.libreoffice.org/xref/core/scripting/source/provider/MasterScriptProvider.cxx?r=36880d76#357">https://opengrok.libreoffice.org/xref/core/scripting/source/provider/MasterScriptProvider.cxx?r=36880d76#357</a>
<a href="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#43</a>
<a href="https://opengrok.libreoffice.org/xref/core/scripting/source/provider/ProviderCache.cxx?r=e61e4e56#131">https://opengrok.libreoffice.org/xref/core/scripting/source/provider/ProviderCache.cxx?r=e61e4e56#131</a>
<a href="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#80</a>
<a href="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#439</a>
<a href="https://opengrok.libreoffice.org/xref/core/scripting/source/basprov/basprov.cxx?r=ba796f2c#152">https://opengrok.libreoffice.org/xref/core/scripting/source/basprov/basprov.cxx?r=ba796f2c#152</a>

<a href="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#2165</a>
<a href="https://opengrok.libreoffice.org/xref/core/basic/source/uno/namecont.cxx?r=58abc742#578">https://opengrok.libreoffice.org/xref/core/basic/source/uno/namecont.cxx?r=58abc742#578</a>

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"

<a href="https://opengrok.libreoffice.org/xref/core/framework/source/uielement/macrosmenucontroller.cxx?r=e1a969ca#80">https://opengrok.libreoffice.org/xref/core/framework/source/uielement/macrosmenucontroller.cxx?r=e1a969ca#80</a>
<a href="https://opengrok.libreoffice.org/xref/core/sfx2/sdi/sfx.sdi?r=e0aa9310#2381">https://opengrok.libreoffice.org/xref/core/sfx2/sdi/sfx.sdi?r=e0aa9310#2381</a>
<a href="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#1496</a>
<a href="https://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appserv.cxx?r=dc185878#1242">https://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appserv.cxx?r=dc185878#1242</a>
<a href="https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/basobj2.cxx?r=c2139caf#48">https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/basobj2.cxx?r=c2139caf#48</a>
<a href="https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/macrodlg.cxx?r=44688e49#109">https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/macrodlg.cxx?r=44688e49#109</a>
<a href="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#148</a>
<a href="https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/bastype3.cxx?r=44688e49#149">https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/bastype3.cxx?r=44688e49#149</a>

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)

<a href="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#191</a>
<a href="https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/bastype2.cxx?r=44688e49#220">https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/bastype2.cxx?r=44688e49#220</a>
<a href="https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/scriptdocument.cxx?r=ccb2a1f6#347">https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/scriptdocument.cxx?r=ccb2a1f6#347</a>
<a href="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#115</a>
<a href="https://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appbas.cxx?r=663fd3d6#97">https://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appbas.cxx?r=663fd3d6#97</a>
<a href="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?r=d02587d7#254</a>
<a href="https://opengrok.libreoffice.org/xref/core/basic/source/basmgr/basicmanagerrepository.cxx#setApplicationBasicManager">https://opengrok.libreoffice.org/xref/core/basic/source/basmgr/basicmanagerrepository.cxx#setApplicationBasicManager</a>
<a href="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#285</a>
<a href="https://opengrok.libreoffice.org/xref/core/basic/source/basmgr/basicmanagerrepository.cxx?r=d02587d7#273">https://opengrok.libreoffice.org/xref/core/basic/source/basmgr/basicmanagerrepository.cxx?r=d02587d7#273</a>

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

honestly speaking, I still haven't found the source code part in
LibraryContainer that searches "share/extensions"</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>