[Libreoffice-commits] core.git: 8 commits - avmedia/source basctl/source chart2/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source forms/source formula/source framework/source include/tools include/vcl linguistic/source reportdesign/source sc/inc sc/source sd/source sfx2/source solenv/bin solenv/gdb starmath/source svtools/source svx/source sw/inc sw/qa sw/source toolkit/source vcl/backendtest vcl/inc vcl/opengl vcl/osx vcl/qa vcl/source vcl/unx

Jan-Marek Glogowski glogow at fbihome.de
Tue Jan 17 15:24:58 UTC 2017


 avmedia/source/framework/mediacontrol.cxx                 |    2 
 avmedia/source/framework/soundhandler.cxx                 |    2 
 avmedia/source/opengl/oglplayer.cxx                       |    2 
 basctl/source/basicide/baside2b.cxx                       |    4 
 basctl/source/dlged/dlged.cxx                             |    2 
 chart2/source/view/charttypes/GL3DBarChart.cxx            |    3 
 cui/source/dialogs/cuigaldlg.cxx                          |    2 
 cui/source/dialogs/linkdlg.cxx                            |    2 
 cui/source/dialogs/thesdlg.cxx                            |    2 
 cui/source/options/optjava.cxx                            |    2 
 cui/source/tabpages/backgrnd.cxx                          |    2 
 cui/source/tabpages/chardlg.cxx                           |    2 
 cui/source/tabpages/macroass.cxx                          |   12 
 dbaccess/source/ui/querydesign/JoinTableView.cxx          |    2 
 desktop/source/app/app.cxx                                |    5 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx          |    4 
 desktop/source/lib/init.cxx                               |    2 
 drawinglayer/source/primitive2d/textlayoutdevice.cxx      |    2 
 drawinglayer/source/processor2d/vclhelperbufferdevice.cxx |    1 
 editeng/source/editeng/impedit2.cxx                       |    5 
 editeng/source/editeng/impedit5.cxx                       |    2 
 extensions/source/bibliography/bibcont.cxx                |    2 
 extensions/source/bibliography/toolbar.cxx                |    2 
 extensions/source/update/ui/updatecheckui.cxx             |    2 
 forms/source/component/ListBox.cxx                        |    2 
 formula/source/ui/dlg/formula.cxx                         |    2 
 formula/source/ui/dlg/funcutl.cxx                         |    4 
 framework/source/layoutmanager/layoutmanager.cxx          |    4 
 framework/source/services/autorecovery.cxx                |    1 
 framework/source/uielement/menubarmanager.cxx             |    2 
 framework/source/uielement/toolbarmanager.cxx             |    1 
 include/tools/link.hxx                                    |    1 
 include/vcl/dockwin.hxx                                   |    7 
 include/vcl/idle.hxx                                      |   44 ++-
 include/vcl/scheduler.hxx                                 |   86 +++---
 include/vcl/syswin.hxx                                    |    7 
 include/vcl/timer.hxx                                     |   52 ++-
 linguistic/source/lngsvcmgr.cxx                           |    2 
 reportdesign/source/ui/report/DesignView.cxx              |    2 
 sc/inc/chartlis.hxx                                       |    3 
 sc/source/core/data/documen2.cxx                          |    2 
 sc/source/core/tool/chartlis.cxx                          |   14 -
 sc/source/core/tool/refreshtimer.cxx                      |    2 
 sc/source/ui/app/inputhdl.cxx                             |   79 ++----
 sc/source/ui/app/scmod.cxx                                |    5 
 sc/source/ui/dbgui/sfiltdlg.cxx                           |    2 
 sc/source/ui/docshell/autostyl.cxx                        |    2 
 sc/source/ui/docshell/externalrefmgr.cxx                  |    1 
 sc/source/ui/miscdlgs/acredlin.cxx                        |    5 
 sc/source/ui/miscdlgs/anyrefdg.cxx                        |    2 
 sc/source/ui/miscdlgs/conflictsdlg.cxx                    |    3 
 sc/source/ui/navipi/navipi.cxx                            |    2 
 sc/source/ui/pagedlg/tphfedit.cxx                         |    2 
 sd/source/core/drawdoc4.cxx                               |    2 
 sd/source/ui/dlg/brkdlg.cxx                               |    9 
 sd/source/ui/dlg/filedlg.cxx                              |    3 
 sd/source/ui/framework/module/ShellStackGuard.cxx         |    2 
 sd/source/ui/inc/BreakDlg.hxx                             |    2 
 sd/source/ui/slideshow/slideshowimpl.cxx                  |    2 
 sd/source/ui/slidesorter/controller/SlsAnimator.cxx       |    2 
 sd/source/ui/view/sdview.cxx                              |    4 
 sfx2/source/appl/appcfg.cxx                               |    3 
 sfx2/source/appl/newhelp.cxx                              |    8 
 sfx2/source/control/bindings.cxx                          |   53 ++--
 sfx2/source/control/dispatch.cxx                          |    7 
 sfx2/source/control/itemdel.cxx                           |    4 
 sfx2/source/dialog/basedlgs.cxx                           |    6 
 sfx2/source/dialog/dinfdlg.cxx                            |    4 
 sfx2/source/dialog/dockwin.cxx                            |    3 
 sfx2/source/dialog/filedlghelper.cxx                      |    6 
 sfx2/source/dialog/templdlg.cxx                           |    2 
 sfx2/source/doc/new.cxx                                   |    2 
 solenv/bin/install-gdb-printers                           |    3 
 solenv/gdb/libreoffice/vcl.py                             |   98 +++++++
 starmath/source/edit.cxx                                  |    4 
 svtools/source/contnr/imivctl1.cxx                        |   30 +-
 svtools/source/contnr/svimpbox.cxx                        |    4 
 svtools/source/contnr/treelistbox.cxx                     |    3 
 svtools/source/control/tabbar.cxx                         |    5 
 svtools/source/dialogs/wizdlg.cxx                         |    2 
 svtools/source/graphic/grfcache.cxx                       |    2 
 svtools/source/graphic/grfmgr.cxx                         |    2 
 svtools/source/misc/filechangedchecker.cxx                |    2 
 svx/source/dialog/_contdlg.cxx                            |    4 
 svx/source/dialog/fontwork.cxx                            |    2 
 svx/source/dialog/graphctl.cxx                            |    2 
 svx/source/dialog/imapdlg.cxx                             |    2 
 svx/source/dialog/svxbmpnumvalueset.cxx                   |    2 
 svx/source/form/datanavi.cxx                              |    2 
 svx/source/form/fmshimp.cxx                               |    1 
 svx/source/form/formcontroller.cxx                        |    2 
 svx/source/sdr/contact/objectcontactofpageview.cxx        |    2 
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx     |    2 
 svx/source/sdr/event/eventhandler.cxx                     |    2 
 svx/source/sdr/overlay/overlaymanagerbuffered.cxx         |    3 
 svx/source/sidebar/PanelLayout.cxx                        |    3 
 svx/source/sidebar/media/MediaPlaybackPanel.cxx           |    2 
 svx/source/stbctrls/modctrl.cxx                           |    2 
 svx/source/svdraw/svdetc.cxx                              |    3 
 svx/source/svdraw/svdibrow.cxx                            |    2 
 svx/source/svdraw/svdpntv.cxx                             |    3 
 svx/source/tbxctrls/grafctrl.cxx                          |    2 
 sw/inc/dbmgr.hxx                                          |    5 
 sw/qa/extras/uiwriter/uiwriter.cxx                        |    2 
 sw/source/core/doc/DocumentStatisticsManager.cxx          |    3 
 sw/source/core/doc/DocumentTimerManager.cxx               |    3 
 sw/source/core/doc/docnew.cxx                             |    3 
 sw/source/core/docnode/threadmanager.cxx                  |    2 
 sw/source/core/txtnode/SwGrammarContact.cxx               |    1 
 sw/source/core/unocore/unochart.cxx                       |    1 
 sw/source/ui/dbui/mmoutputtypepage.cxx                    |    2 
 sw/source/ui/envelp/labfmt.cxx                            |    2 
 sw/source/uibase/dbui/dbmgr.cxx                           |   19 -
 sw/source/uibase/docvw/edtwin.cxx                         |    2 
 sw/source/uibase/docvw/srcedtw.cxx                        |    2 
 sw/source/uibase/misc/swruler.cxx                         |    1 
 sw/source/uibase/uiview/view.cxx                          |    1 
 sw/source/uibase/utlui/navipi.cxx                         |    2 
 sw/source/uibase/utlui/unotools.cxx                       |    2 
 toolkit/source/awt/vclxtoolkit.cxx                        |    2 
 vcl/backendtest/VisualBackendTest.cxx                     |    2 
 vcl/inc/saltimer.hxx                                      |   11 
 vcl/inc/svdata.hxx                                        |    2 
 vcl/opengl/gdiimpl.cxx                                    |    9 
 vcl/osx/salinst.cxx                                       |    2 
 vcl/qa/cppunit/lifecycle.cxx                              |    2 
 vcl/qa/cppunit/timer.cxx                                  |    4 
 vcl/source/app/help.cxx                                   |    8 
 vcl/source/app/idle.cxx                                   |   38 --
 vcl/source/app/scheduler.cxx                              |  184 ++++++--------
 vcl/source/app/svapp.cxx                                  |    6 
 vcl/source/app/timer.cxx                                  |   79 +-----
 vcl/source/control/edit.cxx                               |    3 
 vcl/source/control/quickselectionengine.cxx               |    1 
 vcl/source/control/scrbar.cxx                             |    1 
 vcl/source/edit/textdata.cxx                              |    6 
 vcl/source/edit/texteng.cxx                               |    1 
 vcl/source/window/cursor.cxx                              |    1 
 vcl/source/window/dockmgr.cxx                             |    7 
 vcl/source/window/dockwin.cxx                             |    6 
 vcl/source/window/menufloatingwindow.cxx                  |    5 
 vcl/source/window/paint.cxx                               |    2 
 vcl/source/window/scrwnd.cxx                              |    1 
 vcl/source/window/seleng.cxx                              |    1 
 vcl/source/window/splitwin.cxx                            |    1 
 vcl/source/window/syswin.cxx                              |    3 
 vcl/source/window/toolbox.cxx                             |    5 
 vcl/source/window/window.cxx                              |    6 
 vcl/source/window/window2.cxx                             |    1 
 vcl/source/window/wrkwin.cxx                              |    2 
 vcl/unx/generic/print/genprnpsp.cxx                       |    2 
 vcl/unx/generic/window/salframe.cxx                       |    1 
 vcl/unx/gtk/gtksalmenu.cxx                                |    2 
 vcl/unx/kde4/KDEXLib.cxx                                  |   20 -
 154 files changed, 684 insertions(+), 527 deletions(-)

New commits:
commit eaf2b87a2e4a2a72c3efdf979c7b87fad5c7cbe5
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Thu Jan 5 09:47:50 2017 +0100

    KDE4 Qt always processes all pending events
    
    Change-Id: I6a6e37c36a64640b641b116867da5c63c9d36bca

diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 06340be..8d59315 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -301,21 +301,19 @@ SalYieldResult KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
     }
 }
 
-SalYieldResult KDEXLib::processYield( bool bWait, bool bHandleAllCurrentEvents )
+/**
+ * Quoting the Qt docs: [QAbstractEventDispatcher::processEvents] processes
+ * pending events that match flags until there are no more events to process.
+ */
+SalYieldResult KDEXLib::processYield( bool bWait, bool )
 {
     m_blockIdleTimeout = !bWait;
     QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance( qApp->thread());
     bool wasEvent = false;
-    for( int cnt = bHandleAllCurrentEvents ? 100 : 1;
-         cnt > 0;
-         --cnt )
-    {
-        if( !dispatcher->processEvents( QEventLoop::AllEvents ))
-            break;
-        wasEvent = true;
-    }
-    if( bWait && !wasEvent )
-        dispatcher->processEvents( QEventLoop::WaitForMoreEvents );
+    if ( bWait )
+        wasEvent = dispatcher->processEvents( QEventLoop::WaitForMoreEvents );
+    else
+        wasEvent = dispatcher->processEvents( QEventLoop::AllEvents );
     m_blockIdleTimeout = false;
     return wasEvent ? SalYieldResult::EVENT
                     : SalYieldResult::TIMEOUT;
commit 59b84bc78dff2adb265d9fa8edb4c42794cf9771
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Sep 14 13:48:02 2016 +0200

    Change Idle to be a Timer subclass
    
    Drops a lot of duplicated code, as Idle is just a convenience
    class for instant, mostly low priority timers.
    
    Change-Id: I847592e92e86d15ab1cab168bf0e667322e48048

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 12ccf1c..a7d88ef 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1325,7 +1325,7 @@ void EditorWindow::DestroyProgress()
 void EditorWindow::ForceSyntaxTimeout()
 {
     aSyntaxIdle.Stop();
-    aSyntaxIdle.GetIdleHdl().Call(&aSyntaxIdle);
+    aSyntaxIdle.Invoke();
 }
 
 // BreakPointWindow
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 0d30081..f089225 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -809,7 +809,7 @@ void IdleFormattter::ForceTimeout()
     if ( IsActive() )
     {
         Stop();
-        ((Link<Idle *, void>&)GetIdleHdl()).Call( this );
+        Invoke();
     }
 }
 
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index b6303be..d78a4a7 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2668,8 +2668,7 @@ throw( uno::RuntimeException, std::exception )
         m_bMustDoLayout = true;
         if ( !m_aAsyncLayoutTimer.IsActive() )
         {
-            const Link<Timer *, void>& aLink = m_aAsyncLayoutTimer.GetTimeoutHdl();
-            aLink.Call( &m_aAsyncLayoutTimer );
+            m_aAsyncLayoutTimer.Invoke();
         }
         if ( m_nLockCount == 0 )
             m_aAsyncLayoutTimer.Start();
