[Libreoffice] [Libreoffice-ux-advise] UI disaster on Windows: soffice -h

Tor Lillqvist tml at iki.fi
Tue Jan 10 00:25:56 PST 2012


If that AttachConsole(ATTACH_PARENT_PROCESS) is executed by
soffice.bin, it probably is the case that as already soffice.exe is a
"gui" executable, soffice.exe doesn't have a console, and thus for its
child process, soffice.bin, there is no parent process console to
attach to. Try having also soffice.exe (and scalc.exe, swriter.exe
etc) execute the AttachConsole() call as early as possible.

As AttachConsole() is not present in Windows 2000 (assuming we still
want to support that) we should look up AttachConsole() dynamically
from kernel32.dll, and if not found just don't do anything.  Or
possibly, just before actually going to print something to stdout,
allocate a new console with AllocConsole() and then do the freopen().
But in that case we should also do some "press any key to close this
window" and wait for a key press before exiting. Probably this is too
much bother just for Windows 2000.

--tml


More information about the LibreOffice mailing list