Hello,

Currently, under Windows the command-line help information (that is available 
using soffice --help) and version information (soffice --version) are shown in 
a dedicated dialog window (CmdlineHelpDialog). That has following problems:

1. The dialog does not allow for scrolling, resizing and selecting. This 
impairs usability of the information, but it may be fixed.

2. This makes the code unnecessary complicated, OS-dependent, because on every 
other platform, we output the information to console.

Given that using command-line switches implies some experience with console, 
it's natural to unify the behavior and use console on Windows OS for this, too.

However, this approach has another problem. As a GUI program, that is launched 
by another GUI program (soffice.exe launches soffice.bin), LibreOffice does not 
have its own console from the beginning, and cannot easily get access to parent 
console (if any: it may be launched from yet another GUI app, e.g. from 
explorer shortcut). And even if we somehow get to that console, we cannot 
ensure native user experience with it: Windows knows that it started GUI app, 
and thus console had already displayed command prompt, so our output will go 
after that prompt, and will not be followed by another one.

Another option would be to make LO a console application, and release console 
early (but not before we handled command line and had output help message). But 
this is not a good solution, too: marking a Windows executable as console one 
will force OS to create console each time the program is executed from e.g. 
shortcut (before main()), and that console will flash on start, creating bad UX.

I have posted a patch to gerrit [1], that creates *new* console each time LO is 
started with --help or --version, even when it is started from console itself. 
This allows to use console's ability to scroll, select, resize, and also 
standardises our code. IMO, this new window is no worse than new graphic window 
used previously, given that we ecpect using console using command-line switches.

Could you please share your thoughts on this? Did I miss some way to implement 
it better?

Thanks!

1. https://gerrit.libreoffice.org/31059/

--
Best regards,
Mike Kaganski
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to