diff --git a/include/tools/link.hxx b/include/tools/link.hxx
index 8b65be4..de76c25 100644
--- a/include/tools/link.hxx
+++ b/include/tools/link.hxx
@@ -102,6 +102,7 @@ public:
     { return function_ == other.function_ && instance_ == other.instance_; };
 
     void *GetInstance() const { return instance_; }
+    Stub* GetFunction() const { return function_; }
 
 private:
     Stub * function_;
diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index 9f491e1..85ea758 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -20,12 +20,19 @@
 #ifndef INCLUDED_VCL_IDLE_HXX
 #define INCLUDED_VCL_IDLE_HXX
 
-#include <tools/link.hxx>
-#include <vcl/scheduler.hxx>
+#include <vcl/timer.hxx>
 
-class VCL_DLLPUBLIC Idle : public Task
+/**
+ * An idle is a timer to be scheduled immediately.
+ *
+ * It's - more or less - just a convenience class.
+ */
+class VCL_DLLPUBLIC Idle : public Timer
 {
-    Link<Idle *, void> maIdleHdl;          // Callback Link
+private:
+    // Delete all timeout specific functions, we don't want in an Idle
+    void          SetTimeout( sal_uInt64 nTimeoutMs ) = delete;
+    sal_uInt64    GetTimeout() const = delete;
 
 protected:
     virtual bool ReadyForSchedule( bool bIdle, sal_uInt64 nTimeNow ) const override;
@@ -34,18 +41,23 @@ protected:
 
 public:
     Idle( const sal_Char *pDebugName = nullptr );
-    Idle( const Idle& rIdle );
 
-    virtual void    Start() override;
+    virtual void  Start() override;
 
-    /// Make it possible to associate a callback with this idle handler
-    /// of course, you can also sub-class and override 'Invoke'
-    void            SetIdleHdl( const Link<Idle *, void>& rLink ) { maIdleHdl = rLink; }
-    const Link<Idle *, void>& GetIdleHdl() const { return maIdleHdl; }
-    virtual void Invoke() override;
-    Idle&           operator=( const Idle& rIdle );
+    /**
+     * Convenience function for more readable code
+     *
+     * TODO: actually rename it and it's instances to SetInvokeHandler
+     */
+    inline void   SetIdleHdl( const Link<Idle *, void>& rLink );
 };
 
+inline void Idle::SetIdleHdl( const Link<Idle*, void> &rLink )
+{
+    SetInvokeHandler( Link<Timer*, void>( rLink.GetInstance(),
+        reinterpret_cast< Link<Timer*, void>::Stub* >( rLink.GetFunction()) ) );
+}
+
 #endif // INCLUDED_VCL_IDLE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 19a882f..07fb9a8 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -26,9 +26,9 @@
 class VCL_DLLPUBLIC Timer : public Task
 {
 protected:
-    Link<Timer *, void> maTimeoutHdl;          // Callback Link
-    sal_uInt64      mnTimeout;
-    bool            mbAuto;
+    Link<Timer *, void> maInvokeHandler;   ///< Callback Link
+    sal_uInt64          mnTimeout;
+    bool                mbAuto;
 
     virtual void SetDeletionFlags() override;
     virtual bool ReadyForSchedule( bool bIdle, sal_uInt64 nTimeNow ) const override;
@@ -37,29 +37,45 @@ protected:
 
 public:
     Timer( const sal_Char *pDebugName = nullptr );
-    Timer( const Timer& rTimer );
 
-    /// Make it possible to associate a callback with this timer handler
-    /// of course, you can also sub-class and override 'Invoke'
-    void            SetTimeoutHdl( const Link<Timer *, void>& rLink ) { maTimeoutHdl = rLink; }
-    const Link<Timer *, void>& GetTimeoutHdl() const { return maTimeoutHdl; }
+    /**
+     * Calls the maInvokeHandler with the parameter this.
+     */
+    virtual void    Invoke() override;
+    /**
+     * Calls the maInvokeHandler with the parameter.
+     *
+     * Convenience Invoke function, mainly used to call with nullptr.
+     *
+     * @param arg parameter for the Link::Call function
+     */
+    void            Invoke( Timer *arg );
+    void            SetInvokeHandler( const Link<Timer *, void>& rLink ) { maInvokeHandler = rLink; }
+    bool            HasInvokeHandler() const { return maInvokeHandler.IsSet(); };
+
+    /**
+     * Convenience function for more readable code
+     *
+     * TODO: actually use SetInvokeHandler and drop it
+     */
+    inline void     SetTimeoutHdl( const Link<Timer *, void>& rLink );
+
     void            SetTimeout( sal_uInt64 nTimeoutMs );
     sal_uInt64      GetTimeout() const { return mnTimeout; }
-    virtual void    Invoke() override;
-    void            Timeout() { Invoke(); }
-    Timer&          operator=( const Timer& rTimer );
     virtual void    Start() override;
 };
 
+inline void Timer::SetTimeoutHdl( const Link<Timer *, void>& rLink )
+{
+    SetInvokeHandler( rLink );
+}
+
 /// An auto-timer is a multi-shot timer re-emitting itself at
 /// interval until destroyed.
 class VCL_DLLPUBLIC AutoTimer : public Timer
 {
 public:
-                    AutoTimer( const sal_Char *pDebugName = nullptr );
-                    AutoTimer( const AutoTimer& rTimer );
-
-    AutoTimer&      operator=( const AutoTimer& rTimer );
+    AutoTimer( const sal_Char *pDebugName = nullptr );
 };
 
 #endif // INCLUDED_VCL_TIMER_HXX
diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx
index cb83c4c..954c132 100644
--- a/sc/source/core/tool/refreshtimer.cxx
+++ b/sc/source/core/tool/refreshtimer.cxx
@@ -120,7 +120,7 @@ void ScRefreshTimer::Invoke()
     {
         // now we COULD make the call in another thread ...
         ::osl::MutexGuard aGuard( (*ppControl)->GetMutex() );
-        maTimeoutHdl.Call( this );
+        Timer::Invoke();
         // restart from now on, don't execute immediately again if timed out
         // a second time during refresh
         if ( IsActive() )
diff --git a/solenv/gdb/libreoffice/vcl.py b/solenv/gdb/libreoffice/vcl.py
index 28ba3eb..62dc3a0 100644
--- a/solenv/gdb/libreoffice/vcl.py
+++ b/solenv/gdb/libreoffice/vcl.py
@@ -26,19 +26,27 @@ class ImplSchedulerDataPrinter(object):
 
     def as_string(self, gdbobj):
         if gdbobj['mpTask']:
-            sched = gdbobj['mpTask'].dereference()
-            if gdbobj['mpTask'].dynamic_cast( self.timer_type_ptr ):
-                sched_type = "Timer"
-            elif gdbobj['mpTask'].dynamic_cast( self.idle_type_ptr ):
-                sched_type = "Idle"
+            task  = gdbobj['mpTask'].dereference()
+            timer = gdbobj['mpTask'].dynamic_cast( self.timer_type_ptr )
+            idle  = gdbobj['mpTask'].dynamic_cast( self.idle_type_ptr )
+            if idle:
+                task_type = "Idle"
+            elif timer:
+                task_type = "Timer"
             else:
-                assert sched_type, "Task object neither Timer nor Idle"
-            res = "{:7s}{:10s} active: {:6s}".format( sched_type, str(sched['mePriority']), str(sched['mbActive']) )
-            name = sched['mpDebugName']
+                task_type = "Task"
+            res = "{:7s}{:10s} active: {:6s}".format( task_type, str(task['mePriority']), str(task['mbActive']) )
+            name = task['mpDebugName']
             if not name:
                 res = res + "   (task debug name not set)"
             else:
-                res = "{} '{}' ({})".format(res, str(name.string()), str(sched.dynamic_type))
+                res = "{} '{}' ({})".format(res, str(name.string()), str(task.dynamic_type))
+            val_type = gdb.lookup_type(str( task.dynamic_type )).pointer()
+            timer = gdbobj['mpTask'].cast( val_type )
+            if (task_type == "Timer"):
+                res = "{}: {}ms".format(res, timer['mnTimeout'])
+            else:
+                assert 1 == timer['mnTimeout'], "Idle with timeout == {}".format( timer['mnTimeout'] )
             return res
         else:
             assert gdbobj['mbDelete'], "No task set and not marked for deletion!"
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index 52b8d98..895000a 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -20,25 +20,9 @@
 #include <vcl/idle.hxx>
 #include "saltimer.hxx"
 
-void Idle::Invoke()
+Idle::Idle( const sal_Char *pDebugName )
+    : Timer( pDebugName )
 {
-    maIdleHdl.Call( this );
-}
-
-Idle& Idle::operator=( const Idle& rIdle )
-{
-    Task::operator=(rIdle);
-    maIdleHdl = rIdle.maIdleHdl;
-    return *this;
-}
-
-Idle::Idle( const sal_Char *pDebugName ) : Task( pDebugName )
-{
-}
-
-Idle::Idle( const Idle& rIdle ) : Task(rIdle)
-{
-    maIdleHdl = rIdle.maIdleHdl;
 }
 
 void Idle::Start()
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 96485ae..77704db 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -53,25 +53,22 @@ sal_uInt64 Timer::UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow )
     }
 }
 
-Timer::Timer(const sal_Char *pDebugName) :
-    Task(pDebugName),
-    mnTimeout(Scheduler::ImmediateTimeoutMs),
-    mbAuto(false)
+Timer::Timer(const sal_Char *pDebugName)
+    : Task( pDebugName )
+    , mnTimeout( Scheduler::ImmediateTimeoutMs )
+    , mbAuto( false )
 {
     mePriority = TaskPriority::HIGHEST;
 }
 
-Timer::Timer( const Timer& rTimer ) :
-    Task(rTimer),
-    mnTimeout(rTimer.mnTimeout),
-    mbAuto(rTimer.mbAuto)
+void Timer::Invoke()
 {
-    maTimeoutHdl = rTimer.maTimeoutHdl;
+    maInvokeHandler.Call( this );
 }
 
-void Timer::Invoke()
+void Timer::Invoke( Timer *arg )
 {
-    maTimeoutHdl.Call( this );
+    maInvokeHandler.Call( arg );
 }
 
 void Timer::Start()
@@ -88,29 +85,10 @@ void Timer::SetTimeout( sal_uInt64 nNewTimeout )
         StartTimer( mnTimeout );
 }
 
-Timer& Timer::operator=( const Timer& rTimer )
-{
-    Task::operator=(rTimer);
-    maTimeoutHdl = rTimer.maTimeoutHdl;
-    mnTimeout = rTimer.mnTimeout;
-    mbAuto = rTimer.mbAuto;
-    return *this;
-}
-
 AutoTimer::AutoTimer( const sal_Char *pDebugName )
     : Timer( pDebugName )
 {
     mbAuto = true;
 }
 
-AutoTimer::AutoTimer( const AutoTimer& rTimer ) : Timer( rTimer )
-{
-    mbAuto = true;
-}
-
-AutoTimer& AutoTimer::operator=( const AutoTimer& rTimer )
-{
-    Timer::operator=( rTimer );
-    return *this;
-}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 610e492..8ee93fb 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1909,7 +1909,7 @@ void Edit::LoseFocus()
     {
         //notify an update latest when the focus is lost
         mpUpdateDataTimer->Stop();
-        mpUpdateDataTimer->Timeout();
+        mpUpdateDataTimer->Invoke();
     }
 
     if ( !mpSubEdit )
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index ceb42d0..6b8abdf 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -293,7 +293,7 @@ void IdleFormatter::DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts )
     if ( mnRestarts > nMaxRestarts )
     {
         mnRestarts = 0;
-        ((Link<Idle *, void>&)GetIdleHdl()).Call( this );
+        Invoke();
     }
     else
     {
@@ -307,7 +307,7 @@ void IdleFormatter::ForceTimeout()
     {
         Stop();
         mnRestarts = 0;
-        ((Link<Idle *, void>&)GetIdleHdl()).Call( this );
+        Invoke();
     }
 }
 
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index e0e1a93..8e8dfcc 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -660,7 +660,7 @@ IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl, Idle *, void)
         if( mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
         {
             mpWindowImpl->mpFrameData->maPaintIdle.Stop();
-            mpWindowImpl->mpFrameData->maPaintIdle.GetIdleHdl().Call( nullptr );
+            mpWindowImpl->mpFrameData->maPaintIdle.Invoke( nullptr );
         }
     }
 }
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 2757800..46d949a 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2407,7 +2407,7 @@ Size Window::GetSizePixel() const
     {
         VclPtr<vcl::Window> xWindow( const_cast<Window*>(this) );
         mpWindowImpl->mpFrameData->maResizeIdle.Stop();
-        mpWindowImpl->mpFrameData->maResizeIdle.GetIdleHdl().Call( nullptr );
+        mpWindowImpl->mpFrameData->maResizeIdle.Invoke( nullptr );
         if( xWindow->IsDisposed() )
             return Size(0,0);
     }
commit 1531152eff8061d63be5d98641fcafaa1da05167
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Nov 2 16:43:02 2016 +0100

    Add sensible timer handling for Calc input
    
    There is no need to destroy and recreate the timer object.
    Simply stop and start the timer as required.
    
    Change-Id: I2885fef8bdb90c379dc2e9b9caf986d250face5c

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index e2c96c6..2f1c901 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -645,6 +645,10 @@ ScInputHandler::ScInputHandler()
     pActiveViewSh = nullptr;
 
     //  Bindings (only still used for Invalidate) are retrieved if needed on demand
