diff options
author | Juergen Funk <juergen.funk_ml@cib.de> | 2019-08-27 09:22:17 +0200 |
---|---|---|
committer | Juergen Funk (CIB) <juergen.funk_ml@cib.de> | 2019-08-28 14:23:11 +0200 |
commit | c16bfef0d51ad903defdb2bacb4550de481d3074 (patch) | |
tree | 381b8e4a359b32e92df6bb4118fa0a63c8c18193 /vcl/win | |
parent | 63ee66fd965aa2c40e8aca708d9d370cf419ce33 (diff) |
tdf#127192 Printing in main thread
the wollmux has change the dialogs form swing to the LO-Dialogs,
and when printig with MS-PDF then LO hang on this line.
The reason is wollmux run in it own thread, but this thread has
no win-message-pump, when the printer-driver would open the
FileSave-Dialog then it hangs, because the message-pump
is missing in this thread.
The swing has made it own win-message-pump for this
thread.
Change-Id: Ia5131464dcc5f166133a3302d29550e945dd1026
Reviewed-on: https://gerrit.libreoffice.org/78170
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de>
Tested-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/salprn.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx index 8119bad8cdb7..73ade5080c55 100644 --- a/vcl/win/gdi/salprn.cxx +++ b/vcl/win/gdi/salprn.cxx @@ -52,6 +52,8 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <comphelper/processfactory.hxx> +#include <vcl/threadex.hxx> + #include <malloc.h> #include <winspool.h> @@ -1502,8 +1504,8 @@ bool WinSalPrinter::StartJob( const OUString* pFileName, else aInfo.lpszOutput = nullptr; - // start Job - int nRet = lcl_StartDocW( hDC, &aInfo, this ); + // start Job, in the main thread + int nRet = vcl::solarthread::syncExecute([hDC, this, &aInfo]() -> int { return lcl_StartDocW(hDC, &aInfo, this); }); if ( nRet <= 0 ) { |