[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - vcl/win

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Wed May 15 07:56:37 UTC 2019


 vcl/win/gdi/salprn.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 249f6cd9bf764116aa0acfaa092ad8af7d59e52f
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Sep 11 14:02:22 2018 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed May 15 09:55:44 2019 +0200

    tdf#118690 don't try to process all messages
    
    Regression from commit 221b0ab1245b ("WIN use Reschedule instead
    of own dispatch loops"). This limit the maximum reschedule loops
    as the original code did. There is still a busy loop when opening
    the print dialog, as it was before the patch, but this at least
    gets printing started.
    
    Reviewed-on: https://gerrit.libreoffice.org/60310
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
    (cherry picked from commit 79cb9ef524c3a6b058019da5ca6acfad7a895bf2)
    
     Conflicts:
            vcl/win/gdi/salprn.cxx
    
    Change-Id: If867329b82b13c898bb15b08584244084488a66c
    Reviewed-on: https://gerrit.libreoffice.org/72333
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index acfa719b9302..f6cfb3a9eccd 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1316,12 +1316,17 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
 {
     SalData*    pSalData = GetSalData();
     WinSalPrinter* pPrinter;
+    int         i = 0;
     bool        bWhile = true;
 
     do
     {
         // process messages
         bWhile = Application::Reschedule( true );
+        if (i > 15)
+            bWhile = false;
+        else
+            ++i;
 
         pPrinter = pSalData->mpFirstPrinter;
         while ( pPrinter )
@@ -1484,7 +1489,7 @@ bool WinSalPrinter::StartJob( const OUString* pFileName,
 
     // As the Telecom Balloon Fax driver tends to send messages repeatedly
     // we try to process first all, and then insert a dummy message
-    while ( Application::Reschedule( true ) );
+    for (int i = 0; Application::Reschedule( true ) && i <= 15; ++i);
     BOOL const ret = PostMessageW(GetSalData()->mpFirstInstance->mhComWnd, SAL_MSG_DUMMY, 0, 0);
     SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!");
 


More information about the Libreoffice-commits mailing list