+
+    pDelayTimer = new Timer( "ScInputHandlerDelay timer" );
+    pDelayTimer->SetTimeout( 500 ); // 500 ms delay
+    pDelayTimer->SetTimeoutHdl( LINK( this, ScInputHandler, DelayTimer ) );
 }
 
 ScInputHandler::~ScInputHandler()
@@ -3722,36 +3726,23 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
             {
                 if ( !pInputWin->IsEnabled())
                 {
+                    pDelayTimer->Stop();
                     pInputWin->Enable();
-                    if(pDelayTimer )
-                    {
-                        DELETEZ( pDelayTimer );
-                    }
                 }
             }
             else if(pScMod->IsRefDialogOpen())
             {   // Because every document has its own InputWin,
                 // we should start Timer again, because the input line may
                 // still be active
-                if ( !pDelayTimer )
-                {
-                    pDelayTimer = new Timer("Restart ScInputHandlerDelay timer");
-                    pDelayTimer->SetTimeout( 500 ); // 500 ms delay
-                    pDelayTimer->SetTimeoutHdl( LINK( this, ScInputHandler, DelayTimer ) );
+                if ( !pDelayTimer->IsActive() )
                     pDelayTimer->Start();
-                }
             }
         }
     }
     else // !pState || !pActiveViewSh
     {
-        if ( !pDelayTimer )
-        {
-            pDelayTimer = new Timer("ScInputHandlerDelay timer");
-            pDelayTimer->SetTimeout( 500 ); // 500 ms delay
-            pDelayTimer->SetTimeoutHdl( LINK( this, ScInputHandler, DelayTimer ) );
+        if ( !pDelayTimer->IsActive() )
             pDelayTimer->Start();
-        }
     }
 
     HideTip();
@@ -3767,50 +3758,42 @@ void ScInputHandler::UpdateCellAdjust( SvxCellHorJustify eJust )
 
 void ScInputHandler::ResetDelayTimer()
 {
-    if(pDelayTimer!=nullptr)
+    if( pDelayTimer->IsActive() )
     {
-        DELETEZ( pDelayTimer );
-
-        if ( pInputWin)
-        {
+        pDelayTimer->Stop();
+        if ( pInputWin )
             pInputWin->Enable();
-        }
     }
 }
 
-IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer, void )
+IMPL_LINK_NOARG( ScInputHandler, DelayTimer, Timer*, void )
 {
-    if ( pTimer == pDelayTimer )
+    if ( nullptr == pLastState || SC_MOD()->IsFormulaMode() || SC_MOD()->IsRefDialogOpen())
     {
-        DELETEZ( pDelayTimer );
-
-        if ( nullptr == pLastState || SC_MOD()->IsFormulaMode() || SC_MOD()->IsRefDialogOpen())
+        //! New method at ScModule to query if function autopilot is open
+        SfxViewFrame* pViewFrm = SfxViewFrame::Current();
+        if ( pViewFrm && pViewFrm->GetChildWindow( SID_OPENDLG_FUNCTION ) )
         {
-            //! New method at ScModule to query if function autopilot is open
-            SfxViewFrame* pViewFrm = SfxViewFrame::Current();
-            if ( pViewFrm && pViewFrm->GetChildWindow( SID_OPENDLG_FUNCTION ) )
+            if ( pInputWin)
             {
-                if ( pInputWin)
-                {
-                    pInputWin->EnableButtons( false );
-                    pInputWin->Disable();
-                }
+                pInputWin->EnableButtons( false );
+                pInputWin->Disable();
             }
-            else if ( !bFormulaMode ) // Keep formula e.g. for help
-            {
-                bInOwnChange = true; // disable ModifyHdl (reset below)
-
-                pActiveViewSh = nullptr;
-                mpEditEngine->SetText( EMPTY_OUSTRING );
-                if ( pInputWin )
-                {
-                    pInputWin->SetPosString( EMPTY_OUSTRING );
-                    pInputWin->SetTextString( EMPTY_OUSTRING );
-                    pInputWin->Disable();
-                }
+        }
+        else if ( !bFormulaMode ) // Keep formula e.g. for help
+        {
+            bInOwnChange = true; // disable ModifyHdl (reset below)
 
-                bInOwnChange = false;
+            pActiveViewSh = nullptr;
+            mpEditEngine->SetText( EMPTY_OUSTRING );
+            if ( pInputWin )
+            {
+                pInputWin->SetPosString( EMPTY_OUSTRING );
+                pInputWin->SetTextString( EMPTY_OUSTRING );
+                pInputWin->Disable();
             }
+
+            bInOwnChange = false;
         }
     }
 }
commit fdc612619c1c133353026166206cea18c48089a6
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Jan 4 12:06:42 2017 +0100

    Refactor Scheduler to add Task class
    
    Moves all the "task-specific" stuff into a Task class and just
    keeps the "real" static Scheduler functions in the original
    Scheduler class.
    
    Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c

diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 8d3ac38..0f257ef 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -114,7 +114,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
         mpZoomToolBox->SetPaintTransparent( true );
     }
 
-    maIdle.SetPriority( SchedulerPriority::LOW );
+    maIdle.SetPriority( TaskPriority::LOW );
     maIdle.SetIdleHdl( LINK( this, MediaControl, implTimeoutHdl ) );
     maIdle.Start();
 }
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx
index 753fddc..0907555 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -221,7 +221,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL&
         // Count this request and initialize self-holder against dying by uno ref count ...
         m_xSelfHold.set(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
         m_xPlayer->start();
-        m_aUpdateIdle.SetPriority( SchedulerPriority::LOWER );
+        m_aUpdateIdle.SetPriority( TaskPriority::LOWER );
         m_aUpdateIdle.Start();
     }
     catch( css::uno::Exception& e )
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index bfc25d4..12b746a 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -123,7 +123,7 @@ bool OGLPlayer::create( const OUString& rURL )
 
     // Set timer
     m_aTimer.SetTimeout(8); // is 125fps enough for anyone ?
-    m_aTimer.SetPriority(SchedulerPriority::LOW);
+    m_aTimer.SetPriority(TaskPriority::LOW);
     m_aTimer.SetTimeoutHdl(LINK(this,OGLPlayer,TimerHandler));
 
     return true;
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index d7a9074..12ccf1c 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -960,7 +960,7 @@ void EditorWindow::CreateEditEngine()
 
     ImplSetFont();
 
-    aSyntaxIdle.SetPriority( SchedulerPriority::LOWER );
+    aSyntaxIdle.SetPriority( TaskPriority::LOWER );
     aSyntaxIdle.SetIdleHdl( LINK( this, EditorWindow, SyntaxTimerHdl ) );
 
     bool bWasDoSyntaxHighlight = bDoSyntaxHighlight;
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 411cb55..cc0aa7f 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -217,7 +217,7 @@ DlgEditor::DlgEditor (
     m_ClipboardDataFlavorsResource[1].HumanPresentableName = "Dialog 8.0" ;
     m_ClipboardDataFlavorsResource[1].DataType =             cppu::UnoType<Sequence< sal_Int8 >>::get();
 
-    aMarkIdle.SetPriority(SchedulerPriority::LOW);
+    aMarkIdle.SetPriority(TaskPriority::LOW);
     aMarkIdle.SetIdleHdl( LINK( this, DlgEditor, MarkTimeout ) );
 
     rWindow.SetMapMode( MapMode( MapUnit::Map100thMM ) );
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 6891007..fea7cf0 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -558,7 +558,7 @@ GL3DBarChart::GL3DBarChart(
         {
             mbAutoFly = atoi(aAutoFly);
         }
-        maIdle.SetPriority(SchedulerPriority::REPAINT);
+        maIdle.SetPriority(TaskPriority::REPAINT);
         maIdle.SetIdleHdl(LINK(this, GL3DBarChart, UpdateTimerHdl));
         maIdle.SetDebugName( "charttypes::GL3DBarChart maIdle" );
         maIdle.Start();
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 08b28da..185ffc6 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -450,7 +450,7 @@ short ActualizeProgress::Execute()
 
     pIdle = new Idle("ActualizeProgressTimeout");
     pIdle->SetIdleHdl( LINK( this, ActualizeProgress, TimeoutHdl ) );
-    pIdle->SetPriority( SchedulerPriority::LOWEST );
+    pIdle->SetPriority( TaskPriority::LOWEST );
     pIdle->Start();
 
     nRet = ModalDialog::Execute();
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index bba24a8..1da650d 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -124,7 +124,7 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b
 
     // UpdateTimer for DDE-/Grf-links, which are waited for
     aUpdateIdle.SetIdleHdl( LINK( this, SvBaseLinksDlg, UpdateWaitingHdl ) );
-    aUpdateIdle.SetPriority( SchedulerPriority::LOWEST );
+    aUpdateIdle.SetPriority( TaskPriority::LOWEST );
 
     m_pPbOpenSource->Hide();
 
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index cd71d22..3f831e7 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -64,7 +64,7 @@ LookUpComboBox::LookUpComboBox(vcl::Window *pParent)
     EnableAutoSize(true);
 
     m_aModifyIdle.SetIdleHdl( LINK( this, LookUpComboBox, ModifyTimer_Hdl ) );
-    m_aModifyIdle.SetPriority( SchedulerPriority::LOWEST );
+    m_aModifyIdle.SetPriority( TaskPriority::LOWEST );
 
     EnableAutocomplete( false );
 }
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 03f51c9..4621607 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -186,7 +186,7 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* pParent, const SfxItemSet&
     m_pParameterBtn->SetClickHdl( LINK( this, SvxJavaOptionsPage, ParameterHdl_Impl ) );
     m_pClassPathBtn->SetClickHdl( LINK( this, SvxJavaOptionsPage, ClassPathHdl_Impl ) );
     m_aResetIdle.SetIdleHdl( LINK( this, SvxJavaOptionsPage, ResetHdl_Impl ) );
-    m_aResetIdle.SetPriority(SchedulerPriority::LOWER);
+    m_aResetIdle.SetPriority(TaskPriority::LOWER);
 
     m_pExpertConfigBtn->SetClickHdl( LINK( this, SvxJavaOptionsPage, ExpertConfigHdl_Impl) );
     if (!officecfg::Office::Common::Security::EnableExpertConfiguration::get())
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 9938b36..5858783 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -953,7 +953,7 @@ void SvxBackgroundTabPage::ShowSelector()
 
         // delayed loading via timer (because of UI-Update)
         pPageImpl->pLoadIdle = new Idle("DelayedLoad");
-        pPageImpl->pLoadIdle->SetPriority( SchedulerPriority::LOWEST );
+        pPageImpl->pLoadIdle->SetPriority( TaskPriority::LOWEST );
         pPageImpl->pLoadIdle->SetIdleHdl(
             LINK( this, SvxBackgroundTabPage, LoadIdleHdl_Impl ) );
 
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 5bb00f4..240698f 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -247,7 +247,7 @@ struct SvxCharNamePage_Impl
         m_bInSearchMode ( false )
 
     {
-        m_aUpdateIdle.SetPriority( SchedulerPriority::LOWEST );
+        m_aUpdateIdle.SetPriority( TaskPriority::LOWEST );
     }
 
     ~SvxCharNamePage_Impl()
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 529124c..7485ad5 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -138,7 +138,7 @@ SfxMacroTabPage::SfxMacroTabPage(vcl::Window* pParent, const Reference< XFrame >
     mpImpl.reset(new SfxMacroTabPage_Impl);
 
     mpImpl->maFillGroupIdle.SetIdleHdl( LINK( this, SfxMacroTabPage, TimeOut_Impl ) );
-    mpImpl->maFillGroupIdle.SetPriority( SchedulerPriority::HIGHEST );
+    mpImpl->maFillGroupIdle.SetPriority( TaskPriority::HIGHEST );
     mpImpl->maFillGroupIdle.SetDebugName( "SfxMacroTabPage maFillGroupIdle" );
 
     mpImpl->sStrEvent = get<FixedText>("eventft")->GetText();
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index f08beee..7289032 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -1063,7 +1063,7 @@ void OJoinTableView::ScrollWhileDragging()
     // resetting timer, if still necessary
     if (bNeedScrollTimer)
     {
-        m_aDragScrollIdle.SetPriority(SchedulerPriority::LOW);
+        m_aDragScrollIdle.SetPriority(TaskPriority::LOW);
         m_aDragScrollIdle.Start();
     }
 
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 89ac27c..04a0259 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -521,7 +521,7 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager,
     m_pUpdateBtn->Hide();
 #endif
 
-    m_aIdle.SetPriority(SchedulerPriority::LOWEST);
+    m_aIdle.SetPriority(TaskPriority::LOWEST);
     m_aIdle.SetIdleHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) );
 }
 
