[libreoffice-users] Re: making self-defined functions available for all spreadsheets

2015-02-25 Thread Andreas Säger
Am 25.02.2015 um 12:38 schrieb hw:
 
 
 
 How do you build an installation package?
 

The code needs to live in your own name space (not library Standard).
ToolsMacrosOrganizeBasic...
[Organizer...]
Tab [Libraries]
[Export]

Non-Standard libraries can be imported from documents and templates. For
instance, you may distribute a document with documentation and examples
carrying the macros in a non-Standard library and use the Basic
organizer import/update that code.

 LO is installed on a Windows terminal server for all users, yet each
 user has their own settings.  To get macro distributed, I have to save
 it to a text file which then can be copied and pasted from for each
 user.  Or is there a better way?
 
 
 BTW, is there a way to use an external editor to edit these macros?  I'd
 rather use a decent editor like emacs than the poor thing built into LO.
 

You can use Python or JavaScript as macro language with your favourite
development tools. The Basic IDE is horrible, indeed.
Such macro code can be dumped as pure source code into the user profile.



-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] Re: making self-defined functions available for all spreadsheets

2015-02-25 Thread hw



Am 23.02.2015 um 13:20 schrieb Andreas Säger:

Am 23.02.2015 um 13:02 schrieb hw:


Would it be possible to have one file this Standard library is saved
in for multiple users, or would that give problems with several users
accessing the same file?  Perhaps I could put it on a network share and
allow only read-only access to it.



Yes. Build your own LO installation package with your macros in the user
profile.
Just in case your macros refer to a specific class of user defined
document templates: In this case you store all macros in the template
they refer to. And yes, distributeion of such templates requires an
install package with modified profile or a user who installs the
template into the profile via FileTemplatesSave...
I can't find the LO administration guide on libreoffice.org. May be
someone else can point us to it.


How do you build an installation package?

LO is installed on a Windows terminal server for all users, yet each 
user has their own settings.  To get macro distributed, I have to save 
it to a text file which then can be copied and pasted from for each 
user.  Or is there a better way?



BTW, is there a way to use an external editor to edit these macros?  I'd 
rather use a decent editor like emacs than the poor thing built into LO.


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


[libreoffice-users] Re: making self-defined functions available for all spreadsheets

2015-02-23 Thread Andreas Säger
Am 23.02.2015 um 13:20 schrieb Andreas Säger:
 Am 23.02.2015 um 13:02 schrieb hw:

 Would it be possible to have one file this Standard library is saved
 in for multiple users, or would that give problems with several users
 accessing the same file?  Perhaps I could put it on a network share and
 allow only read-only access to it.

 
 Yes. Build your own LO installation package with your macros in the user
 profile.
 Just in case your macros refer to a specific class of user defined
 document templates: In this case you store all macros in the template
 they refer to. And yes, distributeion of such templates requires an
 install package with modified profile or a user who installs the
 template into the profile via FileTemplatesSave...
 I can't find the LO administration guide on libreoffice.org. May be
 someone else can point us to it.
 
 

and then there are templates (with specific macros, styles, layouts etc)
packaged in an extension.


-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] Re: making self-defined functions available for all spreadsheets

2015-02-23 Thread hw



Am 21.02.2015 um 21:02 schrieb Andreas Säger:

Am 21.02.2015 um 19:17 schrieb hw:


Hi,

how can I make a self-written function (i. e. a macro) available for all
spreadsheets so that I can use this function for any spreadsheet I
create or load and modify?

Ideally, this should work with multiple users in that I'd like to deploy
the macro(s) somewhere central for others to use.



Hi,
You have two choices:

1) Write an add-in package which is installable via the extension
manager. These functoons can have their own localized help pages and
function names. They appear in the function wizard just like a built-in
function. You can not write add-ins Basic code.

2) Quick and drity Basic functions without any integration can be stored
in the Standard library of the global macro name space (My Macros).
This library is loaded automatically so the functions can be found at
any time.
2a) Since it is possible to call macro code from different languages,
you can write or re-use functions written in Java, Python or JavaScript
and write a Basic wrapper. The spreadsheet calls the Basic function
which itself calls the other script.


Thank you very much!  For now, I'll just put the macro into the 
Standard library --- I tried it and it works.


Would it be possible to have one file this Standard library is saved 
in for multiple users, or would that give problems with several users 
accessing the same file?  Perhaps I could put it on a network share and 
allow only read-only access to it.


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


[libreoffice-users] Re: making self-defined functions available for all spreadsheets

2015-02-23 Thread Andreas Säger
Am 23.02.2015 um 13:02 schrieb hw:
 
 Would it be possible to have one file this Standard library is saved
 in for multiple users, or would that give problems with several users
 accessing the same file?  Perhaps I could put it on a network share and
 allow only read-only access to it.
 

Yes. Build your own LO installation package with your macros in the user
profile.
Just in case your macros refer to a specific class of user defined
document templates: In this case you store all macros in the template
they refer to. And yes, distributeion of such templates requires an
install package with modified profile or a user who installs the
template into the profile via FileTemplatesSave...
I can't find the LO administration guide on libreoffice.org. May be
someone else can point us to it.


-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


[libreoffice-users] Re: making self-defined functions available for all spreadsheets

2015-02-21 Thread Andreas Säger
Am 21.02.2015 um 19:17 schrieb hw:
 
 Hi,
 
 how can I make a self-written function (i. e. a macro) available for all
 spreadsheets so that I can use this function for any spreadsheet I
 create or load and modify?
 
 Ideally, this should work with multiple users in that I'd like to deploy
 the macro(s) somewhere central for others to use.
 

Hi,
You have two choices:

1) Write an add-in package which is installable via the extension
manager. These functoons can have their own localized help pages and
function names. They appear in the function wizard just like a built-in
function. You can not write add-ins Basic code.

2) Quick and drity Basic functions without any integration can be stored
in the Standard library of the global macro name space (My Macros).
This library is loaded automatically so the functions can be found at
any time.
2a) Since it is possible to call macro code from different languages,
you can write or re-use functions written in Java, Python or JavaScript
and write a Basic wrapper. The spreadsheet calls the Basic function
which itself calls the other script.

HTH


-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted