tdf#131395 handle all outstanding events

to ensure the paint gets handled, if this turns out not to be sufficient then
next fallback is to allow a route to Dialog::ensureRepaint to be exposed

Change-Id: I3ab749170dfaeb92eae40a44bb1bde123c47f9f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90686
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx
index 81a0251..8edfac4 100644
--- a/sd/source/ui/dlg/brkdlg.cxx
+++ b/sd/source/ui/dlg/brkdlg.cxx
@@ -21,8 +21,9 @@
#include <sfx2/progress.hxx>

#include <svx/svdetc.hxx>
#include <vcl/weld.hxx>
#include <vcl/scheduler.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>

#include <sdresid.hxx>
#include <drawview.hxx>
@@ -125,7 +126,7 @@ IMPL_LINK( BreakDlg, UpDate, void*, nInit, bool )
    // make sure dialog gets painted, it is intended to
    // show the progress to the user. Also necessary to
    // provide a clickable cancel button
    Application::Reschedule(true);
    Scheduler::ProcessEventsToIdle();

    // return okay-value (-> !cancel)
    return !m_bCancel;