@@ -1065,7 +1065,7 @@ UpdateRequiredDialog::UpdateRequiredDialog(vcl::Window *pParent, TheExtensionMan
     m_pUpdateBtn->Enable( false );
     m_pCloseBtn->GrabFocus();
 
-    m_aIdle.SetPriority( SchedulerPriority::LOWEST );
+    m_aIdle.SetPriority( TaskPriority::LOWEST );
     m_aIdle.SetIdleHdl( LINK( this, UpdateRequiredDialog, TimeOutHdl ) );
 }
 
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 79e284a..d29a695 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -602,7 +602,7 @@ CallbackFlushHandler::CallbackFlushHandler(LibreOfficeKitDocument* pDocument, Li
       m_bPartTilePainting(false),
       m_bEventLatch(false)
 {
-    SetPriority(SchedulerPriority::POST_PAINT);
+    SetPriority(TaskPriority::POST_PAINT);
 
     // Add the states that are safe to skip duplicates on,
     // even when not consequent.
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 946ae5c..fc2b2aa 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -148,7 +148,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
     aStatusTimer.SetTimeoutHdl( LINK( this, ImpEditEngine, StatusTimerHdl ) );
     aStatusTimer.SetDebugName( "editeng::ImpEditEngine aStatusTimer" );
 
-    aIdleFormatter.SetPriority( SchedulerPriority::REPAINT );
+    aIdleFormatter.SetPriority( TaskPriority::REPAINT );
     aIdleFormatter.SetIdleHdl( LINK( this, ImpEditEngine, IdleFormatHdl ) );
     aIdleFormatter.SetDebugName( "editeng::ImpEditEngine aIdleFormatter" );
 
diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx
index 834d400..3429248 100644
--- a/extensions/source/bibliography/bibcont.cxx
+++ b/extensions/source/bibliography/bibcont.cxx
@@ -121,7 +121,7 @@ BibBookContainer::BibBookContainer(vcl::Window* pParent):
 {
     pBibMod = OpenBibModul();
     aIdle.SetIdleHdl(LINK( this, BibBookContainer, SplitHdl));
-    aIdle.SetPriority(SchedulerPriority::LOWEST);
+    aIdle.SetPriority(TaskPriority::LOWEST);
 }
 
 BibBookContainer::~BibBookContainer()
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index 9f5541d..b62a03c 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -202,7 +202,7 @@ BibToolBar::BibToolBar(vcl::Window* pParent, Link<void*,void> aLink)
     Application::AddEventListener( LINK( this, BibToolBar, SettingsChanged_Impl ) );
 
     aIdle.SetIdleHdl(LINK( this, BibToolBar, SendSelHdl));
-    aIdle.SetPriority(SchedulerPriority::LOWEST);
+    aIdle.SetPriority(TaskPriority::LOWEST);
 
     SetDropdownClickHdl( LINK( this, BibToolBar, MenuHdl));
 
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 13268df..d8f3a03 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -206,7 +206,7 @@ UpdateCheckUI::UpdateCheckUI(const uno::Reference<uno::XComponentContext>& xCont
 
     maBubbleImage = GetBubbleImage( maBubbleImageURL );
 
-    maWaitIdle.SetPriority( SchedulerPriority::LOWEST );
+    maWaitIdle.SetPriority( TaskPriority::LOWEST );
     maWaitIdle.SetIdleHdl( LINK( this, UpdateCheckUI, WaitTimeOutHdl ) );
 
     maTimeoutTimer.SetTimeout( 10000 );
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 00e1e7a..8a7276c 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -1798,7 +1798,7 @@ namespace frm
 
         doSetDelegator();
 
-        m_aChangeIdle.SetPriority(SchedulerPriority::LOWEST);
+        m_aChangeIdle.SetPriority(TaskPriority::LOWEST);
         m_aChangeIdle.SetIdleHdl(LINK(this,OListBoxControl,OnTimeout));
     }
 
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index f745cbc..a0eacea 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -1801,7 +1801,7 @@ OUString FormulaDlg::GetMeText() const
 void FormulaDlg::Update()
 {
     m_pImpl->Update();
-    m_pImpl->aIdle.SetPriority(SchedulerPriority::LOWER);
+    m_pImpl->aIdle.SetPriority(TaskPriority::LOWER);
     m_pImpl->aIdle.SetIdleHdl(LINK( this, FormulaDlg, UpdateFocusHdl));
     m_pImpl->aIdle.Start();
 }
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index 2389864..6472fde 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -409,7 +409,7 @@ RefEdit::RefEdit( vcl::Window* _pParent, vcl::Window* pShrinkModeLabel, WinBits
     , pLabelWidget(pShrinkModeLabel)
 {
     aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) );
-    aIdle.SetPriority( SchedulerPriority::LOW );
+    aIdle.SetPriority( TaskPriority::LOW );
 }
 
 VCL_BUILDER_DECL_FACTORY(RefEdit)
@@ -478,7 +478,7 @@ void RefEdit::SetReferences( IControlReferenceHandler* pDlg, vcl::Window* pLabel
     if( pDlg )
     {
         aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) );
-        aIdle.SetPriority( SchedulerPriority::LOW );
+        aIdle.SetPriority( TaskPriority::LOW );
     }
     else
     {
diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index d3fdfbb..9f491e1 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -23,7 +23,7 @@
 #include <tools/link.hxx>
 #include <vcl/scheduler.hxx>
 
-class VCL_DLLPUBLIC Idle : public Scheduler
+class VCL_DLLPUBLIC Idle : public Task
 {
     Link<Idle *, void> maIdleHdl;          // Callback Link
 
diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index 16aba06..1e4b9d6 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -22,9 +22,43 @@
 
 #include <vcl/dllapi.h>
 
+class Task;
+
+class VCL_DLLPUBLIC Scheduler
+{
+    friend class Task;
+    Scheduler() = delete;
+
+protected:
+    static void ImplStartTimer ( sal_uInt64 nMS, bool bForce = false );
+
+public:
+    static const SAL_CONSTEXPR sal_uInt64 ImmediateTimeoutMs = 1;
+    static const SAL_CONSTEXPR sal_uInt64 InfiniteTimeoutMs = 1000 * 60 * 60 * 24; // 1 day
+
+    static void       ImplDeInitScheduler();
+
+    /// Process one pending Timer with highhest priority
+    static void       CallbackTaskScheduling( bool ignore );
+    /// Calculate minimum timeout - and return its value.
+    static sal_uInt64 CalculateMinimumTimeout( bool &bHasActiveIdles );
+    /// Process one pending task ahead of time with highest priority.
+    static bool       ProcessTaskScheduling( bool bIdle );
+    /// Process all events until we are idle
+    static void       ProcessEventsToIdle();
+
+    /// Control the deterministic mode.  In this mode, two subsequent runs of
+    /// LibreOffice fire about the same amount idles.
+    static void       SetDeterministicMode(bool bDeterministic);
+    /// Return the current state of deterministic mode.
+    static bool       GetDeterministicMode();
+};
+
+
 struct ImplSchedulerData;
 
-enum class SchedulerPriority {
+enum class TaskPriority
+{
     HIGHEST      = 0,
     HIGH         = 1,
     RESIZE       = 2,
@@ -37,21 +71,19 @@ enum class SchedulerPriority {
     LOWEST       = 8
 };
 
-class VCL_DLLPUBLIC Scheduler
+class VCL_DLLPUBLIC Task
 {
-protected:
-    ImplSchedulerData*  mpSchedulerData;    /// Pointer to element in scheduler list
-    const sal_Char     *mpDebugName;        /// Useful for debugging
-    SchedulerPriority   mePriority;         /// Scheduler priority
-    bool                mbActive;           /// Currently in the scheduler
+    friend class Scheduler;
+    friend struct ImplSchedulerData;
 
-    // These should be constexpr static, when supported.
-    static const sal_uInt64 ImmediateTimeoutMs = 1;
-    static const sal_uInt64 InfiniteTimeoutMs = 1000 * 60 * 60 * 24; // 1 day
+protected:
+    ImplSchedulerData *mpSchedulerData; /// Pointer to the element in scheduler list
+    const sal_Char    *mpDebugName;     /// Useful for debugging
+    TaskPriority       mePriority;      /// Task priority
+    bool               mbActive;        /// Currently in the scheduler
 
-    static void ImplStartTimer(sal_uInt64 nMS, bool bForce = false);
+    void StartTimer( sal_uInt64 nMS );
 
-    friend struct ImplSchedulerData;
     virtual void SetDeletionFlags();
     /// Is this item ready to be dispatched at nTimeNow
     virtual bool ReadyForSchedule( bool bIdle, sal_uInt64 nTimeNow ) const = 0;
@@ -64,12 +96,12 @@ protected:
     virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow ) const = 0;
 
 public:
-    Scheduler( const sal_Char *pDebugName );
-    Scheduler( const Scheduler& rScheduler );
-    virtual ~Scheduler();
+    Task( const sal_Char *pDebugName );
+    Task( const Task& rTask );
+    virtual ~Task();
 
-    void SetPriority(SchedulerPriority ePriority) { mePriority = ePriority; }
-    SchedulerPriority GetPriority() const { return mePriority; }
+    void            SetPriority(TaskPriority ePriority) { mePriority = ePriority; }
+    TaskPriority    GetPriority() const { return mePriority; }
 
     void            SetDebugName( const sal_Char *pDebugName ) { mpDebugName = pDebugName; }
     const char     *GetDebugName() { return mpDebugName; }
@@ -82,23 +114,7 @@ public:
 
     bool            IsActive() const { return mbActive; }
 
-    Scheduler&      operator=( const Scheduler& rScheduler );
-    static void ImplDeInitScheduler();
-
-    /// Process one pending Timer with highhest priority
-    static void CallbackTaskScheduling( bool ignore );
-    /// Calculate minimum timeout - and return its value.
-    static sal_uInt64 CalculateMinimumTimeout( bool &bHasActiveIdles );
-    /// Process one pending task ahead of time with highest priority.
-    static bool       ProcessTaskScheduling( bool bIdle );
-    /// Process all events until we are idle
-    static void       ProcessEventsToIdle();
-
-    /// Control the deterministic mode.  In this mode, two subsequent runs of
-    /// LibreOffice fire about the same amount idles.
-    static void SetDeterministicMode(bool bDeterministic);
-    /// Return the current state of deterministic mode.
-    static bool GetDeterministicMode();
+    Task&      operator=( const Task& rTask );
 };
 
 #endif // INCLUDED_VCL_SCHEDULER_HXX
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index ff79acd..19a882f 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -23,7 +23,7 @@
 #include <tools/link.hxx>
 #include <vcl/scheduler.hxx>
 
-class VCL_DLLPUBLIC Timer : public Scheduler
+class VCL_DLLPUBLIC Timer : public Task
 {
 protected:
     Link<Timer *, void> maTimeoutHdl;          // Callback Link
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 9a752ae..2f43476 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -447,7 +447,7 @@ LngSvcMgr::LngSvcMgr()
 
     UpdateAll();
 
-    aUpdateIdle.SetPriority(SchedulerPriority::LOWEST);
+    aUpdateIdle.SetPriority(TaskPriority::LOWEST);
     aUpdateIdle.SetIdleHdl(LINK(this, LngSvcMgr, updateAndBroadcast));
 
     // request to be notified if an extension has been added/removed
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 5332dbc..bddccde 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -116,7 +116,7 @@ ODesignView::ODesignView(   vcl::Window* pParent,
     m_aSplitWin->SetAlign(WindowAlign::Left);
     m_aSplitWin->Show();
 
-    m_aMarkIdle.SetPriority( SchedulerPriority::LOW );
+    m_aMarkIdle.SetPriority( TaskPriority::LOW );
     m_aMarkIdle.SetIdleHdl( LINK( this, ODesignView, MarkTimeout ) );
 }
 
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index c199c11..b5d60ab 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -249,7 +249,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
     SetLanguage( ScGlobal::eLnge, ScGlobal::eLnge, ScGlobal::eLnge );
 
     aTrackIdle.SetIdleHdl( LINK( this, ScDocument, TrackTimeHdl ) );
-    aTrackIdle.SetPriority( SchedulerPriority::LOW );
+    aTrackIdle.SetPriority( TaskPriority::LOW );
 }
 
 sfx2::LinkManager* ScDocument::GetLinkManager()
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index fd27fbd..c159f39 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -405,7 +405,7 @@ ScChartHiddenRangeListener::~ScChartHiddenRangeListener()
 void ScChartListenerCollection::Init()
 {
     aIdle.SetIdleHdl( LINK( this, ScChartListenerCollection, TimerHdl ) );
-    aIdle.SetPriority( SchedulerPriority::REPAINT );
+    aIdle.SetPriority( TaskPriority::REPAINT );
     aIdle.SetDebugName( "sc::ScChartListenerCollection aIdle" );
 }
 
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index c81adcc..1bf3cba 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -179,7 +179,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
                                         ERRCODE_AREA_APP2-1,
                                         GetResMgr() );
 
-    aSpellIdle.SetPriority(SchedulerPriority::LOWER);
+    aSpellIdle.SetPriority(TaskPriority::LOWER);
     aSpellIdle.SetIdleHdl( LINK( this, ScModule, SpellTimerHdl ) );
     aSpellIdle.SetDebugName( "sc::ScModule aSpellIdle" );
 
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index e49bf82..5148a7c 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -88,7 +88,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vc
     // Hack: RefInput-Kontrolle
     pIdle = new Idle;
     // FIXME: this is an abomination
-    pIdle->SetPriority( SchedulerPriority::LOWEST );
+    pIdle->SetPriority( TaskPriority::LOWEST );
     pIdle->SetIdleHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
     pIdle->Start();
 }
diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx
index 3888dbc..355d5b7 100644
--- a/sc/source/ui/docshell/autostyl.cxx
+++ b/sc/source/ui/docshell/autostyl.cxx
@@ -65,7 +65,7 @@ ScAutoStyleList::ScAutoStyleList(ScDocShell* pShell)
 {
     aTimer.SetTimeoutHdl( LINK( this, ScAutoStyleList, TimerHdl ) );
     aInitIdle.SetIdleHdl( LINK( this, ScAutoStyleList, InitHdl ) );
-    aInitIdle.SetPriority( SchedulerPriority::HIGHEST );
+    aInitIdle.SetPriority( TaskPriority::HIGHEST );
 }
 
 ScAutoStyleList::~ScAutoStyleList()
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index e92e3ee..6bfa541 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -108,13 +108,13 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window
     m_pAcceptChgCtr = VclPtr<SvxAcceptChgCtr>::Create(get_content_area(), this);
     nAcceptCount=0;
     nRejectCount=0;
-    aReOpenIdle.SetPriority(SchedulerPriority::MEDIUM);
+    aReOpenIdle.SetPriority(TaskPriority::MEDIUM);
     aReOpenIdle.SetIdleHdl(LINK( this, ScAcceptChgDlg, ReOpenTimerHdl ));
 
     pTPFilter=m_pAcceptChgCtr->GetFilterPage();
     pTPView=m_pAcceptChgCtr->GetViewPage();
     pTheView=pTPView->GetTableControl();
-    aSelectionIdle.SetPriority(SchedulerPriority::LOW);
+    aSelectionIdle.SetPriority(TaskPriority::LOW);
     aSelectionIdle.SetIdleHdl(LINK( this, ScAcceptChgDlg, UpdateSelectionHdl ));
     aSelectionIdle.SetDebugName( "ScAcceptChgDlg  aSelectionIdle" );
 
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 1498a1f..5998d39 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -764,7 +764,7 @@ ScRefHandler::ScRefHandler( vcl::Window &rWindow, SfxBindings* pB, bool bBindRef
         pActiveWin(nullptr)
 {
     m_aHelper.SetWindow(m_rWindow.get());
-    aIdle.SetPriority(SchedulerPriority::LOWER);
+    aIdle.SetPriority(TaskPriority::LOWER);
     aIdle.SetIdleHdl(LINK( this, ScRefHandler, UpdateFocusHdl));
 
     if( bBindRef ) EnterRefMode();
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 578efed..6b50687 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -421,7 +421,7 @@ ScConflictsDlg::ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScD
     m_pLbConflicts->SetSelectionMode( SelectionMode::Multiple );
     m_pLbConflicts->SetHighlightRange();
 
-    maSelectionIdle.SetPriority( SchedulerPriority::LOW );
+    maSelectionIdle.SetPriority( TaskPriority::LOW );
     maSelectionIdle.SetIdleHdl( LINK( this, ScConflictsDlg, UpdateSelectionHdl ) );
     maSelectionIdle.SetDebugName( "ScConflictsDlg maSelectionIdle" );
 
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index e8e5745..0d17bbb 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -528,7 +528,7 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, bool bSidebar, vcl::Window* pPar
     aScenarioBox->Hide();
 
     aContentIdle.SetIdleHdl( LINK( this, ScNavigatorDlg, TimeHdl ) );
-    aContentIdle.SetPriority( SchedulerPriority::LOWEST );
+    aContentIdle.SetPriority( TaskPriority::LOWEST );
 
     if (bInSidebar)
     {
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 2fd8ff0..9602323 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -341,7 +341,7 @@ ScExtIButton::ScExtIButton(vcl::Window* pParent, WinBits nBits )
     pPopupMenu(nullptr)
 {
     nSelected=0;
-    aIdle.SetPriority(SchedulerPriority::LOWEST);
+    aIdle.SetPriority(TaskPriority::LOWEST);
     SetDropDown(PushButtonDropdownStyle::Toolbox);
 }
 
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 9787754..0f5fe0e 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -771,7 +771,7 @@ void SdDrawDocument::StartOnlineSpelling(bool bForceSpelling)
         mpOnlineSpellingList->seekShape(0);
         mpOnlineSpellingIdle = new Idle("OnlineSpelling");
         mpOnlineSpellingIdle->SetIdleHdl( LINK(this, SdDrawDocument, OnlineSpellingHdl) );
-        mpOnlineSpellingIdle->SetPriority(SchedulerPriority::LOWEST);
+        mpOnlineSpellingIdle->SetPriority(TaskPriority::LOWEST);
         mpOnlineSpellingIdle->Start();
     }
 }
diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx
index 0626fde..cdb2448 100644
--- a/sd/source/ui/dlg/brkdlg.cxx
+++ b/sd/source/ui/dlg/brkdlg.cxx
@@ -47,7 +47,7 @@ BreakDlg::BreakDlg(
     : SfxModalDialog(pWindow, "BreakDialog", "modules/sdraw/ui/breakdialog.ui")
     , mpProgress( nullptr )
 {
-    m_aUpdateIdle.SetPriority( SchedulerPriority::REPAINT );
+    m_aUpdateIdle.SetPriority( TaskPriority::REPAINT );
     m_aUpdateIdle.SetIdleHdl( LINK( this, BreakDlg, InitialUpdate ) );
     m_aUpdateIdle.SetDebugName( "sd::BreakDlg m_aUpdateIdle" );
 
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index b06c780..bcf3913 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -129,7 +129,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, PlayMusicHdl, void*, void)
             {
                 mxPlayer.set( avmedia::MediaWindow::createPlayer( aUrl, "" ), css::uno::UNO_QUERY_THROW );
                 mxPlayer->start();
-                maUpdateIdle.SetPriority( SchedulerPriority::LOW );
+                maUpdateIdle.SetPriority( TaskPriority::LOW );
                 maUpdateIdle.Start();
             }
             catch (const css::uno::Exception&)
diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx b/sd/source/ui/framework/module/ShellStackGuard.cxx
index cf4fe2d..7022b91 100644
--- a/sd/source/ui/framework/module/ShellStackGuard.cxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.cxx
@@ -72,7 +72,7 @@ ShellStackGuard::ShellStackGuard (Reference<frame::XController>& rxController)
 
         // Prepare the printer polling.
         maPrinterPollingIdle.SetIdleHdl(LINK(this,ShellStackGuard,TimeoutHandler));
-        maPrinterPollingIdle.SetPriority(SchedulerPriority::LOWER);
+        maPrinterPollingIdle.SetPriority(TaskPriority::LOWER);
     }
 }
 
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 350ca3e..e24f0a9 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -512,7 +512,7 @@ SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation,
 
     maUpdateTimer.SetTimeoutHdl(LINK(this, SlideshowImpl, updateHdl));
     // Priority must not be too high or we'll starve input handling etc.
-    maUpdateTimer.SetPriority(SchedulerPriority::REPAINT);
+    maUpdateTimer.SetPriority(TaskPriority::REPAINT);
 
     maDeactivateTimer.SetTimeoutHdl(LINK(this, SlideshowImpl, deactivateHdl));
     maDeactivateTimer.SetTimeout( 20 );
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
index f0fd688..d1791ad 100644
--- a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
@@ -67,7 +67,7 @@ Animator::Animator (SlideSorter& rSlideSorter)
       mpDrawLock(),
       mnNextAnimationId(0)
 {
-    maIdle.SetPriority(SchedulerPriority::REPAINT);
+    maIdle.SetPriority(TaskPriority::REPAINT);
     maIdle.SetIdleHdl(LINK(this,Animator,TimeoutHandler));
 }
 
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 3ecc8c5..66b0ef5 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -143,9 +143,9 @@ View::View(SdDrawDocument& rDrawDoc, OutputDevice* pOutDev,
 
     // Timer for delayed drop (has to be for MAC)
     maDropErrorIdle.SetIdleHdl( LINK(this, View, DropErrorHdl) );
-    maDropErrorIdle.SetPriority(SchedulerPriority::MEDIUM);
+    maDropErrorIdle.SetPriority(TaskPriority::MEDIUM);
     maDropInsertFileIdle.SetIdleHdl( LINK(this, View, DropInsertFileHdl) );
-    maDropInsertFileIdle.SetPriority(SchedulerPriority::MEDIUM);
+    maDropInsertFileIdle.SetPriority(TaskPriority::MEDIUM);
 }
 
 void View::ImplClearDrawDropMarker()
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index f0a8726..4e9a40e 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -109,7 +109,7 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint )
         StartListening( *rHint.GetObjShell() );
     pIdle.reset( new Idle("SfxEventASyncer") );
     pIdle->SetIdleHdl( LINK(this, SfxEventAsyncer_Impl, IdleHdl) );
