diff options
author | flywire <flywire0@gmail.com> | 2021-11-05 13:25:45 +0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2021-11-12 16:46:58 +0100 |
commit | 6d3d8f1f5279595d78267ed830cc0abb6babccb3 (patch) | |
tree | e5a6aa4decab9a0cabefc9bd2c95667e1cb6b647 /source/text/sbasic/python | |
parent | b902fbcc87b0baf76b3dd501f0feff40bb1f3711 (diff) |
Simplify location description
Change-Id: I943bdd1ab68d0f73f3e7735b62c8ef228eecd72a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/124700
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'source/text/sbasic/python')
-rw-r--r-- | source/text/sbasic/python/python_locations.xhp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/source/text/sbasic/python/python_locations.xhp b/source/text/sbasic/python/python_locations.xhp index 4ec027b43e..6a5faa544b 100644 --- a/source/text/sbasic/python/python_locations.xhp +++ b/source/text/sbasic/python/python_locations.xhp @@ -18,13 +18,28 @@ <body> <section id="pythonlocation"> <paragraph id="hd_id391543358231021" role="heading" level="1" xml-lang="en-US"><variable id="pythonlocations1"><link href="text/sbasic/python/python_locations.xhp" name="command_name">Python Scripts Organization and Location</link></variable></paragraph> - <paragraph id="par_id771543358231022" role="paragraph" xml-lang="en-US">The Python script files are stored in the filesystem, in folders controlled by %PRODUCTNAME. The macros can be started at installation, user or file level.</paragraph> + <paragraph id="par_id481636114810038" role="paragraph" xml-lang="en-US">%PRODUCTNAME macros are grouped in module files, modules are usually grouped in library folders, and libraries are grouped in library containers although containers can contain modules too.</paragraph> + <paragraph role="paragraph" id="par_id771543358231022">A library is used as a major grouping for either an entire category of macros, or for an entire application. Modules usually split functionality, such as user interaction and calculations. Individual macros are subroutines and functions. The Figure below shows an example of the hierarchical structure of macro libraries in %PRODUCTNAME.</paragraph> + <paragraph role="image" id="par_id771636279690940"><image src="media/helpimg/sbasic/Library-Container.svg" id="img_id121636285791637" width="8cm" height="5.5cm"><alt id="alt_id471636279690940">Library Container diagram</alt></image></paragraph> + <paragraph role="paragraph" id="par_id171636114787810"><emph>Figure:</emph> Macro Library hierarchy</paragraph> + <paragraph role="paragraph" id="par_id801636114790638">The containers are accessible in all %PRODUCTNAME programs through the user interface. Go to <menuitem>Tools > Macros > Organize Macros > Python</menuitem>, to open the Python Macros dialog.</paragraph> + <paragraph role="paragraph" id="par_id801636114808666">Three library containers are shown in the Macro From list:</paragraph> + <list type="ordered"> + <listitem> + <paragraph id="par_id321636114854594" role="listitem"><emph>My Macros:</emph> personal macros available for the %PRODUCTNAME user</paragraph> + </listitem> + <listitem> + <paragraph id="par_id471636114847530" role="listitem"><emph>%PRODUCTNAME Macros:</emph> system macros distributed with LibreOffice for every computer user</paragraph> + </listitem> + <listitem> + <paragraph id="par_id191636114858218" role="listitem"><emph>Document macros:</emph> every document can contain macro libraries available in that document for all users</paragraph> + </listitem> + </list> </section> <h2 id="hd_id911544049584458">Python Script Locations</h2> <paragraph id="par_id121551089455774" role="paragraph" xml-lang="en-US">Refer to <link href="text/sbasic/python/python_session.xhp" name="Getting Session Information">Getting Session Information</link> in order to get programmatic access to Python script locations.</paragraph> - <h3 id="hd_id591544049572647">%PRODUCTNAME Macros container</h3> + <h3 id="hd_id591544049572647">%PRODUCTNAME Macros</h3> <paragraph role="paragraph" id="par_id261544049064421">Existing macros in this location (container) were copied by the installation program and are available to every computer user, and any open document can access macros stored the container. You need administrative rights to store or edit macros here.</paragraph> - <paragraph role="paragraph" id="par_id861544210028670">The %PRODUCTNAME Macros container location in the file system depends on the operating system:</paragraph> <list type="unordered"> <listitem> @@ -48,13 +63,7 @@ <h3 id="hd_id101544049707712">Document macros</h3> <paragraph role="paragraph" id="par_id31544049046497">Document macros are embedded in the document and are accessible only when the document is open.</paragraph> <h2 id="hd_id171544049715310">Libraries, Modules and Macros</h2> - <paragraph role="paragraph" id="par_id181544209916707">Like BASIC macros, Python macros can be organized in libraries, modules and macros.</paragraph> - <h3 id="hd_id21544209865082">Creating a Python Library</h3> - <paragraph role="paragraph" id="par_id191544209928221">Libraries are folders in the container tree. To create a library, add a folder in the target container. The library name is the folder name.</paragraph> - <h3 id="hd_id31544209872869">Creating a Python Module.</h3> - <paragraph role="paragraph" id="par_id161544209936743">A module is a python file in the library or the container. Create a module adding a file in the container.</paragraph> - <h3 id="hd_id151544209895574">Python macros</h3> - <paragraph role="paragraph" id="par_id61544209944591">A macro is a python object in the module.</paragraph> + <paragraph role="paragraph" id="par_id181544209916707">Python macros can be organized in libraries, modules and macros. Use the Macro Library hierarchy as a guide when creating or installing new macros in module files, new module files in library folders or new library folders in containers.</paragraph> <section id="relatedtopics"> <embed href="text/sbasic/python/python_session.xhp#pythonsession"/> <embed href="text/sbasic/python/main0000.xhp#pythonscriptshelp"/> |