Hi Bernard,

Using OpenOffice.org Basic macro organizer, tab "Libraries", it is possible to export (new in 2.0.3) or import (formerly Append) any of my Basic/Dialog libraries, in My Macros or in a document.

Any library, except Standard libraries. You can't import nor export it.
Is there a fundamental reason to justify this restriction?

There is a reason, but I'm not sure if it can be called
fundamental... :-)

The problem is the old Basic Library implementation. The
Standard library (not the Library provided by the Library-
Container API but its core representation in Basic) is the
root object of the whole library tree and it must not be
deleted. Library import of an already existing library
works by deleting the old one and inserting the new one.
Basic listens to these operations and gets into trouble if
someone tries to do this with the Standard library.

So the reason is simply avoiding problems. Of course this
problem could be solved, but when implementing the funcio-
nality we obviously thought it would not be worth the ef-
fort. The export is only blocked because you cannot reim-
port the library then.


I can find a reason to export a Standard library: rename it in order to re-import it with another library name (just edit .xlb files and directory name).

I don't think it would be a good idea to allow exporting
it without adding a feature to import it using a different
name. Not every user likes to edit xml files. Renaming can
also be a problem because you can use the library name as
identifier: Standard.Module1.MySub is a full qualified call
to the sub. But as this is not used very often a warning
should be enough when a library is renamed at import. You
can submit an enhancement issue if you like. We have to
discuss the target milestone then.


I can find two reasons to export/import a Standard library: transfer from one PC to another; or simply to save a copy of my Standard library.

Also only usefull if you can reimport it.


Similarly, I can understand that OpenOffice.org libraries cannot be changed, but why is it not possible to export any of them? Any reason for this?

Good question. I will check if this is blocked intentionally
or by accident. Always the old question: Bug or feature? ;-)

Regards

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to