-    pIdle->SetPriority( SchedulerPriority::HIGHEST );
+    pIdle->SetPriority( TaskPriority::HIGHEST );
     pIdle->SetDebugName( "sfx::SfxEventAsyncer_Impl pIdle" );
     pIdle->Start();
 }
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index e29f139..46eb4ab 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -552,7 +552,7 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Im
     m_pOpenBtn->SetClickHdl( LINK( this, IndexTabPage_Impl, OpenHdl ) );
     Link<Timer *, void> aTimeoutLink = LINK( this, IndexTabPage_Impl, TimeoutHdl );
     aFactoryIdle.SetIdleHdl( LINK(this, IndexTabPage_Impl, IdleHdl ));
-    aFactoryIdle.SetPriority(SchedulerPriority::LOWER);
+    aFactoryIdle.SetPriority(TaskPriority::LOWER);
     aKeywordTimer.SetTimeoutHdl( aTimeoutLink );
 }
 
@@ -1432,7 +1432,7 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent)
     nMinWidth = ( m_pActiveLB->GetSizePixel().Width() / 2 );
 
     aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) );
-    aIdle.SetPriority( SchedulerPriority::LOWER );
+    aIdle.SetPriority( TaskPriority::LOWER );
     aIdle.Start();
 
     Show();
@@ -1562,7 +1562,7 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, InitHdl, Idle *, void)
 
     // now use the timer for selection
     aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectFactoryHdl ) );
-    aIdle.SetPriority( SchedulerPriority::LOWEST );
+    aIdle.SetPriority( TaskPriority::LOWEST );
 }
 
 IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, SelectFactoryHdl, Idle *, void)
@@ -1902,7 +1902,7 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
     aOnStartupCB->SetClickHdl( LINK( this, SfxHelpTextWindow_Impl, CheckHdl ) );
 
     aSelectIdle.SetIdleHdl( LINK( this, SfxHelpTextWindow_Impl, SelectHdl ) );
-    aSelectIdle.SetPriority( SchedulerPriority::LOWEST );
+    aSelectIdle.SetPriority( TaskPriority::LOWEST );
 
     char* pEnv = getenv( "help_debug" );
     if ( pEnv )
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 49e7e54..fefdf6a 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -450,7 +450,7 @@ void SfxDispatcher::Construct_Impl()
 
     xImp->xPoster = new SfxHintPoster(aGenLink);
 
-    xImp->aIdle.SetPriority(SchedulerPriority::MEDIUM);
+    xImp->aIdle.SetPriority(TaskPriority::MEDIUM);
     xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
     xImp->aIdle.SetDebugName( "sfx::SfxDispatcher_Impl aIdle" );
 }
@@ -574,7 +574,7 @@ void SfxDispatcher::Pop(SfxShell& rShell, SfxDispatcherPopFlags nMode)
     if(!pSfxApp->IsDowning() && !xImp->aToDoStack.empty())
     {
         // No immediate update is requested
-        xImp->aIdle.SetPriority(SchedulerPriority::MEDIUM);
+        xImp->aIdle.SetPriority(TaskPriority::MEDIUM);
         xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
         xImp->aIdle.Start();
     }
@@ -770,7 +770,7 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI)
     if(!xImp->aToDoStack.empty())
     {
         // No immediate update is requested
-        xImp->aIdle.SetPriority(SchedulerPriority::MEDIUM);
+        xImp->aIdle.SetPriority(TaskPriority::MEDIUM);
         xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
         xImp->aIdle.Start();
     }
diff --git a/sfx2/source/control/itemdel.cxx b/sfx2/source/control/itemdel.cxx
index c835b8c..706f0cc 100644
--- a/sfx2/source/control/itemdel.cxx
+++ b/sfx2/source/control/itemdel.cxx
@@ -45,7 +45,7 @@ SfxItemDisruptor_Impl::SfxItemDisruptor_Impl(SfxPoolItem *const pItemToDisrupt)
     , m_Idle("sfx SfxItemDisruptor_Impl::Delete")
 {
     m_Idle.SetIdleHdl(LINK(this, SfxItemDisruptor_Impl, Delete));
-    m_Idle.SetPriority(SchedulerPriority::DEFAULT_IDLE);
+    m_Idle.SetPriority(TaskPriority::DEFAULT_IDLE);
 
     DBG_ASSERT( 0 == pItem->GetRefCount(), "disrupting pooled item" );
     pItem->SetKind(SfxItemKind::DeleteOnIdle);
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index b319f29..a097085 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -301,7 +301,7 @@ void SfxModelessDialog::Init(SfxBindings *pBindinx, SfxChildWindow *pCW)
     pImpl->bConstructed = false;
     if ( pBindinx )
         pImpl->StartListening( *pBindinx );
-    pImpl->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
+    pImpl->aMoveIdle.SetPriority(TaskPriority::RESIZE);
     pImpl->aMoveIdle.SetIdleHdl(LINK(this,SfxModelessDialog,TimerHdl));
 }
 
@@ -439,7 +439,7 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
     pImpl->bConstructed = false;
     if ( pBindinx )
         pImpl->StartListening( *pBindinx );
-    pImpl->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
+    pImpl->aMoveIdle.SetPriority(TaskPriority::RESIZE);
     pImpl->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl));
 }
 
@@ -456,7 +456,7 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
 
     if ( pBindinx )
         pImpl->StartListening( *pBindinx );
-    pImpl->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
+    pImpl->aMoveIdle.SetPriority(TaskPriority::RESIZE);
     pImpl->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl));
 }
 
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 410d5e6..cddee1e 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1506,9 +1506,9 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
     m_aDateField->SetPosSizePixel(aPos, aSize);
     m_aTimeField->SetPosSizePixel(aPos, aSize);
 
-    m_aEditLoseFocusIdle.SetPriority( SchedulerPriority::LOWEST );
+    m_aEditLoseFocusIdle.SetPriority( TaskPriority::LOWEST );
     m_aEditLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) );
