[Solved] Install macro in My Macros along with an extension
- Scrumdidlyumptious
- Banned
- Posts: 8
- Joined: Wed Jan 30, 2013 11:30 am
[Solved] Install macro in My Macros along with an extension
a
Last edited by Scrumdidlyumptious on Thu Feb 14, 2013 8:55 am, edited 2 times in total.
LibreOffice 3.6
Windows 7
Windows 7
-
- Volunteer
- Posts: 1160
- Joined: Mon Oct 08, 2007 1:26 am
- Location: France, Paris area
Re: Install a macro in 'My Macros' along with an extension?
Yes that is possible.
See Toolbars page of the Developer's Guide. It's rather complex, for simplicity you may use an Extension Packager.
Note that toolbar xml files syntax will change in Apache OpenOffice 4.0 and Extension Packagers are not yet compatible.
See Toolbars page of the Developer's Guide. It's rather complex, for simplicity you may use an Extension Packager.
Note that toolbar xml files syntax will change in Apache OpenOffice 4.0 and Extension Packagers are not yet compatible.
Bernard
OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
Re: Install a macro in 'My Macros' along with an extension?
As far as I know, an extension can install Basic libraries. It can not add modules to an already existing library.
Userdefined sheet cell functions such as =MYFUNC(A1:B13;1;C5) need to be saved within library "Standard" in order to be found. The special library named "Standard" always exists even if it is empty. So I believe that you can not install sheet cell functions by extension. An extension package can install your GUI driven macros to any user-defined library (not "Standard") with some unique library name.
Userdefined sheet cell functions such as =MYFUNC(A1:B13;1;C5) need to be saved within library "Standard" in order to be found. The special library named "Standard" always exists even if it is empty. So I believe that you can not install sheet cell functions by extension. An extension package can install your GUI driven macros to any user-defined library (not "Standard") with some unique library name.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Volunteer
- Posts: 1160
- Joined: Mon Oct 08, 2007 1:26 am
- Location: France, Paris area
Re: Install a macro in 'My Macros' along with an extension?
Villeroy, you are right, but...
From what he said I inferred that its extension exists and works for him, whatever it contains. But maybe he uses the term extension incorrectly. Let us wait.Scrumdidlyumptious wrote:I have an extension that adds user defined functions to Calc
Bernard
OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
- Scrumdidlyumptious
- Banned
- Posts: 8
- Joined: Wed Jan 30, 2013 11:30 am
a
a
Last edited by Scrumdidlyumptious on Thu Feb 14, 2013 8:56 am, edited 1 time in total.
LibreOffice 3.6
Windows 7
Windows 7
Re: Install a macro in 'My Macros' along with an extension?
Thank you for this important clarification. The vast majority of user defined cell functions are written as simple Basic functions without package, callable from Basic's "Standard" library.
Yes, macros can be distributed through packages too. The only precondition is that the library name must not exist in the global name space. Both "My Macros" and "OpenOffice Macros" are two sections of the same global name space so you can not have library "My Macros"."Tools" since a the office installation comes with a "OpenOffice Macros"."Tools".
For Basic macros there is ...
Tools>Macros>Organize>Basic... button [Organizer...], tab [Libraries]
... where the export button lets you export selected global libraries and document libraries into extension packages. The resulting package should be mergable with your own package. I don't know about any tool to merge extension packages but it merging a Basic package into your own one should be not too hard. Alternatively you may distribute 2 packages.
Yes, macros can be distributed through packages too. The only precondition is that the library name must not exist in the global name space. Both "My Macros" and "OpenOffice Macros" are two sections of the same global name space so you can not have library "My Macros"."Tools" since a the office installation comes with a "OpenOffice Macros"."Tools".
For Basic macros there is ...
Tools>Macros>Organize>Basic... button [Organizer...], tab [Libraries]
... where the export button lets you export selected global libraries and document libraries into extension packages. The resulting package should be mergable with your own package. I don't know about any tool to merge extension packages but it merging a Basic package into your own one should be not too hard. Alternatively you may distribute 2 packages.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
- Scrumdidlyumptious
- Banned
- Posts: 8
- Joined: Wed Jan 30, 2013 11:30 am
Re: Install a macro in 'My Macros' along with an extension?
Thank you very much. Exporting allowed me to get the manifest details and an example of how to package it so I could just add the file-entry to my existing package's manifest. The problem was that I didn't know the 'manifest:media-type' for a Basic library but I was searching for the wrong answers on Google. Just for future reference a list of media-types is in the documentation which is probably where I should have checked first: http://wiki.openoffice.org/wiki/Documen ... ile_Format
LibreOffice 3.6
Windows 7
Windows 7