Fwd: Re: offline help replacement

Olivier Hallot olivier.hallot at libreoffice.org
Fri Dec 22 09:00:07 UTC 2017


Hi
For the records, the patch

https://gerrit.libreoffice.org/gitweb?p=help.git;a=commitdiff;h=0e5a56e81f63d2705f1083acda4b2d899783fdcd

now allows the pages to be equally navigated in browser with both
http:// and file:// protocols.

Regards
Olivier

Em 18/12/2017 14:44, Olivier Hallot escreveu:
> Hi All
> 
> To integrate the new offline help in LibreOffice we need to call the
> browser from LibreOffice passing the help page parameters.
> 
> The job is ready for the online help (*) and is in line 523 of the file
> below.
> 
> sfx2/source/appl/sfxhelp.cxx.
> 
> For the offline help we still need a way to call the browser passing the
> right url to
> 
> ${Install}/help/
> 
> in the same sfxhelp.cxx file
> 
> David Tardon has prepared a set of makefiles for the new html help with
> some new params as
> 
> Usage:     --with-help    build the old local help
>            --without-help     no local help (default)
>            --with-help=html   build the new HTML local help
>            --with-help=online build the new HTML online help
>            --with-help=common bundle common files for the local
>                        help but do not build the whole help
> 
> Below are some findings we have from previous discussion on how to
> address the issue.
> 
> Any help is appreciated
> 
> Kind regards
> Olivier
> 
> 
> -------- Mensagem encaminhada --------
> Assunto: Re: offline help replacement
> Data: Tue, 26 Sep 2017 10:29:02 +0200
> De: Jan Holesovsky <kendy at collabora.com>
> Para: Olivier Hallot <olivier.hallot at libreoffice.org>
> 
> Hi Olivier,
> 
> Olivier Hallot píše v Po 25. 09. 2017 v 14:46 -0300:
> 
>> Simply replacing the URL + protocol does not work so easy because the
>> protocols are handled by different applications: http:// is handled
>> by
>> the browser and file:// is handled by a file manager, or undefined.
>>
>> in my linux system the command invokes
>>
>> xdg-open: file
>> '/home/tdf/git/core/instdir/help3/help.html?swriter/sfx/ui/startcente
>> r/open_all?Language=fr&System=UNIX&Version=6.0'
>> does not exist
> 
> Oh yes, the problem is that xdg-open is confused about the parameters
> there - it thinks it is still part of the filename :-(
> 
> But if you do 'xdg-open file:///some/file/ending_with.html' , it opens
> that in the browser; so I think whenever the help file is supposed to
> be open, the easiest will be to write a temporary redirectXYZABC.html
> file like:
> 
> <!DOCTYPE HTML>
> <html lang="en-US">
>     <head>
>         <meta charset="UTF-8">
>         <meta http-equiv="refresh" content="1;
> url=file:///<...>?Language=fr&System=UNIX&Version=6.0">
>         <script type="text/javascript">
>             window.location.href =
> "file:///<...>?Language=fr&System=UNIX&Version=6.0"
>         </script>
>         <title>Help Page Redirection</title>
>     </head>
>     <body>
>         ... a short explanation about the help maybe? ...
>         <!-- Note: don't tell people to `click` the link, just tell them
> that it is a link. -->
>         If you are not redirected automatically, follow this <a
> href='file:///<...>?Language=fr&System=UNIX&Version=6.0'>link to
> example</a>.
>     </body>
> </html>
> 
> and let xdg-open open that one.
> 
> I've tested here, and xdg-open opens this in the webbrowser & the
> redirect works fine :-)  So that + some proper cleanup of the temp
> directory will do that I hope.
> 
> All the best,
> Kendy
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
> 

-- 
Olivier Hallot
LibreOffice Documentation Coordinator
Comunidade LibreOffice
Rio de Janeiro - Brasil - Local Time: UTC-02:00
http://tdf.io/joinus


More information about the LibreOffice mailing list