-    m_aBoxLoseFocusIdle.SetPriority( SchedulerPriority::LOWEST );
+    m_aBoxLoseFocusIdle.SetPriority( TaskPriority::LOWEST );
     m_aBoxLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) );
 
     m_aNameBox->add_mnemonic_label(m_pHeaderAccName);
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 6178bd0..6bc24a7 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -433,7 +433,7 @@ SfxDockingWindow_Impl::SfxDockingWindow_Impl(SfxDockingWindow* pBase)
     ,bNewLine(false)
     ,bDockingPrevented(false)
 {
-    aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
+    aMoveIdle.SetPriority(TaskPriority::RESIZE);
     aMoveIdle.SetIdleHdl(LINK(pBase,SfxDockingWindow,TimerHdl));
     aMoveIdle.SetDebugName( "sfx::SfxDockingWindow_Impl aMoveIdle" );
 }
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 4e81508..3f17a8a 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -986,7 +986,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
                 mbHasPreview = true;
 
                 // aPreviewTimer
-                maPreviewIdle.SetPriority( SchedulerPriority::LOWEST );
+                maPreviewIdle.SetPriority( TaskPriority::LOWEST );
                 maPreviewIdle.SetIdleHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) );
                 break;
 
@@ -1007,7 +1007,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
                 nTemplateDescription = TemplateDescription::FILEOPEN_LINK_PREVIEW;
                 mbHasPreview = true;
                 // aPreviewTimer
-                maPreviewIdle.SetPriority( SchedulerPriority::LOWEST );
+                maPreviewIdle.SetPriority( TaskPriority::LOWEST );
                 maPreviewIdle.SetIdleHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) );
                 break;
 
@@ -1021,7 +1021,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
                 nTemplateDescription = TemplateDescription::FILEOPEN_PREVIEW;
                 mbHasPreview = true;
                 // aPreviewTimer
-                maPreviewIdle.SetPriority( SchedulerPriority::LOWEST );
+                maPreviewIdle.SetPriority( TaskPriority::LOWEST );
                 maPreviewIdle.SetIdleHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) );
                 break;
 
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index a8f6af1..8e56aee 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1485,7 +1485,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
         if(!pIdle)
         {
             pIdle=new Idle("SfxCommonTemplate");
-            pIdle->SetPriority(SchedulerPriority::LOWEST);
+            pIdle->SetPriority(TaskPriority::LOWEST);
             pIdle->SetIdleHdl(LINK(this,SfxCommonTemplateDialog_Impl,TimeOut));
         }
         pIdle->Start();
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 5d55b9c..9b78b0c 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -408,7 +408,7 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
         m_pRegionLb->SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, RegionSelect));
     }
 
-    aPrevIdle.SetPriority( SchedulerPriority::LOWEST );
+    aPrevIdle.SetPriority( TaskPriority::LOWEST );
     aPrevIdle.SetIdleHdl( LINK( this, SfxNewFileDialog_Impl, Update));
 
     m_pRegionLb->SelectEntryPos(0);
diff --git a/solenv/gdb/libreoffice/vcl.py b/solenv/gdb/libreoffice/vcl.py
index 83f4057..28ba3eb 100644
--- a/solenv/gdb/libreoffice/vcl.py
+++ b/solenv/gdb/libreoffice/vcl.py
@@ -25,24 +25,24 @@ class ImplSchedulerDataPrinter(object):
         self.idle_type_ptr = gdb.lookup_type("Idle").pointer()
 
     def as_string(self, gdbobj):
-        if gdbobj['mpScheduler']:
-            sched = gdbobj['mpScheduler'].dereference()
-            if gdbobj['mpScheduler'].dynamic_cast( self.timer_type_ptr ):
+        if gdbobj['mpTask']:
+            sched = gdbobj['mpTask'].dereference()
+            if gdbobj['mpTask'].dynamic_cast( self.timer_type_ptr ):
                 sched_type = "Timer"
-            elif gdbobj['mpScheduler'].dynamic_cast( self.idle_type_ptr ):
+            elif gdbobj['mpTask'].dynamic_cast( self.idle_type_ptr ):
                 sched_type = "Idle"
             else:
-                assert sched_type, "Scheduler object neither Timer nor Idle"
+                assert sched_type, "Task object neither Timer nor Idle"
             res = "{:7s}{:10s} active: {:6s}".format( sched_type, str(sched['mePriority']), str(sched['mbActive']) )
             name = sched['mpDebugName']
             if not name:
-                res = res + "   (scheduler debug name not set)"
+                res = res + "   (task debug name not set)"
             else:
                 res = "{} '{}' ({})".format(res, str(name.string()), str(sched.dynamic_type))
             return res
         else:
-            assert gdbobj['mbDelete'], "No scheduler set and not marked for deletion!"
-            return "(no scheduler)"
+            assert gdbobj['mbDelete'], "No task set and not marked for deletion!"
+            return "(no task)"
 
     def to_string(self):
         return self.typename
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 43fc755..af3e3e9 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -101,12 +101,12 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) :
     SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
 
     aModifyIdle.SetIdleHdl(LINK(this, SmEditWindow, ModifyTimerHdl));
-    aModifyIdle.SetPriority(SchedulerPriority::LOWEST);
+    aModifyIdle.SetPriority(TaskPriority::LOWEST);
 
     if (!IsInlineEditEnabled())
     {
         aCursorMoveIdle.SetIdleHdl(LINK(this, SmEditWindow, CursorMoveTimerHdl));
-        aCursorMoveIdle.SetPriority(SchedulerPriority::LOWEST);
+        aCursorMoveIdle.SetPriority(TaskPriority::LOWEST);
     }
 
     // if not called explicitly the this edit window within the
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 2532c82..58cc3a6 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -139,23 +139,23 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
     nHorSBarHeight = aHorSBar->GetSizePixel().Height();
     nVerSBarWidth = aVerSBar->GetSizePixel().Width();
 
-    aEditIdle.SetPriority( SchedulerPriority::LOWEST );
+    aEditIdle.SetPriority( TaskPriority::LOWEST );
     aEditIdle.SetIdleHdl(LINK(this,SvxIconChoiceCtrl_Impl,EditTimeoutHdl));
     aEditIdle.SetDebugName( "svtools::SvxIconChoiceCtrl_Impl aEditIdle" );
 
-    aAutoArrangeIdle.SetPriority( SchedulerPriority::LOW );
+    aAutoArrangeIdle.SetPriority( TaskPriority::LOW );
     aAutoArrangeIdle.SetIdleHdl(LINK(this,SvxIconChoiceCtrl_Impl,AutoArrangeHdl));
     aAutoArrangeIdle.SetDebugName( "svtools::SvxIconChoiceCtrl_Impl aAutoArrangeIdle" );
 
-    aCallSelectHdlIdle.SetPriority( SchedulerPriority::LOWEST );
+    aCallSelectHdlIdle.SetPriority( TaskPriority::LOWEST );
     aCallSelectHdlIdle.SetIdleHdl( LINK(this,SvxIconChoiceCtrl_Impl,CallSelectHdlHdl));
     aCallSelectHdlIdle.SetDebugName( "svtools::SvxIconChoiceCtrl_Impl aCallSelectHdlIdle" );
 
-    aDocRectChangedIdle.SetPriority( SchedulerPriority::MEDIUM );
+    aDocRectChangedIdle.SetPriority( TaskPriority::MEDIUM );
     aDocRectChangedIdle.SetIdleHdl(LINK(this,SvxIconChoiceCtrl_Impl,DocRectChangedHdl));
     aDocRectChangedIdle.SetDebugName( "svtools::SvxIconChoiceCtrl_Impl aDocRectChangedIdle" );
 
-    aVisRectChangedIdle.SetPriority( SchedulerPriority::MEDIUM );
+    aVisRectChangedIdle.SetPriority( TaskPriority::MEDIUM );
     aVisRectChangedIdle.SetIdleHdl(LINK(this,SvxIconChoiceCtrl_Impl,VisRectChangedHdl));
     aVisRectChangedIdle.SetDebugName( "svtools::SvxIconChoiceCtrl_Impl aVisRectChangedIdle" );
 
@@ -3032,7 +3032,7 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo
     bAlreadyInCallback( false ),
     bGrabFocus( false )
 {
-    maLoseFocusIdle.SetPriority(SchedulerPriority::REPAINT);
+    maLoseFocusIdle.SetPriority(TaskPriority::REPAINT);
     maLoseFocusIdle.SetIdleHdl(LINK(this,IcnViewEdit_Impl,Timeout_Impl));
     maLoseFocusIdle.SetDebugName( "svx::IcnViewEdit_Impl maLoseFocusIdle" );
 
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index d3cbdee..b0e693c 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -89,7 +89,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
     nNodeBmpWidth       = 0;
 
     bAsyncBeginDrag     = false;
-    aAsyncBeginDragIdle.SetPriority( SchedulerPriority::HIGHEST );
+    aAsyncBeginDragIdle.SetPriority( TaskPriority::HIGHEST );
     aAsyncBeginDragIdle.SetIdleHdl( LINK(this,SvImpLBox,BeginDragHdl));
     // button animation in listbox
     pActiveButton = nullptr;
@@ -99,7 +99,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
     nFlags = LBoxFlags::NONE;
     nCurTabPos = FIRST_ENTRY_TAB;
 
-    aEditIdle.SetPriority( SchedulerPriority::LOWEST );
+    aEditIdle.SetPriority( TaskPriority::LOWEST );
     aEditIdle.SetIdleHdl( LINK(this,SvImpLBox,EditTimerCall) );
 
     nMostRight = -1;
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index b9cdf53..649a7fb 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -199,7 +199,7 @@ void SvInplaceEdit2::LoseFocus()
     )
     {
         bCanceled = false;
-        aIdle.SetPriority(SchedulerPriority::REPAINT);
+        aIdle.SetPriority(TaskPriority::REPAINT);
         aIdle.SetIdleHdl(LINK(this,SvInplaceEdit2,Timeout_Impl));
         aIdle.SetDebugName( "svtools::SvInplaceEdit2 aIdle" );
         aIdle.Start();
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 10e02ba..c88fdf0 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -399,7 +399,7 @@ TabBarEdit::TabBarEdit( TabBar* pParent, WinBits nWinStyle ) :
     Edit( pParent, nWinStyle )
 {
     mbPostEvt = false;
-    maLoseFocusIdle.SetPriority( SchedulerPriority::REPAINT );
+    maLoseFocusIdle.SetPriority( TaskPriority::REPAINT );
     maLoseFocusIdle.SetIdleHdl( LINK( this, TabBarEdit, ImplEndTimerHdl ) );
     maLoseFocusIdle.SetDebugName( "svtools::TabBarEdit maLoseFocusIdle" );
 }
diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx
index 7ff932e..1f28358 100644
--- a/svtools/source/dialogs/wizdlg.cxx
+++ b/svtools/source/dialogs/wizdlg.cxx
@@ -57,7 +57,7 @@ void WizardDialog::ImplInitData()
     mbEmptyViewMargin =  false;
     mnLeftAlignCount = 0;
 
-    maWizardLayoutIdle.SetPriority(SchedulerPriority::RESIZE);
+    maWizardLayoutIdle.SetPriority(TaskPriority::RESIZE);
     maWizardLayoutIdle.SetIdleHdl( LINK( this, WizardDialog, ImplHandleWizardLayoutTimerHdl ) );
 }
 
diff --git a/svtools/source/misc/filechangedchecker.cxx b/svtools/source/misc/filechangedchecker.cxx
index e0ebfd6..f696b86 100644
--- a/svtools/source/misc/filechangedchecker.cxx
+++ b/svtools/source/misc/filechangedchecker.cxx
@@ -35,7 +35,7 @@ void FileChangedChecker::resetTimer()
         mIdle.Start();
 
     // Set lowest Priority
-    mIdle.SetPriority(SchedulerPriority::LOWEST);
+    mIdle.SetPriority(TaskPriority::LOWEST);
 }
 
 bool FileChangedChecker::getCurrentModTime(TimeValue& o_rValue) const
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index fe877794..7046976 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -286,10 +286,10 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow *
 
     Resize();
 
-    aUpdateIdle.SetPriority( SchedulerPriority::LOW );
+    aUpdateIdle.SetPriority( TaskPriority::LOW );
     aUpdateIdle.SetIdleHdl( LINK( this, SvxSuperContourDlg, UpdateHdl ) );
 
-    aCreateIdle.SetPriority( SchedulerPriority::RESIZE );
+    aCreateIdle.SetPriority( TaskPriority::RESIZE );
     aCreateIdle.SetIdleHdl( LINK( this, SvxSuperContourDlg, CreateHdl ) );
 }
 
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index b86ce46..b668941 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -270,7 +270,7 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx,
 
     m_pShadowColorLB->SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
 
-    aInputIdle.SetPriority(SchedulerPriority::LOWEST);
+    aInputIdle.SetPriority(TaskPriority::LOWEST);
     aInputIdle.SetIdleHdl(LINK(this, SvxFontWorkDialog, InputTimoutHdl_Impl));
 }
 
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 0ae7f1c..afa5364 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -70,7 +70,7 @@ GraphCtrl::GraphCtrl( vcl::Window* pParent, WinBits nStyle ) :
             pView           ( nullptr )
 {
     pUserCall = new GraphCtrlUserCall( *this );
-    aUpdateIdle.SetPriority( SchedulerPriority::LOWEST );
+    aUpdateIdle.SetPriority( TaskPriority::LOWEST );
     aUpdateIdle.SetIdleHdl( LINK( this, GraphCtrl, UpdateHdl ) );
     aUpdateIdle.Start();
     EnableRTL( false );
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 569210d..b208472 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -204,7 +204,7 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window
     m_pCbbTarget->Disable();
     pOwnData->bExecState = false;
 
-    pOwnData->aIdle.SetPriority( SchedulerPriority::LOW );
+    pOwnData->aIdle.SetPriority( TaskPriority::LOW );
     pOwnData->aIdle.SetIdleHdl( LINK( this, SvxIMapDlg, UpdateHdl ) );
 
     m_pTbxIMapDlg1->EnableItem( mnActiveId, false );
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 3c696d7..5295025 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -466,7 +466,7 @@ void SvxBmpNumValueSet::init()
     GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS);
     SetStyle( GetStyle() | WB_VSCROLL );
     SetLineCount( 3 );
