Hi all,

with all your hints I make some steps forward. You will find adaptions from the BasicAddonBuilder :) I have put the resulting macro as attachment to https://bugs.documentfoundation.org/show_bug.cgi?id=95064

The macro is not directly usable with AOO but only with LibreOffice. It is not only that the help folder is named "en" in AOO and "en-US" in LibreOffice. There seems to be different locking rules in addition.

In LibreOffice some efforts were made to get the helpauthoring-tool work again, to make generating and editing of help-files easier. The goal of the macro is to get a preview of the current help file, while editing the file. If someone knows a very different way for this goal, please tell me.

The macro shows the .xhp file which is currently edited as preview in Writer/Web or help window. I have made the preview by putting the .xhp-document in a container temp.jar in the installed help folder en-US. Then a call with "vnd.sun.star.help://temp/" will apply the transformation to HTML and show the result in Writer/Web.

But a major problem is, that this view cannot be updated until LibreOffice is totally closed. The file temp.jar is someway locked after the first use. Only after closing LibreOffice totally and restarting, the file can be used again.

If anyone has an idea what locks the file and how I can unlock it while LibreOffice (or AOO) is running, or at least how to make the help aware, that the file in the container was updated, then please tell me.

Unfortunately the macro is still not ready for productive use in its current state. So I need further help.

Kind regards
Regina



Regina Henschel schrieb:
Hi Bernard,

thank you for the hint to the BasicAddonBuilder. My first tries with
service com.sun.star.packages.Package failed. I will try it again with
using the macros in BasicAddonBuilder as template.

Kind regards
Regina

Bernard Marcelly schrieb:
Hi Regina,

You have to use the service com.sun.star.packages.Package

Examples
Reading a text file from a zip :

<https://forum.openoffice.org/en/forum/viewtopic.php?f=45&t=9574#p45086>
Writing a zip file :
   in BasicAddonBuilder, see Basic module "zip"

Regards
   Bernard

Regina Henschel a écrit le 2015-10-11 20:31 :
Hi all,

I want to write a Basic macro to preview an .xhp file while editing
it. Viewing
such file works fine with LoadComponentFromUrl with protocol
"vnd.sun.star.help", if the file is inside a .jar container.

But how can I modify or create or zip/unzip the content of such
container using
a Basic macro? A SimpleFileAccess sees it only as file, not as folder.

Kind regards
Regina


---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org

Reply via email to