Created attachment 119615 [details]
preview of .xhp files, but macro is not ready for general use
When editing a help file it is now only possible to see it as in the local help, when you compile the help. It would be good to have a tool, that makes a preview of the document, which you are currently editing.
I have made some experiments and put them into the attached macro.
If the actual help document is put into a jar container, and this jar file is in the installed help folder, then you can get a view of that file in the help viewer or in Writer/Web in a way, that embeds and pictures are resolved.
But it seems, that LibreOffice looks only once into this container and then locks it. I can update the file, but not the updated version was shown but the starting one. And I cannot insert a different file into the container and cannot delete the container while LibreOffice is running. If someone knows, how to unlock that file and make the local help aware of changes, please tell me.
You need not install the helpauthoring extension to test the macro. Copy the macro into a module, load an .xhp document as encoded text in Writer or in Writer/Web, and run the macro "PreviewCurrentDocument" while the .xhp document is the actual window. The macro creates a file temp.jar in the help folder "en-US". You can delete it after you have closed LibreOffice.
Of course any of yours can just be pushed to NEW - you know what you're talking about :)
Created attachment 120124 [details]
modified basic code
Modified version of the basic code to allow rerunning the macro without having to restart LO by using a random filename.
Regina - this is awesome, thanks for that! :-) Can you please push it to the dev-tools reporitory to helpauthoring, so that it is version controlled, and further improvements can be done directly in git?
Helpauthoring extension is deprecated. closing wontfix.