-    aFormatIdle.SetPriority(SchedulerPriority::LOWEST);
+    aFormatIdle.SetPriority(TaskPriority::LOWEST);
     aFormatIdle.SetIdleHdl(LINK(this, SvxBmpNumValueSet, FormatHdl_Impl));
 }
 
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index b7298ef..bde4955 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -2748,7 +2748,7 @@ namespace svxform
         m_pConditionED->SetModifyHdl( LINK( this, AddConditionDialog, ModifyHdl ) );
         m_pEditNamespacesBtn->SetClickHdl( LINK( this, AddConditionDialog, EditHdl ) );
         m_pOKBtn->SetClickHdl( LINK( this, AddConditionDialog, OKHdl ) );
-        m_aResultIdle.SetPriority( SchedulerPriority::LOWEST );
+        m_aResultIdle.SetPriority( TaskPriority::LOWEST );
         m_aResultIdle.SetIdleHdl( LINK( this, AddConditionDialog, ResultHdl ) );
 
         if ( !m_sPropertyName.isEmpty() )
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 0a94692..74ea289 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -572,7 +572,7 @@ FormController::FormController(const Reference< css::uno::XComponentContext > &
     }
     osl_atomic_decrement(&m_refCount);
 
-    m_aTabActivationIdle.SetPriority( SchedulerPriority::LOWEST );
+    m_aTabActivationIdle.SetPriority( TaskPriority::LOWEST );
     m_aTabActivationIdle.SetIdleHdl( LINK( this, FormController, OnActivateTabOrder ) );
 
     m_aFeatureInvalidationTimer.SetTimeout( 200 );
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index efeaad6..0e81e85 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -61,7 +61,7 @@ namespace sdr
             setPreviewRenderer(((SdrPaintView&)rPageWindow.GetPageView().GetView()).IsPreviewRenderer());
 
             // init timer
-            SetPriority(SchedulerPriority::HIGH);
+            SetPriority(TaskPriority::HIGH);
             Stop();
         }
 
diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
index 4827c3d..dfe57ea 100644
--- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
@@ -84,7 +84,7 @@ PagePrimitiveExtractor::PagePrimitiveExtractor(
     setPreviewRenderer(true);
 
     // init timer
-    SetPriority(SchedulerPriority::HIGH);
+    SetPriority(TaskPriority::HIGH);
     Stop();
 }
 
diff --git a/svx/source/sdr/event/eventhandler.cxx b/svx/source/sdr/event/eventhandler.cxx
index 4f3c6ba..ae55c9e 100644
--- a/svx/source/sdr/event/eventhandler.cxx
+++ b/svx/source/sdr/event/eventhandler.cxx
@@ -83,7 +83,7 @@ namespace sdr
 
         TimerEventHandler::TimerEventHandler()
         {
-            SetPriority(SchedulerPriority::HIGH);
+            SetPriority(TaskPriority::HIGH);
             Stop();
         }
 
diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 8ede68c..73a1051 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -383,7 +383,7 @@ namespace sdr
             mbRefreshWithPreRendering(bRefreshWithPreRendering)
         {
             // Init timer
-            maBufferIdle.SetPriority( SchedulerPriority::POST_PAINT );
+            maBufferIdle.SetPriority( TaskPriority::POST_PAINT );
             maBufferIdle.SetIdleHdl(LINK(this, OverlayManagerBuffered, ImpBufferTimerHandler));
             maBufferIdle.SetDebugName( "sdr::overlay::OverlayManagerBuffered maBufferIdle" );
         }
diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index 097274a..eaa66be 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -25,7 +25,7 @@ PanelLayout::PanelLayout(vcl::Window* pParent, const OString& rID, const OUStrin
 {
     SetStyle(GetStyle() | WB_DIALOGCONTROL);
     m_pUIBuilder.reset(new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID, rFrame));
-    m_aPanelLayoutIdle.SetPriority(SchedulerPriority::RESIZE);
+    m_aPanelLayoutIdle.SetPriority(TaskPriority::RESIZE);
     m_aPanelLayoutIdle.SetIdleHdl( LINK( this, PanelLayout, ImplHandlePanelLayoutTimerHdl ) );
     m_aPanelLayoutIdle.SetDebugName( "svx::PanelLayout  m_aPanelLayoutIdle" );
     if (GetSettings().GetStyleSettings().GetAutoMnemonic())
diff --git a/svx/source/sidebar/media/MediaPlaybackPanel.cxx b/svx/source/sidebar/media/MediaPlaybackPanel.cxx
index 46f7645..0b4773c 100644
--- a/svx/source/sidebar/media/MediaPlaybackPanel.cxx
+++ b/svx/source/sidebar/media/MediaPlaybackPanel.cxx
@@ -81,7 +81,7 @@ void MediaPlaybackPanel::Initialize()
     mpMuteToolBox->SetSelectHdl(LINK(this, MediaPlaybackPanel, PlayToolBoxSelectHdl));
     mpTimeSlider->SetSlideHdl(LINK(this, MediaPlaybackPanel, SeekHdl));
 
-    maIdle.SetPriority( SchedulerPriority::HIGHEST );
+    maIdle.SetPriority( TaskPriority::HIGHEST );
     maIdle.SetIdleHdl( LINK( this, MediaPlaybackPanel, TimeoutHdl ) );
     maIdle.Start();
     mpBindings->Invalidate(SID_AVMEDIA_TOOLBOX);
diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx
index 8b476f5..50abd3d 100644
--- a/svx/source/stbctrls/modctrl.cxx
+++ b/svx/source/stbctrls/modctrl.cxx
@@ -58,7 +58,7 @@ struct SvxModifyControl::ImplData
         maImages[MODIFICATION_STATE_YES]      = Image(SVX_RES(RID_SVXBMP_DOC_MODIFIED_YES));
         maImages[MODIFICATION_STATE_FEEDBACK] = Image(SVX_RES(RID_SVXBMP_DOC_MODIFIED_FEEDBACK));
 
-        maIdle.SetPriority(SchedulerPriority::LOWEST);
+        maIdle.SetPriority(TaskPriority::LOWEST);
     }
 };
 
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 44ab835..cb444c3 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -1101,7 +1101,7 @@ void SdrItemBrowser::SetDirty()
 {
     if (!bDirty) {
         bDirty = true;
-        aIdle.SetPriority(SchedulerPriority::HIGH);
+        aIdle.SetPriority(TaskPriority::HIGH);
         aIdle.Start();
     }
 }
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 33eef08..9e8a41a 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -173,7 +173,7 @@ void SdrPaintView::ImpClearVars()
     mpDefaultStyleSheet=nullptr;
     mbSomeObjChgdFlag=false;
     mnGraphicManagerDrawMode = GraphicManagerDrawFlags::STANDARD;
-    maComeBackIdle.SetPriority(SchedulerPriority::REPAINT);
+    maComeBackIdle.SetPriority(TaskPriority::REPAINT);
     maComeBackIdle.SetIdleHdl(LINK(this,SdrPaintView,ImpComeBackHdl));
     maComeBackIdle.SetDebugName( "svx::SdrPaintView aComeBackIdle" );
 
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 11b27ac..3c53cd7 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -121,7 +121,7 @@ ImplGrafMetricField::ImplGrafMetricField( vcl::Window* pParent, const OUString&
         SetSpinSize( 1 );
     }
 
-    maIdle.SetPriority( SchedulerPriority::LOW );
+    maIdle.SetPriority( TaskPriority::LOW );
     maIdle.SetIdleHdl( LINK( this, ImplGrafMetricField, ImplModifyHdl ) );
 }
 
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 5b428f6..f984499 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -3262,7 +3262,7 @@ class IdleTask
 IdleTask::IdleTask() : flag( false )
 {
     //setting the Priority of Idle task to LOW, LOWEST
-    maIdle.SetPriority( SchedulerPriority::LOWEST );
+    maIdle.SetPriority( TaskPriority::LOWEST );
     //set idle for callback
     maIdle.SetIdleHdl( LINK( this, IdleTask, FlipFlag) );
     //starting the idle
diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx b/sw/source/core/doc/DocumentStatisticsManager.cxx
index d4741d3..e599555 100644
--- a/sw/source/core/doc/DocumentStatisticsManager.cxx
+++ b/sw/source/core/doc/DocumentStatisticsManager.cxx
@@ -74,7 +74,7 @@ DocumentStatisticsManager::DocumentStatisticsManager( SwDoc& i_rSwdoc ) : m_rDoc
                                                                           mbInitialized( false )
 {
     maStatsUpdateTimer.SetTimeout( 1 );
-    maStatsUpdateTimer.SetPriority( SchedulerPriority::LOWEST );
+    maStatsUpdateTimer.SetPriority( TaskPriority::LOWEST );
     maStatsUpdateTimer.SetTimeoutHdl( LINK( this, DocumentStatisticsManager, DoIdleStatsUpdate ) );
     maStatsUpdateTimer.SetDebugName( "sw::DocumentStatisticsManager maStatsUpdateTimer" );
 }
diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx
index 4a0176b..6b5ce55 100644
--- a/sw/source/core/doc/DocumentTimerManager.cxx
+++ b/sw/source/core/doc/DocumentTimerManager.cxx
@@ -42,7 +42,7 @@ DocumentTimerManager::DocumentTimerManager( SwDoc& i_rSwdoc ) : m_rDoc( i_rSwdoc
                                                                 mIdleBlockCount( 0 ),
                                                                 maIdle("DocumentTimerManagerIdleTimer")
 {
-    maIdle.SetPriority( SchedulerPriority::LOWEST );
+    maIdle.SetPriority( TaskPriority::LOWEST );
     maIdle.SetIdleHdl( LINK( this, DocumentTimerManager, DoIdleJobs) );
     maIdle.SetDebugName( "sw::DocumentTimerManager maIdle" );
 }
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 325f383..3190a2a 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -329,7 +329,7 @@ SwDoc::SwDoc()
     new SwTextNode( SwNodeIndex( GetNodes().GetEndOfContent() ),
                     getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD ));
 
-    maOLEModifiedIdle.SetPriority( SchedulerPriority::LOWEST );
+    maOLEModifiedIdle.SetPriority( TaskPriority::LOWEST );
     maOLEModifiedIdle.SetIdleHdl( LINK( this, SwDoc, DoUpdateModifiedOLE ));
     maOLEModifiedIdle.SetDebugName( "sw::SwDoc maOLEModifiedIdle" );
 
diff --git a/sw/source/core/docnode/threadmanager.cxx b/sw/source/core/docnode/threadmanager.cxx
index 89f97e57..db6efb5 100644
--- a/sw/source/core/docnode/threadmanager.cxx
+++ b/sw/source/core/docnode/threadmanager.cxx
@@ -46,7 +46,7 @@ void ThreadManager::Init()
 {
     mpThreadListener.reset( new ThreadListener( *this ) );
 
-    maStartNewThreadIdle.SetPriority( SchedulerPriority::LOWEST );
+    maStartNewThreadIdle.SetPriority( TaskPriority::LOWEST );
     maStartNewThreadIdle.SetIdleHdl( LINK( this, ThreadManager, TryToStartNewThread ) );
 }
 
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index e0f9337..24d8cd4 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -105,7 +105,7 @@ struct SwSendMailDialog_Impl
         nCurrentDescriptor(0),
         nDocumentCount(0)
              {
-                aRemoveIdle.SetPriority(SchedulerPriority::LOWEST);
+                aRemoveIdle.SetPriority(TaskPriority::LOWEST);
              }
 
     ~SwSendMailDialog_Impl()
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 75ee218..f57c4bd 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -353,7 +353,7 @@ SwLabFormatPage::SwLabFormatPage(vcl::Window* pParent, const SfxItemSet& rSet)
 
     m_pSavePB->SetClickHdl( LINK (this, SwLabFormatPage, SaveHdl));
     // Set timer
-    aPreviewIdle.SetPriority(SchedulerPriority::LOWEST);
+    aPreviewIdle.SetPriority(TaskPriority::LOWEST);
     aPreviewIdle.SetIdleHdl(LINK(this, SwLabFormatPage, PreviewHdl));
 }
 
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 4e415ec..c61e8d5 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5098,7 +5098,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView):
 
     // TemplatePointer for colors should be resetted without
     // selection after single click
-    m_aTemplateIdle.SetPriority(SchedulerPriority::LOWEST);
+    m_aTemplateIdle.SetPriority(TaskPriority::LOWEST);
     m_aTemplateIdle.SetIdleHdl(LINK(this, SwEditWin, TemplateTimerHdl));
 
     // temporary solution!!! Should set the font of the current
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 51fa941..c9e0387 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -535,7 +535,7 @@ void SwSrcEditWindow::CreateTextEngine()
     m_pOutWin->SetFont( aFont );
     m_pTextEngine->SetFont( aFont );
 
-    m_aSyntaxIdle.SetPriority( SchedulerPriority::LOWER );
+    m_aSyntaxIdle.SetPriority( TaskPriority::LOWER );
     m_aSyntaxIdle.SetIdleHdl( LINK( this, SwSrcEditWindow, SyntaxTimerHdl ) );
 
     m_pTextEngine->EnableUndo( true );
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index e1e9adc..99e144d 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -724,7 +724,7 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
         m_aContentTree->GrabFocus();
     UsePage();
     m_aPageChgIdle.SetIdleHdl(LINK(this, SwNavigationPI, ChangePageHdl));
-    m_aPageChgIdle.SetPriority(SchedulerPriority::LOWEST);
+    m_aPageChgIdle.SetPriority(TaskPriority::LOWEST);
 
     m_aContentTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_CONTENT));
     m_aGlobalTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL));
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 636039a..59d3afb 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -83,7 +83,7 @@ SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin,
 
     // the controller is asynchronously set
     aLoadedIdle.SetIdleHdl(LINK(this, SwOneExampleFrame, TimeoutHdl));
-    aLoadedIdle.SetPriority(SchedulerPriority::HIGH);
+    aLoadedIdle.SetPriority(TaskPriority::HIGH);
 
     CreateControl();
 
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 51e3321..02eddc8 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -150,7 +150,7 @@ public:
         Idle("pause"),
         m_nPauseMilliseconds(nPauseMilliseconds)
     {
-        SetPriority(SchedulerPriority::HIGHEST);
+        SetPriority(TaskPriority::HIGHEST);
         Start();
     }
 
diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx
index fd6f27b..b2e620a 100644
--- a/vcl/backendtest/VisualBackendTest.cxx
+++ b/vcl/backendtest/VisualBackendTest.cxx
@@ -118,7 +118,7 @@ public:
         , mpVDev(VclPtr<VirtualDevice>::Create())
     {
         maUpdateTimer.SetTimeoutHdl(LINK(this, VisualBackendTestWindow, updateHdl));
-        maUpdateTimer.SetPriority(SchedulerPriority::REPAINT);
+        maUpdateTimer.SetPriority(TaskPriority::REPAINT);
         if (mbAnimate)
         {
             maUpdateTimer.SetTimeout(1000.0);
diff --git a/vcl/inc/saltimer.hxx b/vcl/inc/saltimer.hxx
index c2e2c23..4d85418 100644
--- a/vcl/inc/saltimer.hxx
+++ b/vcl/inc/saltimer.hxx
@@ -56,21 +56,20 @@ public:
     }
 };
 
-class Scheduler;
+class Task;
 
 // Internal scheduler record holding intrusive linked list pieces
 struct ImplSchedulerData
 {
-    ImplSchedulerData*  mpNext;        // Pointer to the next element in list
-    Scheduler*          mpScheduler;   // Pointer to VCL Scheduler instance
-    bool                mbDelete;      // Destroy this scheduler?
-    bool                mbInScheduler; // Scheduler currently processed?
+    ImplSchedulerData  *mpNext;        // Pointer to the next element in list
+    Task               *mpTask;        // Pointer to VCL Task instance
+    bool                mbDelete;      // Destroy this task?
+    bool                mbInScheduler; // Task currently processed?
     sal_uInt64          mnUpdateTime;  // Last Update Time
 
     void Invoke();
 
     const char *GetDebugName() const;
-    static ImplSchedulerData *GetMostImportantTask( bool bIdle, sal_uInt64 nTimeNow );
 };
 
 #endif // INCLUDED_VCL_INC_SALTIMER_HXX
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 824daa8..e3afd5b 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -24,7 +24,6 @@
 
 #include <tools/fldunit.hxx>
 #include <unotools/options.hxx>
-#include <vcl/idle.hxx>
 #include <vcl/svapp.hxx>
 
 #include <com/sun/star/lang/XComponent.hpp>
@@ -46,6 +45,7 @@ struct ImplConfigData;
 class ImplDirectFontSubstitution;
 struct ImplHotKey;
 struct ImplEventHook;
+struct ImplSchedulerData;
 class Point;
 class ResMgr;
 class ImplAccelManager;
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 61fb63d..9043926 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -20,6 +20,7 @@
 #include "openglgdiimpl.hxx"
 
 #include <vcl/gradient.hxx>
+#include <vcl/idle.hxx>
 #include <salframe.hxx>
 #include "salvd.hxx"
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
@@ -54,13 +55,13 @@ public:
         , m_pImpl( pImpl )
     {
         // We don't want to be swapping before we've painted.
-        SetPriority( SchedulerPriority::POST_PAINT );
+        SetPriority( TaskPriority::POST_PAINT );
     }
 
     virtual void Invoke() override
     {
         m_pImpl->doFlush();
-        SetPriority( SchedulerPriority::HIGHEST );
+        SetPriority( TaskPriority::HIGHEST );
         Stop();
     }
 };
@@ -150,7 +151,7 @@ void OpenGLSalGraphicsImpl::Init()
         maOffscreenTex.GetHeight() != GetHeight() )
     {
         // We don't want to be swapping before we've painted.
-        mpFlush->SetPriority( SchedulerPriority::POST_PAINT );
+        mpFlush->SetPriority( TaskPriority::POST_PAINT );
 
         if( maOffscreenTex && // don't work to release empty textures
             mpContext.is() )  // valid context
@@ -520,7 +521,7 @@ bool OpenGLSalGraphicsImpl::CheckOffscreenTexture()
             maOffscreenTex.GetHeight() != GetHeight() )
         {
             VCL_GL_INFO( "re-size offscreen texture " << maOffscreenTex.Id() );
-            mpFlush->SetPriority( SchedulerPriority::POST_PAINT );
+            mpFlush->SetPriority( TaskPriority::POST_PAINT );
             mpContext->ReleaseFramebuffer( maOffscreenTex );
             maOffscreenTex = OpenGLTexture();
         }
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 4cd82d6..0bac909 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -109,7 +109,7 @@ void AquaSalInstance::delayedSettingsChanged( bool bInvalidate )
 {
     osl::Guard< comphelper::SolarMutex > aGuard( *mpSalYieldMutex );
     AquaDelayedSettingsChanged* pIdle = new AquaDelayedSettingsChanged( bInvalidate );
-    pIdle->SetPriority( SchedulerPriority::MEDIUM );
+    pIdle->SetPriority( TaskPriority::MEDIUM );
     pIdle->Start();
 }
 
diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index 3bf387d..47439ad 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -102,7 +102,7 @@ public:
     explicit IdleBool( bool &rBool ) :
         Idle(), mrBool( rBool )
     {
-        SetPriority( SchedulerPriority::LOWEST );
+        SetPriority( TaskPriority::LOWEST );
         Start();
         mrBool = false;
     }
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index dea322f..52b8d98 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -27,32 +27,32 @@ void Idle::Invoke()
 
 Idle& Idle::operator=( const Idle& rIdle )
 {
-    Scheduler::operator=(rIdle);
+    Task::operator=(rIdle);
     maIdleHdl = rIdle.maIdleHdl;
     return *this;
 }
 
-Idle::Idle( const sal_Char *pDebugName ) : Scheduler( pDebugName )
+Idle::Idle( const sal_Char *pDebugName ) : Task( pDebugName )
 {
 }
 
-Idle::Idle( const Idle& rIdle ) : Scheduler(rIdle)
+Idle::Idle( const Idle& rIdle ) : Task(rIdle)
 {
     maIdleHdl = rIdle.maIdleHdl;
 }
 
 void Idle::Start()
 {
-    Scheduler::Start();
+    Task::Start();
 
     sal_uInt64 nPeriod = Scheduler::ImmediateTimeoutMs;
     if (Scheduler::GetDeterministicMode())
     {
         switch (mePriority)
         {
-            case SchedulerPriority::LOW:
-            case SchedulerPriority::LOWER:
-            case SchedulerPriority::LOWEST:
+            case TaskPriority::LOW:
+            case TaskPriority::LOWER:
+            case TaskPriority::LOWEST:
                 nPeriod = Scheduler::InfiniteTimeoutMs;
                 break;
             default:
@@ -60,7 +60,7 @@ void Idle::Start()
         }
     }
 
-    Scheduler::ImplStartTimer(nPeriod);
+    Task::StartTimer(nPeriod);
 }
 
 bool Idle::ReadyForSchedule( bool bIdle, sal_uInt64 /* nTimeNow */ ) const
@@ -77,7 +77,7 @@ bool Idle::IsIdle() const
 sal_uInt64 Idle::UpdateMinPeriod( sal_uInt64 /* nMinPeriod */, sal_uInt64 /* nTimeNow */ ) const
 {
     assert(false); // idles currently don't hit this.
-    return ImmediateTimeoutMs;
+    return Scheduler::ImmediateTimeoutMs;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 63c0c5f..3a62f3d 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -26,7 +26,6 @@
 
 namespace {
 const sal_uInt64 MaximumTimeoutMs = 1000 * 60; // 1 minute
-void InitSystemTimer(ImplSVData* pSVData);
 }
 
 void ImplSchedulerData::Invoke()
@@ -38,49 +37,17 @@ void ImplSchedulerData::Invoke()
         return;
 
     // prepare Scheduler Object for deletion after handling
-    mpScheduler->SetDeletionFlags();
+    mpTask->SetDeletionFlags();
 
     // tdf#92036 Reset the period to avoid re-firing immediately.
-    mpScheduler->mpSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks();
+    mpTask->mpSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks();
 
     // invoke it
     mbInScheduler = true;
-    mpScheduler->Invoke();
+    mpTask->Invoke();
     mbInScheduler = false;
 }
 
-ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( bool bIdle, sal_uInt64 nTimeNow )
-{
-    ImplSVData*     pSVData = ImplGetSVData();
-    ImplSchedulerData *pMostUrgent = nullptr;
-
-    for ( ImplSchedulerData *pSchedulerData = pSVData->mpFirstSchedulerData; pSchedulerData; pSchedulerData = pSchedulerData->mpNext )
-    {
-        if ( !pSchedulerData->mpScheduler || pSchedulerData->mbDelete || pSchedulerData->mbInScheduler ||
-             !pSchedulerData->mpScheduler->ReadyForSchedule( bIdle, nTimeNow ) ||
-             !pSchedulerData->mpScheduler->IsActive())
-            continue;
-        if (!pMostUrgent)
-            pMostUrgent = pSchedulerData;
-        else
-        {
-            // Find the highest priority.
-            // If the priority of the current task is higher (numerical value is lower) than
-            // the priority of the most urgent, the current task gets the new most urgent.
-            if ( pSchedulerData->mpScheduler->GetPriority() < pMostUrgent->mpScheduler->GetPriority() )
-                pMostUrgent = pSchedulerData;
-        }
-    }
-
-    return pMostUrgent;
-}
-
-void Scheduler::SetDeletionFlags()
-{
-    mpSchedulerData->mbDelete = true;
-    mbActive = false;
-}
-
 void Scheduler::ImplDeInitScheduler()
 {
     ImplSVData*     pSVData = ImplGetSVData();
@@ -95,10 +62,10 @@ void Scheduler::ImplDeInitScheduler()
         do
         {
             ImplSchedulerData* pTempSchedulerData = pSchedulerData;
-            if ( pSchedulerData->mpScheduler )
+            if ( pSchedulerData->mpTask )
             {
-                pSchedulerData->mpScheduler->mbActive = false;
-                pSchedulerData->mpScheduler->mpSchedulerData = nullptr;
+                pSchedulerData->mpTask->mbActive = false;
+                pSchedulerData->mpTask->mpSchedulerData = nullptr;
             }
             pSchedulerData = pSchedulerData->mpNext;
             delete pTempSchedulerData;
@@ -132,7 +99,12 @@ void Scheduler::ImplStartTimer(sal_uInt64 nMS, bool bForce)
 
     DBG_TESTSOLARMUTEX();
 
-    InitSystemTimer(pSVData);
+    if (!pSVData->mpSalTimer)
+    {
+        pSVData->mnTimerPeriod = MaximumTimeoutMs;
+        pSVData->mpSalTimer = pSVData->mpDefInst->CreateSalTimer();
+        pSVData->mpSalTimer->SetCallback(Scheduler::CallbackTaskScheduling);
+    }
 
     if ( !nMS )
         nMS = 1;
@@ -145,25 +117,6 @@ void Scheduler::ImplStartTimer(sal_uInt64 nMS, bool bForce)
     }
 }
 
-namespace {
-
-/**
-* Initialize the platform specific timer on which all the
-* platform independent timers are built
-*/
-void InitSystemTimer(ImplSVData* pSVData)
-{
-    assert(pSVData != nullptr);
-    if (!pSVData->mpSalTimer)
-    {
-        pSVData->mnTimerPeriod = MaximumTimeoutMs;
-        pSVData->mpSalTimer = pSVData->mpDefInst->CreateSalTimer();
-        pSVData->mpSalTimer->SetCallback(Scheduler::CallbackTaskScheduling);
-    }
-}
-
-}
-
 void Scheduler::CallbackTaskScheduling( bool bIdle )
 {
     // this function is for the saltimer callback
@@ -172,17 +125,39 @@ void Scheduler::CallbackTaskScheduling( bool bIdle )
 
 bool Scheduler::ProcessTaskScheduling( bool bIdle )
 {
-    ImplSchedulerData* pSchedulerData;
+    ImplSVData        *pSVData = ImplGetSVData();
+    if ( pSVData->mbDeInit )
+        return false;
+    ImplSchedulerData *pMostUrgent = nullptr;
     sal_uInt64         nTime = tools::Time::GetSystemTicks();
 
     DBG_TESTSOLARMUTEX();
 
-    if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bIdle, nTime)))
+    for ( ImplSchedulerData *pSchedulerData = pSVData->mpFirstSchedulerData;
+          pSchedulerData; pSchedulerData = pSchedulerData->mpNext )
+    {
+        if ( !pSchedulerData->mpTask || pSchedulerData->mbDelete || pSchedulerData->mbInScheduler ||
+             !pSchedulerData->mpTask->ReadyForSchedule( bIdle, nTime ) ||
+             !pSchedulerData->mpTask->IsActive())
+            continue;
+        if (!pMostUrgent)
+            pMostUrgent = pSchedulerData;
+        else
+        {
+            // Find the highest priority.
+            // If the priority of the current task is higher (numerical value is lower) than
+            // the priority of the most urgent, the current task gets the new most urgent.

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list