[Libreoffice-commits] core.git: 27 commits - avmedia/inc avmedia/source basctl/source chart2/source cui/source dbaccess/source desktop/source editeng/source extensions/source forms/source formula/source include/sfx2 include/svtools include/svx include/vcl linguistic/source reportdesign/source sc/inc sc/source sd/inc sd/source sfx2/source starmath/inc starmath/source svtools/source svx/inc svx/source sw/inc sw/source toolkit/source vcl/generic vcl/inc vcl/Library_vcl.mk vcl/osx vcl/qa vcl/source

Tobias Madl tobias.madl.dev at gmail.com
Fri Mar 6 05:08:30 PST 2015


 avmedia/inc/mediacontrol.hxx                                  |    1 
 avmedia/source/framework/mediacontrol.cxx                     |    2 
 avmedia/source/framework/soundhandler.cxx                     |    2 
 avmedia/source/framework/soundhandler.hxx                     |    1 
 basctl/source/basicide/baside2.hxx                            |    1 
 basctl/source/basicide/baside2b.cxx                           |    4 
 basctl/source/dlged/dlged.cxx                                 |    2 
 basctl/source/inc/dlged.hxx                                   |    1 
 chart2/source/view/charttypes/GL3DBarChart.cxx                |    2 
 chart2/source/view/inc/GL3DBarChart.hxx                       |    1 
 cui/source/dialogs/cuigaldlg.cxx                              |    2 
 cui/source/dialogs/linkdlg.cxx                                |    3 
 cui/source/dialogs/thesdlg.cxx                                |    2 
 cui/source/inc/backgrnd.hxx                                   |    2 
 cui/source/inc/cuigaldlg.hxx                                  |    1 
 cui/source/inc/linkdlg.hxx                                    |    1 
 cui/source/inc/thesdlg.hxx                                    |    1 
 cui/source/options/optjava.cxx                                |    2 
 cui/source/options/optjava.hxx                                |    1 
 cui/source/tabpages/backgrnd.cxx                              |   11 
 cui/source/tabpages/chardlg.cxx                               |    3 
 cui/source/tabpages/macroass.cxx                              |    5 
 dbaccess/source/ui/inc/JoinTableView.hxx                      |    1 
 dbaccess/source/ui/querydesign/JoinTableView.cxx              |    2 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx              |    4 
 desktop/source/deployment/gui/dp_gui_dialog2.hxx              |    1 
 editeng/source/editeng/impedit.hxx                            |    7 
 editeng/source/editeng/impedit2.cxx                           |    8 
 editeng/source/editeng/impedit3.cxx                           |    2 
 editeng/source/editeng/impedit4.cxx                           |    4 
 extensions/source/bibliography/bibcont.cxx                    |    2 
 extensions/source/bibliography/bibcont.hxx                    |    1 
 extensions/source/bibliography/toolbar.cxx                    |    2 
 extensions/source/update/ui/updatecheckui.cxx                 |    3 
 forms/source/component/ListBox.cxx                            |    2 
 forms/source/component/ListBox.hxx                            |    1 
 formula/source/ui/dlg/formula.cxx                             |    3 
 formula/source/ui/dlg/funcutl.cxx                             |    6 
 include/sfx2/dinfdlg.hxx                                      |    1 
 include/svtools/filechangedchecker.hxx                        |    1 
 include/svtools/treelistbox.hxx                               |    1 
 include/svtools/wizdlg.hxx                                    |    1 
 include/svx/fontwork.hxx                                      |    1 
 include/svx/numvset.hxx                                       |    1 
 include/svx/sidebar/PanelLayout.hxx                           |    1 
 include/svx/svdpntv.hxx                                       |    1 
 include/vcl/edit.hxx                                          |    1 
 include/vcl/idle.hxx                                          |   45 +
 include/vcl/scheduler.hxx                                     |   91 ++
 include/vcl/syswin.hxx                                        |    1 
 include/vcl/timer.hxx                                         |   88 --
 include/vcl/toolbox.hxx                                       |    1 
 linguistic/source/lngsvcmgr.cxx                               |    2 
 linguistic/source/lngsvcmgr.hxx                               |    1 
 reportdesign/source/ui/inc/DesignView.hxx                     |    1 
 reportdesign/source/ui/report/DesignView.cxx                  |    2 
 sc/inc/chartlis.hxx                                           |    1 
 sc/inc/document.hxx                                           |    1 
 sc/inc/scmod.hxx                                              |    3 
 sc/source/core/data/documen2.cxx                              |    2 
 sc/source/core/tool/chartlis.cxx                              |    2 
 sc/source/ui/app/scmod.cxx                                    |   49 -
 sc/source/ui/dbgui/sfiltdlg.cxx                               |    3 
 sc/source/ui/docshell/autostyl.cxx                            |    2 
 sc/source/ui/formdlg/dwfunctr.cxx                             |    2 
 sc/source/ui/inc/acredlin.hxx                                 |    1 
 sc/source/ui/inc/autostyl.hxx                                 |    1 
 sc/source/ui/inc/conflictsdlg.hxx                             |    1 
 sc/source/ui/inc/navipi.hxx                                   |    3 
 sc/source/ui/miscdlgs/acredlin.cxx                            |    4 
 sc/source/ui/miscdlgs/anyrefdg.cxx                            |    2 
 sc/source/ui/miscdlgs/conflictsdlg.cxx                        |    2 
 sc/source/ui/navipi/navipi.cxx                                |    6 
 sc/source/ui/pagedlg/tphfedit.cxx                             |    2 
 sd/inc/drawdoc.hxx                                            |    1 
 sd/source/core/drawdoc4.cxx                                   |    2 
 sd/source/ui/dlg/brkdlg.cxx                                   |    2 
 sd/source/ui/dlg/dlgass.cxx                                   |    7 
 sd/source/ui/dlg/filedlg.cxx                                  |    3 
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx |   20 
 sd/source/ui/framework/configuration/ConfigurationUpdater.hxx |    2 
 sd/source/ui/framework/module/ShellStackGuard.cxx             |    2 
 sd/source/ui/framework/module/ShellStackGuard.hxx             |    1 
 sd/source/ui/inc/BreakDlg.hxx                                 |    1 
 sd/source/ui/inc/View.hxx                                     |    1 
 sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx          |   18 
 sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx          |    2 
 sd/source/ui/slidesorter/controller/SlsAnimator.cxx           |    2 
 sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx       |    1 
 sd/source/ui/view/sdview.cxx                                  |    4 
 sfx2/source/appl/appcfg.cxx                                   |   11 
 sfx2/source/appl/appinit.cxx                                  |    4 
 sfx2/source/appl/newhelp.cxx                                  |    8 
 sfx2/source/appl/newhelp.hxx                                  |    1 
 sfx2/source/control/dispatch.cxx                              |    7 
 sfx2/source/dialog/basedlgs.cxx                               |    7 
 sfx2/source/dialog/dinfdlg.cxx                                |    4 
 sfx2/source/dialog/dockwin.cxx                                |    7 
 sfx2/source/dialog/filedlghelper.cxx                          |    4 
 sfx2/source/dialog/filedlgimpl.hxx                            |    1 
 sfx2/source/dialog/templdlg.cxx                               |    2 
 sfx2/source/doc/new.cxx                                       |    3 
 starmath/inc/edit.hxx                                         |    5 
 starmath/source/edit.cxx                                      |    8 
 svtools/source/contnr/imivctl.hxx                             |    1 
 svtools/source/contnr/imivctl1.cxx                            |   13 
 svtools/source/contnr/svimpbox.cxx                            |    4 
 svtools/source/contnr/treelistbox.cxx                         |    2 
 svtools/source/control/asynclink.cxx                          |    3 
 svtools/source/control/tabbar.cxx                             |    2 
 svtools/source/dialogs/wizdlg.cxx                             |    2 
 svtools/source/graphic/grfcache.cxx                           |    6 
 svtools/source/graphic/grfcache.hxx                           |    2 
 svtools/source/misc/filechangedchecker.cxx                    |    2 
 svx/inc/sdr/contact/objectcontactofpageview.hxx               |    1 
 svx/inc/sdr/overlay/overlaymanagerbuffered.hxx                |    3 
 svx/inc/svdibrow.hxx                                          |    1 
 svx/source/dialog/_contdlg.cxx                                |    4 
 svx/source/dialog/contimp.hxx                                 |    1 
 svx/source/dialog/fontwork.cxx                                |    2 
 svx/source/dialog/graphctl.cxx                                |    2 
 svx/source/dialog/imapdlg.cxx                                 |    2 
 svx/source/dialog/srchdlg.cxx                                 |    3 
 svx/source/dialog/svxbmpnumvalueset.cxx                       |    2 
 svx/source/form/datanavi.cxx                                  |    2 
 svx/source/form/formcontroller.cxx                            |    2 
 svx/source/inc/datanavi.hxx                                   |    1 
 svx/source/inc/eventhandler.hxx                               |    3 
 svx/source/inc/formcontroller.hxx                             |    1 
 svx/source/sdr/contact/objectcontactofpageview.cxx            |    2 
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx         |    3 
 svx/source/sdr/event/eventhandler.cxx                         |    2 
 svx/source/sdr/overlay/overlaymanagerbuffered.cxx             |    2 
 svx/source/sidebar/PanelLayout.cxx                            |    2 
 svx/source/stbctrls/modctrl.cxx                               |    3 
 svx/source/svdraw/svdibrow.cxx                                |    2 
 svx/source/svdraw/svdpntv.cxx                                 |    2 
 svx/source/tbxctrls/grafctrl.cxx                              |    3 
 sw/inc/doc.hxx                                                |    1 
 sw/source/core/doc/DocumentStatisticsManager.cxx              |    3 
 sw/source/core/doc/DocumentTimerManager.cxx                   |   10 
 sw/source/core/doc/docnew.cxx                                 |    2 
 sw/source/core/docnode/threadmanager.cxx                      |    2 
 sw/source/core/inc/DocumentTimerManager.hxx                   |    6 
 sw/source/core/inc/threadmanager.hxx                          |    1 
 sw/source/ui/dbui/mmoutputtypepage.cxx                        |    3 
 sw/source/ui/envelp/labfmt.cxx                                |    2 
 sw/source/ui/envelp/labfmt.hxx                                |    1 
 sw/source/uibase/docvw/edtwin.cxx                             |    2 
 sw/source/uibase/docvw/srcedtw.cxx                            |    2 
 sw/source/uibase/inc/edtwin.hxx                               |    1 
 sw/source/uibase/inc/navipi.hxx                               |    1 
 sw/source/uibase/inc/srcedtw.hxx                              |    1 
 sw/source/uibase/inc/unotools.hxx                             |    1 
 sw/source/uibase/utlui/navipi.cxx                             |    2 
 sw/source/uibase/utlui/unotools.cxx                           |    2 
 toolkit/source/awt/vclxtoolkit.cxx                            |    3 
 vcl/Library_vcl.mk                                            |    2 
 vcl/generic/print/genprnpsp.cxx                               |    3 
 vcl/inc/svdata.hxx                                            |    8 
 vcl/inc/window.h                                              |    1 
 vcl/osx/salinst.cxx                                           |    2 
 vcl/qa/cppunit/timer.cxx                                      |   16 
 vcl/source/app/idle.cxx                                       |   43 +
 vcl/source/app/scheduler.cxx                                  |  262 ++++++
 vcl/source/app/svapp.cxx                                      |   16 
 vcl/source/app/svmain.cxx                                     |    3 
 vcl/source/app/timer.cxx                                      |  403 +---------
 vcl/source/edit/textdat2.hxx                                  |    1 
 vcl/source/edit/textdata.cxx                                  |    2 
 vcl/source/window/dockmgr.cxx                                 |    5 
 vcl/source/window/dockwin.cxx                                 |    5 
 vcl/source/window/syswin.cxx                                  |    2 
 vcl/source/window/toolbox.cxx                                 |    2 
 vcl/source/window/window.cxx                                  |    4 
 175 files changed, 849 insertions(+), 634 deletions(-)

New commits:
commit 01f406bc28f53acc5a2734af637aa8074a5d1813
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Fri Mar 6 10:39:49 2015 +0000

    adapted comments and variable names
    
    Change-Id: I4f2c1d743ce2f30e8c24180b73f0716fc13b459e

diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index a999559..004e78c 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -40,10 +40,10 @@ public:
 
     /// Make it possible to associate a callback with this timer handler
     /// of course, you can also sub-class and override 'Invoke'
-    void            SetTimeout( sal_uLong nTimeoutMs );
-    sal_uLong       GetTimeout() const { return mnTimeout; }
     void            SetTimeoutHdl( const Link& rLink ) { maTimeoutHdl = rLink; }
     const Link&     GetTimeoutHdl() const { return maTimeoutHdl; }
+    void            SetTimeout( sal_uLong nTimeoutMs );
+    sal_uLong       GetTimeout() const { return mnTimeout; }
     virtual void    Invoke() SAL_OVERRIDE;
     void            Timeout() { Invoke(); }
     Timer&          operator=( const Timer& rTimer );
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 132c272..967f3df 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -317,8 +317,7 @@ struct ImplSVData
     SalSystem*              mpSalSystem;                    // SalSystem interface
     ResMgr*                 mpResMgr;                       // SV-Resource-Manager
     sal_uLong               mnTimerPeriod;                  // current timer period
-    sal_uLong               mnTimerUpdate;                  // TimerCallbackProcs on stack
-    bool                    mbNotAllTimerCalled;            // true: Timer must still be processed
+    sal_uLong               mnUpdateStack;                  // Scheduler on stack
     ImplSVAppData           maAppData;                      // indepen data for class Application
     ImplSVGDIData           maGDIData;                      // indepen data for Output classes
     ImplSVWinData           maWinData;                      // indepen data for Windows classes
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index fc52b90..5a0061f 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -23,11 +23,14 @@
 #include <vcl/timer.hxx>
 #include <saltimer.hxx>
 
+#define MAX_TIMER_PERIOD    ((sal_uLong)0xFFFFFFFF)
+
 void ImplSchedulerData::Invoke()
 {
     if (mbDelete || mbInScheduler )
         return;
 
+    // prepare Scheduler Object for deletion after handling
     mpScheduler->SetDeletionFlags();
 
     // invoke it
@@ -41,20 +44,20 @@ ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( bool bTimer )
     ImplSVData*     pSVData = ImplGetSVData();
     ImplSchedulerData *pMostUrgent = NULL;
 
-    for ( ImplSchedulerData *p = pSVData->mpFirstSchedulerData; p; p = p->mpNext )
+    for ( ImplSchedulerData *pSchedulerData = pSVData->mpFirstSchedulerData; pSchedulerData; pSchedulerData = pSchedulerData->mpNext )
     {
-        if ( !p->mpScheduler || p->mbDelete || p->mnUpdateStack >= pSVData->mnTimerUpdate || !p->mpScheduler->ReadyForSchedule( bTimer ) )
+        if ( !pSchedulerData->mpScheduler || pSchedulerData->mbDelete || pSchedulerData->mnUpdateStack >= pSVData->mnUpdateStack
+            || !pSchedulerData->mpScheduler->ReadyForSchedule( bTimer ) )
             continue;
         if (!pMostUrgent)
-            pMostUrgent = p;
+            pMostUrgent = pSchedulerData;
         else
         {
             // Find the highest priority.
-            // If the priority of the current idle is higher (numerical value is lower) than
-            // the priority of the most urgent, the priority of most urgent is increased and
-            // the current is the new most urgent. So starving is impossible.
-            if ( p->mpScheduler->GetPriority() < pMostUrgent->mpScheduler->GetPriority() )
-                pMostUrgent = p;
+            // 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;
         }
     }
 
@@ -101,6 +104,7 @@ void Scheduler::ImplDeInitScheduler()
 
 void Scheduler::CallbackTaskScheduling(bool ignore)
 {
+    // this function is for the saltimer callback
     (void)ignore;
     Scheduler::ProcessTaskScheduling( true );
 }
@@ -108,12 +112,13 @@ void Scheduler::CallbackTaskScheduling(bool ignore)
 void Scheduler::ProcessTaskScheduling( bool bTimer )
 {
     // process all pending Tasks
+    // if bTimer True, only handle timer
     ImplSchedulerData* pSchedulerData = NULL;
     ImplSchedulerData* pPrevSchedulerData = NULL;
     ImplSVData*        pSVData = ImplGetSVData();
     sal_uLong          nTime = tools::Time::GetSystemTicks();
-    sal_uLong          nMinPeriod = ((sal_uLong)0xFFFFFFFF);
-    pSVData->mnTimerUpdate++;
+    sal_uLong          nMinPeriod = MAX_TIMER_PERIOD;
+    pSVData->mnUpdateStack++;
 
     if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bTimer)))
     {
@@ -156,15 +161,17 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
     {
         if ( pSVData->mpSalTimer )
             pSVData->mpSalTimer->Stop();
-        pSVData->mnTimerPeriod = ((sal_uLong)0xFFFFFFFF);
+        pSVData->mnTimerPeriod = MAX_TIMER_PERIOD;
     }
     else
         Timer::ImplStartTimer( pSVData, nMinPeriod );
-    pSVData->mnTimerUpdate--;
+    pSVData->mnUpdateStack--;
 }
 
 sal_uLong Scheduler::UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime )
 {
+    // this period is only usefull for timer
+    // so in this implementation it' only a pass through
     (void)nTime;
     return nMinPeriod;
 }
@@ -182,7 +189,7 @@ void Scheduler::Start()
     ImplSVData* pSVData = ImplGetSVData();
     if ( !mpSchedulerData )
     {
-        // insert Idle
+        // insert Scheduler
         mpSchedulerData                = new ImplSchedulerData;
         mpSchedulerData->mpScheduler   = this;
         mpSchedulerData->mbInScheduler = false;
@@ -203,7 +210,7 @@ void Scheduler::Start()
     }
     mpSchedulerData->mbDelete      = false;
     mpSchedulerData->mnUpdateTime  = tools::Time::GetSystemTicks();
-    mpSchedulerData->mnUpdateStack = pSVData->mnTimerUpdate;
+    mpSchedulerData->mnUpdateStack = pSVData->mnUpdateStack;
 }
 
 void Scheduler::Stop()
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index ac7bb5f..b4389fe 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -22,7 +22,6 @@
 #include <saltimer.hxx>
 #include <svdata.hxx>
 #include <salinst.hxx>
-#include <vcl/scheduler.hxx>
 
 #define MAX_TIMER_PERIOD    ((sal_uLong)0xFFFFFFFF)
 
@@ -122,7 +121,7 @@ void Timer::SetTimeout( sal_uLong nNewTimeout )
     if ( mbActive )
     {
         ImplSVData* pSVData = ImplGetSVData();
-        if ( !pSVData->mnTimerUpdate && (mnTimeout < pSVData->mnTimerPeriod) )
+        if ( !pSVData->mnUpdateStack && (mnTimeout < pSVData->mnTimerPeriod) )
             Timer::ImplStartTimer( pSVData, mnTimeout );
     }
 }
commit b6bb2e9315c9bc3338eaf066df40a969eb4774aa
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Fri Mar 6 10:13:53 2015 +0000

    Scheduler: removed variable priority
    
    Change-Id: I6676c1012c4321b53b6ba01ebd4bfa32d56afcf9

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index 30f2e1a..1e7b3ed 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -27,11 +27,11 @@ class Scheduler;
 struct ImplSchedulerData
 {
     ImplSchedulerData*  mpNext;      // Pointer to the next element in list
-    Scheduler*          mpScheduler;      // Pointer to VCL Idle instance
-    bool                mbDelete;    // Destroy this idle?
-    bool                mbInScheduler;    // Idle handler currently processed?
+    Scheduler*          mpScheduler;      // Pointer to VCL Scheduler instance
+    bool                mbDelete;    // Destroy this scheduler?
+    bool                mbInScheduler;    // Scheduler currently processed?
     sal_uLong           mnUpdateTime;   // Last Update Time
-    sal_uLong           mnUpdateStack;  // Update Stack on stack
+    sal_uLong           mnUpdateStack;  // Update Stack
 
     void Invoke();
 
@@ -52,9 +52,8 @@ enum class SchedulerPriority {
 class VCL_DLLPUBLIC Scheduler
 {
 protected:
-    ImplSchedulerData*  mpSchedulerData;    // Pointer to element in idle list
-    sal_Int32           miPriority;         // Idle priority ( maybe divergent to default)
-    SchedulerPriority   meDefaultPriority;  // Default idle priority
+    ImplSchedulerData*  mpSchedulerData;    // Pointer to element in scheduler list
+    SchedulerPriority   mePriority;         // Scheduler priority
     bool                mbActive;           // Currently in the scheduler
 
     friend struct ImplSchedulerData;
@@ -68,11 +67,9 @@ public:
     virtual ~Scheduler();
 
     void SetPriority( SchedulerPriority ePriority );
-    void SetSchedulingPriority( sal_Int32 iPriority );
-    sal_Int32    GetPriority() const { return miPriority; }
-    SchedulerPriority GetDefaultPriority() const { return meDefaultPriority; }
+    SchedulerPriority GetPriority() const { return mePriority; }
 
-    // Call idle handler
+    // Call handler
     virtual void    Invoke() = 0;
 
     virtual void    Start();
@@ -83,8 +80,9 @@ public:
     Scheduler&          operator=( const Scheduler& rScheduler );
     static void ImplDeInitScheduler();
 
-    /// Process all pending idle tasks ahead of time in priority order.
+    // Process one pending Timer with highhest priority
     static void CallbackTaskScheduling( bool ignore );
+    /// Process one pending task ahead of time with highhest priority.
     static void ProcessTaskScheduling( bool bTimer );
 };
 
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index ef5e1f0..fc52b90 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -28,7 +28,6 @@ void ImplSchedulerData::Invoke()
     if (mbDelete || mbInScheduler )
         return;
 
-    mpScheduler->SetSchedulingPriority(static_cast<sal_Int32>(mpScheduler->GetDefaultPriority()));
     mpScheduler->SetDeletionFlags();
 
     // invoke it
@@ -172,12 +171,7 @@ sal_uLong Scheduler::UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime )
 
 void Scheduler::SetPriority( SchedulerPriority ePriority )
 {
-    meDefaultPriority = ePriority;
-}
-
-void Scheduler::SetSchedulingPriority( sal_Int32 iPriority )
-{
-    miPriority = iPriority;
+    mePriority = ePriority;
 }
 
 void Scheduler::Start()
@@ -226,8 +220,7 @@ Scheduler& Scheduler::operator=( const Scheduler& rScheduler )
         Stop();
 
     mbActive          = false;
-    miPriority        = rScheduler.miPriority;
-    meDefaultPriority = rScheduler.meDefaultPriority;
+    mePriority = rScheduler.mePriority;
 
     if ( rScheduler.IsActive() )
         Start();
@@ -237,16 +230,14 @@ Scheduler& Scheduler::operator=( const Scheduler& rScheduler )
 
 Scheduler::Scheduler():
     mpSchedulerData(NULL),
-    miPriority(static_cast<sal_Int32>(SchedulerPriority::HIGH)),
-    meDefaultPriority(SchedulerPriority::HIGH),
+    mePriority(SchedulerPriority::HIGH),
     mbActive(false)
 {
 }
 
 Scheduler::Scheduler( const Scheduler& rScheduler ):
     mpSchedulerData(NULL),
-    miPriority(rScheduler.miPriority),
-    meDefaultPriority(rScheduler.meDefaultPriority),
+    mePriority(rScheduler.mePriority),
     mbActive(false)
 {
     if ( rScheduler.IsActive() )
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 4dec9af..ac7bb5f 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -86,8 +86,7 @@ Timer::Timer() : Scheduler()
 {
     mnTimeout = 1;
     mbAuto = false;
-    miPriority= static_cast<sal_Int32>(SchedulerPriority::HIGHEST);
-    meDefaultPriority = SchedulerPriority::HIGHEST;
+    mePriority = SchedulerPriority::HIGHEST;
 }
 
 Timer::Timer( const Timer& rTimer ) : Scheduler(rTimer)
commit d851e1e3c29afd3315cc763144c6eb92fbef5054
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Fri Mar 6 09:07:06 2015 +0100

    Timer/Idle: wipe out old functionality
    
    Change-Id: Id50533bc52f36d2daf31bfda4fabfb6d126df4b9

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0064ec0..7da6b63 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -342,10 +342,6 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
 {
     ImplSVData* pSVData = ImplGetSVData();
 
-    // run timers that have timed out
-    //while ( pSVData->mbNotAllTimerCalled )
-    //    Timer::ImplTimerCallbackProc();
-
     //Process all Tasks
     Scheduler::ProcessTaskScheduling(false);
 
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 43f76be..9d59eac6 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -387,7 +387,6 @@ void DeInitVCL()
 
     if ( pSVData->maAppData.mpIdleMgr )
         delete pSVData->maAppData.mpIdleMgr;
-    //Timer::ImplDeInitTimer();
     Scheduler::ImplDeInitScheduler();
 
     if ( pSVData->maWinData.mpMsgBoxImgList )
commit 7e2a0df7e7b4551698d1d7172ef12ad1e0fd8826
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Thu Mar 5 14:05:15 2015 +0000

    Timer: added new saltimer handling
    
    Change-Id: Icdc5abf9dca727a8cc312ddb5861f7a34a38bbe1

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index af17016..30f2e1a 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -60,6 +60,7 @@ protected:
     friend struct ImplSchedulerData;
     virtual void SetDeletionFlags();
     virtual bool ReadyForSchedule( bool bTimer ) { return !bTimer; }
+    virtual sal_uLong UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime );
 
 public:
     Scheduler();
@@ -79,7 +80,7 @@ public:
 
     bool            IsActive() const { return mbActive; }
 
-    Scheduler&          operator=( const Scheduler& Scheduler );
+    Scheduler&          operator=( const Scheduler& rScheduler );
     static void ImplDeInitScheduler();
 
     /// Process all pending idle tasks ahead of time in priority order.
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index d2db1d4..a999559 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -32,6 +32,7 @@ protected:
 
     void SetDeletionFlags() SAL_OVERRIDE;
     bool ReadyForSchedule( bool bTimer ) SAL_OVERRIDE;
+    sal_uLong UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime ) SAL_OVERRIDE;
 
 public:
     Timer();
@@ -44,9 +45,10 @@ public:
     void            SetTimeoutHdl( const Link& rLink ) { maTimeoutHdl = rLink; }
     const Link&     GetTimeoutHdl() const { return maTimeoutHdl; }
     virtual void    Invoke() SAL_OVERRIDE;
-    void    Timeout() { Invoke(); }
+    void            Timeout() { Invoke(); }
     Timer&          operator=( const Timer& rTimer );
     void            Start() SAL_OVERRIDE;
+    static void     ImplStartTimer( ImplSVData* pSVData, sal_uLong nMS );
 };
 
 /// An auto-timer is a multi-shot timer re-emitting itself at
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 06de1ba..ef5e1f0 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -20,6 +20,8 @@
 #include <svdata.hxx>
 #include <tools/time.hxx>
 #include <vcl/scheduler.hxx>
+#include <vcl/timer.hxx>
+#include <saltimer.hxx>
 
 void ImplSchedulerData::Invoke()
 {
@@ -70,6 +72,10 @@ void Scheduler::ImplDeInitScheduler()
 {
     ImplSVData*     pSVData = ImplGetSVData();
     ImplSchedulerData*  pSchedulerData = pSVData->mpFirstSchedulerData;
+    if (pSVData->mpSalTimer)
+    {
+        pSVData->mpSalTimer->Stop();
+    }
 
     if ( pSchedulerData )
     {
@@ -87,7 +93,11 @@ void Scheduler::ImplDeInitScheduler()
         while ( pSchedulerData );
 
         pSVData->mpFirstSchedulerData   = NULL;
+        pSVData->mnTimerPeriod      = 0;
     }
+
+    delete pSVData->mpSalTimer;
+    pSVData->mpSalTimer = 0;
 }
 
 void Scheduler::CallbackTaskScheduling(bool ignore)
@@ -102,19 +112,26 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
     ImplSchedulerData* pSchedulerData = NULL;
     ImplSchedulerData* pPrevSchedulerData = NULL;
     ImplSVData*        pSVData = ImplGetSVData();
+    sal_uLong          nTime = tools::Time::GetSystemTicks();
+    sal_uLong          nMinPeriod = ((sal_uLong)0xFFFFFFFF);
     pSVData->mnTimerUpdate++;
 
     if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bTimer)))
     {
-        pSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks();
+        pSchedulerData->mnUpdateTime = nTime;
         pSchedulerData->Invoke();
     }
 
     pSchedulerData = pSVData->mpFirstSchedulerData;
     while ( pSchedulerData )
     {
+        if( pSchedulerData->mbInScheduler )
+        {
+            pPrevSchedulerData = pSchedulerData;
+            pSchedulerData = pSchedulerData->mpNext;
+        }
         // Should Task be released from scheduling?
-        if ( pSchedulerData->mbDelete )
+        else if ( pSchedulerData->mbDelete )
         {
             if ( pPrevSchedulerData )
                 pPrevSchedulerData->mpNext = pSchedulerData->mpNext;
@@ -128,15 +145,31 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
         }
         else
         {
-            if( !pSchedulerData->mbInScheduler )
-                pSchedulerData->mnUpdateStack = 0;
+            pSchedulerData->mnUpdateStack = 0;
+            nMinPeriod = pSchedulerData->mpScheduler->UpdateMinPeriod( nMinPeriod, nTime );
             pPrevSchedulerData = pSchedulerData;
             pSchedulerData = pSchedulerData->mpNext;
         }
     }
+
+    // delete clock if no more timers available
+    if ( !pSVData->mpFirstSchedulerData )
+    {
+        if ( pSVData->mpSalTimer )
+            pSVData->mpSalTimer->Stop();
+        pSVData->mnTimerPeriod = ((sal_uLong)0xFFFFFFFF);
+    }
+    else
+        Timer::ImplStartTimer( pSVData, nMinPeriod );
     pSVData->mnTimerUpdate--;
 }
 
+sal_uLong Scheduler::UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime )
+{
+    (void)nTime;
+    return nMinPeriod;
+}
+
 void Scheduler::SetPriority( SchedulerPriority ePriority )
 {
     meDefaultPriority = ePriority;
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index b8be2d7..4dec9af 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -26,7 +26,7 @@
 
 #define MAX_TIMER_PERIOD    ((sal_uLong)0xFFFFFFFF)
 
-static void ImplStartTimer( ImplSVData* pSVData, sal_uLong nMS )
+void Timer::ImplStartTimer( ImplSVData* pSVData, sal_uLong nMS )
 {
     if ( !nMS )
         nMS = 1;
@@ -55,6 +55,33 @@ bool Timer::ReadyForSchedule( bool bTimer )
     return (mpSchedulerData->mnUpdateTime + mnTimeout) <= tools::Time::GetSystemTicks();
 }
 
+sal_uLong Timer::UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime )
+{
+    sal_uLong nNewTime = tools::Time::GetSystemTicks();
+    sal_uLong nDeltaTime;
+    //determine smallest time slot
+    if( mpSchedulerData->mnUpdateTime == nTime )
+    {
+       nDeltaTime = mnTimeout;
+       if( nDeltaTime < nMinPeriod )
+           nMinPeriod = nDeltaTime;
+    }
+    else
+    {
+        nDeltaTime = mpSchedulerData->mnUpdateTime + mnTimeout;
+        if( nDeltaTime < nNewTime )
+            nMinPeriod = 1;
+        else
+        {
+            nDeltaTime -= nNewTime;
+            if( nDeltaTime < nMinPeriod )
+                nMinPeriod = nDeltaTime;
+        }
+    }
+
+    return nMinPeriod;
+}
+
 Timer::Timer() : Scheduler()
 {
     mnTimeout = 1;
@@ -86,7 +113,7 @@ void Timer::Start()
         pSVData->mpSalTimer->SetCallback( CallbackTaskScheduling );
     }
     if ( mnTimeout < pSVData->mnTimerPeriod )
-        ImplStartTimer( pSVData, mnTimeout );
+        Timer::ImplStartTimer( pSVData, mnTimeout );
 }
 
 void Timer::SetTimeout( sal_uLong nNewTimeout )
@@ -97,7 +124,7 @@ void Timer::SetTimeout( sal_uLong nNewTimeout )
     {
         ImplSVData* pSVData = ImplGetSVData();
         if ( !pSVData->mnTimerUpdate && (mnTimeout < pSVData->mnTimerPeriod) )
-            ImplStartTimer( pSVData, mnTimeout );
+            Timer::ImplStartTimer( pSVData, mnTimeout );
     }
 }
 
commit b11dba5be288ca5aaed1403093033708f7091c42
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Thu Mar 5 11:57:50 2015 +0000

    Clean up minor fixes
    
    Change-Id: Icdf85d6f6f5734a3cf952def8782efe9edc7c0a9

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 33fbf0a..0064ec0 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -346,7 +346,7 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
     //while ( pSVData->mbNotAllTimerCalled )
     //    Timer::ImplTimerCallbackProc();
 
-    //Process all idles
+    //Process all Tasks
     Scheduler::ProcessTaskScheduling(false);
 
     pSVData->maAppData.mnDispatchLevel++;
@@ -367,6 +367,7 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
     // e.g. on OS X; need to trigger timer checks manually
     if( pSVData->maAppData.mbNoYield )
     {
+        //Process all timers
         Scheduler::ProcessTaskScheduling(true);
     }
 
commit 49439d4a67b06227e56a2855c856e3482323a28a
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Wed Mar 4 14:13:52 2015 +0000

    Timer: patch for commit 06d7314
    
    Change-Id: I762062a4782438ec5bbcb53da9a42f44db65c40d

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index a18aa71..af17016 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -83,7 +83,7 @@ public:
     static void ImplDeInitScheduler();
 
     /// Process all pending idle tasks ahead of time in priority order.
-    static void CallbackTaskScheduling();
+    static void CallbackTaskScheduling( bool ignore );
     static void ProcessTaskScheduling( bool bTimer );
 };
 
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 01fd36c..d2db1d4 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -44,7 +44,7 @@ public:
     void            SetTimeoutHdl( const Link& rLink ) { maTimeoutHdl = rLink; }
     const Link&     GetTimeoutHdl() const { return maTimeoutHdl; }
     virtual void    Invoke() SAL_OVERRIDE;
-    virtual void    Timeout() { Invoke(); }
+    void    Timeout() { Invoke(); }
     Timer&          operator=( const Timer& rTimer );
     void            Start() SAL_OVERRIDE;
 };
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index fcaeb35..06de1ba 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -90,8 +90,9 @@ void Scheduler::ImplDeInitScheduler()
     }
 }
 
-void Scheduler::CallbackTaskScheduling()
+void Scheduler::CallbackTaskScheduling(bool ignore)
 {
+    (void)ignore;
     Scheduler::ProcessTaskScheduling( true );
 }
 
commit ff52f4e417eb4de5e85388a48a650429b1880762
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Tue Mar 3 13:30:11 2015 +0000

    Timer: Faster Word Count
    
    Change-Id: I45d6fc28e898b945c7754b9ee1f2842247a071e6

diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx b/sw/source/core/doc/DocumentStatisticsManager.cxx
index 989d548..fca66719 100644
--- a/sw/source/core/doc/DocumentStatisticsManager.cxx
+++ b/sw/source/core/doc/DocumentStatisticsManager.cxx
@@ -72,7 +72,8 @@ namespace sw
 DocumentStatisticsManager::DocumentStatisticsManager( SwDoc& i_rSwdoc ) : m_rDoc( i_rSwdoc ),
                                                                           mpDocStat( new SwDocStat )
 {
-    maStatsUpdateTimer.SetTimeout( 100 );
+    maStatsUpdateTimer.SetTimeout( 1 );
+    maStatsUpdateTimer.SetPriority( SchedulerPriority::LOWEST );
     maStatsUpdateTimer.SetTimeoutHdl( LINK( this, DocumentStatisticsManager, DoIdleStatsUpdate ) );
 }
 
commit d411dca1ea6bfccb7090d4ceab15119253cac5bf
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Tue Mar 3 12:55:27 2015 +0000

    Timer Idle: adapted unit tests to new classes
    
    Change-Id: I15654a7aa5a99cb3aa6f8ba222cf2aa1d2f040ab

diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index 5abdb52..5b81281 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -93,7 +93,7 @@ public:
         Start();
         mrBool = false;
     }
-    virtual void DoIdle() SAL_OVERRIDE
+    virtual void Invoke() SAL_OVERRIDE
     {
         mrBool = true;
         Application::EndYield();
@@ -104,7 +104,7 @@ void TimerTest::testIdle()
 {
     bool bTriggered = false;
     IdleBool aTest( bTriggered );
-    Idle::ProcessAllIdleHandlers();
+    Scheduler::ProcessTaskScheduling(false);
     CPPUNIT_ASSERT_MESSAGE("watchdog triggered", bTriggered);
 }
 
@@ -121,7 +121,7 @@ public:
         Start();
         mrBool = false;
     }
-    virtual void Timeout() SAL_OVERRIDE
+    virtual void Invoke() SAL_OVERRIDE
     {
         mrBool = true;
         Application::EndYield();
@@ -156,7 +156,7 @@ public:
         Start();
         mrCount = 0;
     }
-    virtual void Timeout() SAL_OVERRIDE
+    virtual void Invoke() SAL_OVERRIDE
     {
         mrCount++;
     }
@@ -181,7 +181,7 @@ public:
         SetTimeout( nMS );
         Start();
     }
-    virtual void Timeout() SAL_OVERRIDE
+    virtual void Invoke() SAL_OVERRIDE
     {
         for (int i = 0; i < 100; i++)
             Application::Yield();
@@ -211,7 +211,7 @@ public:
         Start();
         mbSlow = false;
     }
-    virtual void Timeout() SAL_OVERRIDE
+    virtual void Invoke() SAL_OVERRIDE
     {
         TimeValue aWait;
         aWait.Seconds = 1;
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index e2465fe..fcaeb35 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -53,12 +53,7 @@ ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( bool bTimer )
             // the priority of the most urgent, the priority of most urgent is increased and
             // the current is the new most urgent. So starving is impossible.
             if ( p->mpScheduler->GetPriority() < pMostUrgent->mpScheduler->GetPriority() )
-            {
-                pMostUrgent->mpScheduler->SetSchedulingPriority( pMostUrgent->mpScheduler->GetPriority());
                 pMostUrgent = p;
-            }
-            else
-                p->mpScheduler->SetSchedulingPriority( p->mpScheduler->GetPriority());
         }
     }
 
commit f384496d125255a94bfd5978e0cbe44d6d046adb
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Thu Feb 26 15:47:07 2015 +0000

    Timer to idle
    
    Change-Id: Iaac3618501b4e382afe8d183836a370eea699af4

diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx
index aae31ff..b7982a7 100644
--- a/sw/source/core/doc/DocumentTimerManager.cxx
+++ b/sw/source/core/doc/DocumentTimerManager.cxx
@@ -41,44 +41,44 @@ DocumentTimerManager::DocumentTimerManager( SwDoc& i_rSwdoc ) : m_rDoc( i_rSwdoc
                                                                 mbStartIdleTimer( false ),
                                                                 mIdleBlockCount( 0 )
 {
-    maIdleTimer.SetTimeout( 600 );
-    maIdleTimer.SetTimeoutHdl( LINK( this, DocumentTimerManager, DoIdleJobs) );
+    maIdle.SetPriority( SchedulerPriority::LOWEST );
+    maIdle.SetIdleHdl( LINK( this, DocumentTimerManager, DoIdleJobs) );
 }
 
 void DocumentTimerManager::StartIdling()
 {
     mbStartIdleTimer = true;
     if( !mIdleBlockCount )
-        maIdleTimer.Start();
+        maIdle.Start();
 }
 
 void DocumentTimerManager::StopIdling()
 {
     mbStartIdleTimer = false;
-    maIdleTimer.Stop();
+    maIdle.Stop();
 }
 
 void DocumentTimerManager::BlockIdling()
 {
-    maIdleTimer.Stop();
+    maIdle.Stop();
     ++mIdleBlockCount;
 }
 
 void DocumentTimerManager::UnblockIdling()
 {
     --mIdleBlockCount;
-    if( !mIdleBlockCount && mbStartIdleTimer && !maIdleTimer.IsActive() )
-        maIdleTimer.Start();
+    if( !mIdleBlockCount && mbStartIdleTimer && !maIdle.IsActive() )
+        maIdle.Start();
 }
 
 void DocumentTimerManager::StartBackgroundJobs()
 {
     // Trigger DoIdleJobs(), asynchronously.
-    if (!maIdleTimer.IsActive()) //fdo#73165 if the timer is already running don't restart from 0
-        maIdleTimer.Start();
+    if (!maIdle.IsActive()) //fdo#73165 if the timer is already running don't restart from 0
+        maIdle.Start();
 }
 
-IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer*, pTimer )
+IMPL_LINK( DocumentTimerManager, DoIdleJobs, Idle*, pIdle )
 {
 #ifdef TIMELOG
     static ::rtl::Logfile* pModLogFile = 0;
@@ -95,7 +95,7 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer*, pTimer )
         {
             if( rSh.ActionPend() )
             {
-                pTimer->Start();
+                pIdle->Start();
                 return 0;
             }
         }
@@ -119,7 +119,7 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer*, pTimer )
                 (*pLayIter)->GetCurrShell()->LayoutIdle();
 
                 // Defer the remaining work.
-                pTimer->Start();
+                pIdle->Start();
                 return 0;
             }
         }
@@ -135,7 +135,7 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer*, pTimer )
             if ( m_rDoc.getIDocumentFieldsAccess().GetUpdtFlds().IsInUpdateFlds() ||
                  m_rDoc.getIDocumentFieldsAccess().IsExpFldsLocked() )
             {
-                pTimer->Start();
+                pIdle->Start();
                 return 0;
             }
 
diff --git a/sw/source/core/inc/DocumentTimerManager.hxx b/sw/source/core/inc/DocumentTimerManager.hxx
index 42351cc..7bff040 100644
--- a/sw/source/core/inc/DocumentTimerManager.hxx
+++ b/sw/source/core/inc/DocumentTimerManager.hxx
@@ -23,7 +23,7 @@
 #include <IDocumentTimerAccess.hxx>
 #include <boost/utility.hpp>
 
-#include <vcl/timer.hxx>
+#include <vcl/idle.hxx>
 #include <sal/types.h>
 #include <tools/link.hxx>
 
@@ -50,7 +50,7 @@ public:
     void StartBackgroundJobs() SAL_OVERRIDE;
 
     // Our own 'IdleTimer' calls the following method
-    DECL_LINK( DoIdleJobs, Timer * );
+    DECL_LINK( DoIdleJobs, Idle * );
 
     virtual ~DocumentTimerManager();
 
@@ -60,7 +60,7 @@ private:
 
      bool mbStartIdleTimer; //< idle timer mode start/stop
      sal_Int32 mIdleBlockCount;
-     Timer  maIdleTimer;
+     Idle  maIdle;
 };
 
 }
commit f33d6800fbdc42aa75477e31be0bba5a4a5a52c1
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Thu Feb 26 07:33:59 2015 +0000

    Idle Timer: Invented Base Class
    
    Change-Id: I03db46afcc0cb5e5d7a134b1bdd327abb542e63c

diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index 3a63e6e..9cb7345 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -21,62 +21,23 @@
 #define INCLUDED_VCL_IDLE_HXX
 
 #include <tools/link.hxx>
-#include <tools/solar.h>
-#include <vcl/dllapi.h>
+#include <vcl/scheduler.hxx>
 
-struct ImplIdleData;
-struct ImplSVData;
-
-enum class IdlePriority {
-    HIGHEST   = 0,
-    HIGH      = 1,
-    REPAINT   = 2,
-    RESIZE    = 3,
-    MEDIUM    = 3,
-    LOW       = 4,
-    LOWER     = 5,
-    LOWEST    = 6
-};
-
-class VCL_DLLPUBLIC Idle
+class VCL_DLLPUBLIC Idle : public Scheduler
 {
 protected:
-    ImplIdleData*   mpIdleData;         // Pointer to element in idle list
-    sal_Int32       miPriority;         // Idle priority ( maybe divergent to default)
-    IdlePriority    meDefaultPriority;  // Default idle priority
-    bool            mbActive;           // Currently in the scheduler
     Link            maIdleHdl;          // Callback Link
 
-    friend struct ImplIdleData;
-
 public:
     Idle();
     Idle( const Idle& rIdle );
-    virtual ~Idle();
-
-    void SetPriority( IdlePriority ePriority );
-    void SetSchedulingPriority( sal_Int32 iPriority );
-    sal_Int32    GetPriority() const { return miPriority; }
-    IdlePriority GetDefaultPriority() const { return meDefaultPriority; }
 
     /// Make it possible to associate a callback with this idle handler
-    /// of course, you can also sub-class and override 'DoIdle'
+    /// of course, you can also sub-class and override 'Invoke'
     void            SetIdleHdl( const Link& rLink ) { maIdleHdl = rLink; }
     const Link&     GetIdleHdl() const { return maIdleHdl; }
-
-    // Call idle handler
-    virtual void    DoIdle();
-
-    void            Start();
-    void            Stop();
-
-    bool            IsActive() const { return mbActive; }
-
-    Idle&          operator=( const Idle& rIdle );
-    static void ImplDeInitIdle();
-
-    /// Process all pending idle tasks ahead of time in priority order.
-    static void ProcessAllIdleHandlers();
+    virtual void    Invoke() SAL_OVERRIDE;
+    Idle&           operator=( const Idle& rIdle );
 };
 
 #endif // INCLUDED_VCL_IDLE_HXX
diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
new file mode 100644
index 0000000..a18aa71
--- /dev/null
+++ b/include/vcl/scheduler.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_SCHEDULER_HXX
+#define INCLUDED_VCL_SCHEDULER_HXX
+
+#include <vcl/dllapi.h>
+
+struct ImplSVData;
+class Scheduler;
+struct ImplSchedulerData
+{
+    ImplSchedulerData*  mpNext;      // Pointer to the next element in list
+    Scheduler*          mpScheduler;      // Pointer to VCL Idle instance
+    bool                mbDelete;    // Destroy this idle?
+    bool                mbInScheduler;    // Idle handler currently processed?
+    sal_uLong           mnUpdateTime;   // Last Update Time
+    sal_uLong           mnUpdateStack;  // Update Stack on stack
+
+    void Invoke();
+
+    static ImplSchedulerData *GetMostImportantTask( bool bTimer );
+};
+
+enum class SchedulerPriority {
+    HIGHEST   = 0,
+    HIGH      = 1,
+    REPAINT   = 2,
+    RESIZE    = 3,
+    MEDIUM    = 3,
+    LOW       = 4,
+    LOWER     = 5,
+    LOWEST    = 6
+};
+
+class VCL_DLLPUBLIC Scheduler
+{
+protected:
+    ImplSchedulerData*  mpSchedulerData;    // Pointer to element in idle list
+    sal_Int32           miPriority;         // Idle priority ( maybe divergent to default)
+    SchedulerPriority   meDefaultPriority;  // Default idle priority
+    bool                mbActive;           // Currently in the scheduler
+
+    friend struct ImplSchedulerData;
+    virtual void SetDeletionFlags();
+    virtual bool ReadyForSchedule( bool bTimer ) { return !bTimer; }
+
+public:
+    Scheduler();
+    Scheduler( const Scheduler& rScheduler );
+    virtual ~Scheduler();
+
+    void SetPriority( SchedulerPriority ePriority );
+    void SetSchedulingPriority( sal_Int32 iPriority );
+    sal_Int32    GetPriority() const { return miPriority; }
+    SchedulerPriority GetDefaultPriority() const { return meDefaultPriority; }
+
+    // Call idle handler
+    virtual void    Invoke() = 0;
+
+    virtual void    Start();
+    virtual void    Stop();
+
+    bool            IsActive() const { return mbActive; }
+
+    Scheduler&          operator=( const Scheduler& Scheduler );
+    static void ImplDeInitScheduler();
+
+    /// Process all pending idle tasks ahead of time in priority order.
+    static void CallbackTaskScheduling();
+    static void ProcessTaskScheduling( bool bTimer );
+};
+
+#endif // INCLUDED_VCL_SCHEDULER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 2d0f310..01fd36c 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -21,50 +21,32 @@
 #define INCLUDED_VCL_TIMER_HXX
 
 #include <tools/link.hxx>
-#include <tools/solar.h>
-#include <vcl/dllapi.h>
+#include <vcl/scheduler.hxx>
 
-struct ImplTimerData;
-struct ImplSVData;
-
-/// Base-class for timers - usually a simple, one-shot timeout
-class VCL_DLLPUBLIC Timer
+class VCL_DLLPUBLIC Timer : public Scheduler
 {
 protected:
-    ImplTimerData*  mpTimerData;
+    Link            maTimeoutHdl;          // Callback Link
     sal_uLong       mnTimeout;
-    bool            mbActive;
     bool            mbAuto;
-    Link            maTimeoutHdl;
 
-    friend struct ImplTimerData;
+    void SetDeletionFlags() SAL_OVERRIDE;
+    bool ReadyForSchedule( bool bTimer ) SAL_OVERRIDE;
 
 public:
-                    Timer();
-                    Timer( const Timer& rTimer );
-    virtual         ~Timer();
-
-    virtual void    Timeout();
+    Timer();
+    Timer( const Timer& rTimer );
 
-    void            Start();
-    void            Stop();
-
-    /// set the timeout in milliseconds
+    /// Make it possible to associate a callback with this timer handler
+    /// of course, you can also sub-class and override 'Invoke'
     void            SetTimeout( sal_uLong nTimeoutMs );
     sal_uLong       GetTimeout() const { return mnTimeout; }
-    bool            IsActive() const { return mbActive; }
-
-    /// Make it possible to associate a callback with this timeout
     void            SetTimeoutHdl( const Link& rLink ) { maTimeoutHdl = rLink; }
     const Link&     GetTimeoutHdl() const { return maTimeoutHdl; }
-
+    virtual void    Invoke() SAL_OVERRIDE;
+    virtual void    Timeout() { Invoke(); }
     Timer&          operator=( const Timer& rTimer );
-
-    /// @internal
-    static void ImplDeInitTimer();
-    static void ImplTimerCallbackProc();
-    static bool TimerReady();
-    static bool CheckExpiredTimer(const bool bDoInvoke);
+    void            Start() SAL_OVERRIDE;
 };
 
 /// An auto-timer is a multi-shot timer re-emitting itself at
@@ -77,6 +59,7 @@ public:
 
     AutoTimer&      operator=( const AutoTimer& rTimer );
 };
+
 #endif // INCLUDED_VCL_TIMER_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index edc31e0..270ef7a 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -46,8 +46,7 @@
 #include <cppuhelper/supportsservice.hxx>
 
 #include <vcl/edit.hxx>
-#include <vcl/timer.hxx>
-#include <vcl/idle.hxx>
+#include <vcl/scheduler.hxx>
 
 #include <sfx2/unoctitm.hxx>
 #include "app.hrc"
@@ -110,8 +109,7 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a
 
     // Timers may access the SfxApplication and are only deleted in
     // Application::Quit(), which is asynchronous (PostUserEvent) - disable!
-    Timer::ImplDeInitTimer();
-    Idle::ImplDeInitIdle();
+    Scheduler::ImplDeInitScheduler();
 
     SfxApplication* pApp = SfxGetpApp();
     pApp->Broadcast( SfxSimpleHint( SFX_HINT_DEINITIALIZING ) );
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index b720f96..006a216 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -91,7 +91,7 @@
 #include <vcl/fixed.hxx>
 #include <vcl/floatwin.hxx>
 #include <vcl/group.hxx>
-#include <vcl/idle.hxx>
+#include <vcl/scheduler.hxx>
 #include <vcl/imgctrl.hxx>
 #include <vcl/longcurr.hxx>
 #include <vcl/lstbox.hxx>
@@ -1869,7 +1869,7 @@ void SAL_CALL VCLXToolkit::processEventsToIdle()
     throw (::com::sun::star::uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aSolarGuard;
-    Idle::ProcessAllIdleHandlers();
+    Scheduler::ProcessTaskScheduling(false);
 }
 
 }
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index e468df4..08b08e9 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -329,6 +329,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 	vcl/source/app/idle \
     vcl/source/app/idlemgr \
     vcl/source/app/salvtables \
+	vcl/source/app/scheduler \
     vcl/source/app/session \
     vcl/source/app/settings \
     vcl/source/app/IconThemeInfo \
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index b227173..132c272 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -311,8 +311,7 @@ struct ImplSVData
     bool                    mbDeInit;                       // Is VCL deinitializing
     sal_uLong               mnThreadCount;                  // is VCL MultiThread enabled
     ImplConfigData*         mpFirstConfigData;              // pointer to the first config block
-    ImplTimerData*          mpFirstTimerData;               // list of all running timers
-    ImplIdleData*           mpFirstIdleData;                // list of all running idles
+    ImplSchedulerData*      mpFirstSchedulerData;           // list of all running tasks
     SalTimer*               mpSalTimer;                     // interface to sal event loop/timers
     SalI18NImeStatus*       mpImeStatus;                    // interface to ime status window
     SalSystem*              mpSalSystem;                    // SalSystem interface
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index 09ffbc7..7fe239d 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -17,220 +17,27 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <vcl/svapp.hxx>
 #include <vcl/idle.hxx>
-#include <vcl/timer.hxx>
 
-#include <svdata.hxx>
-#include <salinst.hxx>
-
-struct ImplIdleData
-{
-    ImplIdleData*   mpNext;      // Pointer to the next element in list
-    Idle*           mpIdle;      // Pointer to VCL Idle instance
-    bool            mbDelete;    // Destroy this idle?
-    bool            mbInIdle;    // Idle handler currently processed?
-
-    void Invoke()
-    {
-        if (mbDelete || mbInIdle )
-            return;
-
-        mpIdle->SetSchedulingPriority(static_cast<sal_Int32>(mpIdle->GetDefaultPriority()));
-        mbDelete = true;
-        mpIdle->mbActive = false;
-
-        // invoke it
-        mbInIdle = true;
-        mpIdle->DoIdle();
-        mbInIdle = false;
-    }
-
-    static ImplIdleData *GetFirstIdle()
-    {
-        ImplSVData*     pSVData = ImplGetSVData();
-        ImplIdleData *pMostUrgent = NULL;
-
-        for ( ImplIdleData *p = pSVData->mpFirstIdleData; p; p = p->mpNext )
-        {
-            if ( !p->mpIdle || p->mbDelete )
-                continue;
-            if (!pMostUrgent)
-                pMostUrgent = p;
-            else
-            {
-                // Find the highest priority.
-                // If the priority of the current idle is higher (numerical value is lower) than
-                // the priority of the most urgent, the priority of most urgent is increased and
-                // the current is the new most urgent. So starving is impossible.
-                if ( p->mpIdle->GetPriority() < pMostUrgent->mpIdle->GetPriority() )
-                {
-                    pMostUrgent->mpIdle->SetSchedulingPriority( pMostUrgent->mpIdle->GetPriority() - 1);
-                    pMostUrgent = p;
-                }
-                else
-                    p->mpIdle->SetSchedulingPriority( p->mpIdle->GetPriority() - 1);
-            }
-        }
-
-        return pMostUrgent;
-    }
-};
-
-void Idle::ImplDeInitIdle()
-{
-    ImplSVData*     pSVData = ImplGetSVData();
-    ImplIdleData*  pIdleData = pSVData->mpFirstIdleData;
-
-    if ( pIdleData )
-    {
-        do
-        {
-            ImplIdleData* pTempIdleData = pIdleData;
-            if ( pIdleData->mpIdle )
-            {
-                pIdleData->mpIdle->mbActive = false;
-                pIdleData->mpIdle->mpIdleData = NULL;
-            }
-            pIdleData = pIdleData->mpNext;
-            delete pTempIdleData;
-        }
-        while ( pIdleData );
-
-        pSVData->mpFirstIdleData   = NULL;
-    }
-}
-
-void Idle::ProcessAllIdleHandlers()
-{
-    // process all pending idle
-    ImplIdleData* pIdleData = NULL;
-    ImplIdleData* pPrevIdleData = NULL;
-    ImplSVData*     pSVData = ImplGetSVData();
-    // timer can interrupt idle
-    while (!Timer::TimerReady() && (pIdleData = ImplIdleData::GetFirstIdle()))
-    {
-        pIdleData->Invoke();
-    }
-
-    pIdleData = pSVData->mpFirstIdleData;
-    while ( pIdleData )
-    {
-        // Should idle be released from scheduling?
-        if ( pIdleData->mbDelete )
-        {
-            if ( pPrevIdleData )
-                pPrevIdleData->mpNext = pIdleData->mpNext;
-            else
-                pSVData->mpFirstIdleData = pIdleData->mpNext;
-            if ( pIdleData->mpIdle )
-                pIdleData->mpIdle->mpIdleData = NULL;
-            ImplIdleData* pTempIdleData = pIdleData;
-            pIdleData = pIdleData->mpNext;
-            delete pTempIdleData;
-        }
-        else
-        {
-            pPrevIdleData = pIdleData;
-            pIdleData = pIdleData->mpNext;
-        }
-    }
-}
-
-void Idle::SetPriority( IdlePriority ePriority )
-{
-    meDefaultPriority = ePriority;
-}
-
-void Idle::SetSchedulingPriority( sal_Int32 iPriority )
-{
-    miPriority = iPriority;
-}
-
-void Idle::DoIdle()
+void Idle::Invoke()
 {
     maIdleHdl.Call( this );
 }
 
-void Idle::Start()
-{
-    // Mark timer active
-    mbActive = true;
-
-    ImplSVData* pSVData = ImplGetSVData();
-    if ( !mpIdleData )
-    {
-        // insert Idle
-        mpIdleData              = new ImplIdleData;
-        mpIdleData->mpIdle      = this;
-        mpIdleData->mbInIdle    = false;
-
-        // insert last due to SFX!
-        ImplIdleData* pPrev = NULL;
-        ImplIdleData* pData = pSVData->mpFirstIdleData;
-        while ( pData )
-        {
-            pPrev = pData;
-            pData = pData->mpNext;
-        }
-        mpIdleData->mpNext = NULL;
-        if ( pPrev )
-            pPrev->mpNext = mpIdleData;
-        else
-            pSVData->mpFirstIdleData = mpIdleData;
-    }
-    mpIdleData->mbDelete        = false;
-}
-
-void Idle::Stop()
-{
-    mbActive = false;
-
-    if ( mpIdleData )
-        mpIdleData->mbDelete = true;
-}
-
 Idle& Idle::operator=( const Idle& rIdle )
 {
-    if ( IsActive() )
-        Stop();
-
-    mbActive          = false;
-    miPriority        = rIdle.miPriority;
-    meDefaultPriority = rIdle.meDefaultPriority;
-    maIdleHdl         = rIdle.maIdleHdl;
-
-    if ( rIdle.IsActive() )
-        Start();
-
+    Scheduler::operator=(rIdle);
+    maIdleHdl = rIdle.maIdleHdl;
     return *this;
 }
 
-Idle::Idle():
-    mpIdleData(NULL),
-    miPriority(static_cast<sal_Int32>(IdlePriority::HIGH)),
-    meDefaultPriority(IdlePriority::HIGH),
-    mbActive(false)
+Idle::Idle() : Scheduler()
 {
 }
 
-Idle::Idle( const Idle& rIdle ):
-    mpIdleData(NULL),
-    miPriority(rIdle.miPriority),
-    meDefaultPriority(rIdle.meDefaultPriority),
-    mbActive(false),
-    maIdleHdl(rIdle.maIdleHdl)
+Idle::Idle( const Idle& rIdle ) : Scheduler(rIdle)
 {
-    if ( rIdle.IsActive() )
-        Start();
+    maIdleHdl = rIdle.maIdleHdl;
 }
 
-Idle::~Idle()
-{
-    if ( mpIdleData )
-    {
-        mpIdleData->mbDelete = true;
-        mpIdleData->mpIdle = NULL;
-    }
-}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
new file mode 100644
index 0000000..e2465fe
--- /dev/null
+++ b/vcl/source/app/scheduler.cxx
@@ -0,0 +1,235 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <svdata.hxx>
+#include <tools/time.hxx>
+#include <vcl/scheduler.hxx>
+
+void ImplSchedulerData::Invoke()
+{
+    if (mbDelete || mbInScheduler )
+        return;
+
+    mpScheduler->SetSchedulingPriority(static_cast<sal_Int32>(mpScheduler->GetDefaultPriority()));
+    mpScheduler->SetDeletionFlags();
+
+    // invoke it
+    mbInScheduler = true;
+    mpScheduler->Invoke();
+    mbInScheduler = false;
+}
+
+ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( bool bTimer )
+{
+    ImplSVData*     pSVData = ImplGetSVData();
+    ImplSchedulerData *pMostUrgent = NULL;
+
+    for ( ImplSchedulerData *p = pSVData->mpFirstSchedulerData; p; p = p->mpNext )
+    {
+        if ( !p->mpScheduler || p->mbDelete || p->mnUpdateStack >= pSVData->mnTimerUpdate || !p->mpScheduler->ReadyForSchedule( bTimer ) )
+            continue;
+        if (!pMostUrgent)
+            pMostUrgent = p;
+        else
+        {
+            // Find the highest priority.
+            // If the priority of the current idle is higher (numerical value is lower) than
+            // the priority of the most urgent, the priority of most urgent is increased and
+            // the current is the new most urgent. So starving is impossible.
+            if ( p->mpScheduler->GetPriority() < pMostUrgent->mpScheduler->GetPriority() )
+            {
+                pMostUrgent->mpScheduler->SetSchedulingPriority( pMostUrgent->mpScheduler->GetPriority());
+                pMostUrgent = p;
+            }
+            else
+                p->mpScheduler->SetSchedulingPriority( p->mpScheduler->GetPriority());
+        }
+    }
+
+    return pMostUrgent;
+}
+
+void Scheduler::SetDeletionFlags()
+{
+    mpSchedulerData->mbDelete = true;
+    mbActive = false;
+}
+
+void Scheduler::ImplDeInitScheduler()
+{
+    ImplSVData*     pSVData = ImplGetSVData();
+    ImplSchedulerData*  pSchedulerData = pSVData->mpFirstSchedulerData;
+
+    if ( pSchedulerData )
+    {
+        do
+        {
+            ImplSchedulerData* pTempSchedulerData = pSchedulerData;
+            if ( pSchedulerData->mpScheduler )
+            {
+                pSchedulerData->mpScheduler->mbActive = false;
+                pSchedulerData->mpScheduler->mpSchedulerData = NULL;
+            }
+            pSchedulerData = pSchedulerData->mpNext;
+            delete pTempSchedulerData;
+        }
+        while ( pSchedulerData );
+
+        pSVData->mpFirstSchedulerData   = NULL;
+    }
+}
+
+void Scheduler::CallbackTaskScheduling()
+{
+    Scheduler::ProcessTaskScheduling( true );
+}
+
+void Scheduler::ProcessTaskScheduling( bool bTimer )
+{
+    // process all pending Tasks
+    ImplSchedulerData* pSchedulerData = NULL;
+    ImplSchedulerData* pPrevSchedulerData = NULL;
+    ImplSVData*        pSVData = ImplGetSVData();
+    pSVData->mnTimerUpdate++;
+
+    if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bTimer)))
+    {
+        pSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks();
+        pSchedulerData->Invoke();
+    }
+
+    pSchedulerData = pSVData->mpFirstSchedulerData;
+    while ( pSchedulerData )
+    {
+        // Should Task be released from scheduling?
+        if ( pSchedulerData->mbDelete )
+        {
+            if ( pPrevSchedulerData )
+                pPrevSchedulerData->mpNext = pSchedulerData->mpNext;
+            else
+                pSVData->mpFirstSchedulerData = pSchedulerData->mpNext;
+            if ( pSchedulerData->mpScheduler )
+                pSchedulerData->mpScheduler->mpSchedulerData = NULL;
+            ImplSchedulerData* pTempSchedulerData = pSchedulerData;
+            pSchedulerData = pSchedulerData->mpNext;
+            delete pTempSchedulerData;
+        }
+        else
+        {
+            if( !pSchedulerData->mbInScheduler )
+                pSchedulerData->mnUpdateStack = 0;
+            pPrevSchedulerData = pSchedulerData;
+            pSchedulerData = pSchedulerData->mpNext;
+        }
+    }
+    pSVData->mnTimerUpdate--;
+}
+
+void Scheduler::SetPriority( SchedulerPriority ePriority )
+{
+    meDefaultPriority = ePriority;
+}
+
+void Scheduler::SetSchedulingPriority( sal_Int32 iPriority )
+{
+    miPriority = iPriority;
+}
+
+void Scheduler::Start()
+{
+    // Mark timer active
+    mbActive = true;
+
+    ImplSVData* pSVData = ImplGetSVData();
+    if ( !mpSchedulerData )
+    {
+        // insert Idle
+        mpSchedulerData                = new ImplSchedulerData;
+        mpSchedulerData->mpScheduler   = this;
+        mpSchedulerData->mbInScheduler = false;
+
+        // insert last due to SFX!
+        ImplSchedulerData* pPrev = NULL;
+        ImplSchedulerData* pData = pSVData->mpFirstSchedulerData;
+        while ( pData )
+        {
+            pPrev = pData;
+            pData = pData->mpNext;
+        }
+        mpSchedulerData->mpNext = NULL;
+        if ( pPrev )
+            pPrev->mpNext = mpSchedulerData;
+        else
+            pSVData->mpFirstSchedulerData = mpSchedulerData;
+    }
+    mpSchedulerData->mbDelete      = false;
+    mpSchedulerData->mnUpdateTime  = tools::Time::GetSystemTicks();
+    mpSchedulerData->mnUpdateStack = pSVData->mnTimerUpdate;
+}
+
+void Scheduler::Stop()
+{
+    mbActive = false;
+
+    if ( mpSchedulerData )
+        mpSchedulerData->mbDelete = true;
+}
+
+Scheduler& Scheduler::operator=( const Scheduler& rScheduler )
+{
+    if ( IsActive() )
+        Stop();
+
+    mbActive          = false;
+    miPriority        = rScheduler.miPriority;
+    meDefaultPriority = rScheduler.meDefaultPriority;
+
+    if ( rScheduler.IsActive() )
+        Start();
+
+    return *this;
+}
+
+Scheduler::Scheduler():
+    mpSchedulerData(NULL),
+    miPriority(static_cast<sal_Int32>(SchedulerPriority::HIGH)),
+    meDefaultPriority(SchedulerPriority::HIGH),
+    mbActive(false)
+{
+}
+
+Scheduler::Scheduler( const Scheduler& rScheduler ):
+    mpSchedulerData(NULL),
+    miPriority(rScheduler.miPriority),
+    meDefaultPriority(rScheduler.meDefaultPriority),
+    mbActive(false)
+{
+    if ( rScheduler.IsActive() )
+        Start();
+}
+
+Scheduler::~Scheduler()
+{
+    if ( mpSchedulerData )
+    {
+        mpSchedulerData->mbDelete = true;
+        mpSchedulerData->mpScheduler = NULL;
+    }
+}
+
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index f569bf9..33fbf0a 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -45,7 +45,7 @@
 #include "vcl/cvtgrf.hxx"
 #include "vcl/unowrap.hxx"
 #include "vcl/timer.hxx"
-#include "vcl/idle.hxx"
+#include "vcl/scheduler.hxx"
 #include "vcl/unohelp.hxx"
 #include "vcl/lazydelete.hxx"
 
@@ -343,11 +343,11 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
     ImplSVData* pSVData = ImplGetSVData();
 
     // run timers that have timed out
-    while ( pSVData->mbNotAllTimerCalled )
-        Timer::ImplTimerCallbackProc();
+    //while ( pSVData->mbNotAllTimerCalled )
+    //    Timer::ImplTimerCallbackProc();
 
     //Process all idles
-    Idle::Idle::ProcessAllIdleHandlers();
+    Scheduler::ProcessTaskScheduling(false);
 
     pSVData->maAppData.mnDispatchLevel++;
     // do not wait for events if application was already quit; in that
@@ -367,11 +367,7 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
     // e.g. on OS X; need to trigger timer checks manually
     if( pSVData->maAppData.mbNoYield )
     {
-        do
-        {
-            Timer::ImplTimerCallbackProc( !i_bWait );
-        }
-        while( pSVData->mbNotAllTimerCalled );
+        Scheduler::ProcessTaskScheduling(true);
     }
 
     // call post yield listeners
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 96302e8..43f76be 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -33,7 +33,7 @@
 #include "vcl/svapp.hxx"
 #include "vcl/wrkwin.hxx"
 #include "vcl/cvtgrf.hxx"
-#include "vcl/idle.hxx"
+#include "vcl/scheduler.hxx"
 #include "vcl/image.hxx"
 #include "vcl/settings.hxx"
 #include "vcl/unowrap.hxx"
@@ -387,8 +387,8 @@ void DeInitVCL()
 
     if ( pSVData->maAppData.mpIdleMgr )
         delete pSVData->maAppData.mpIdleMgr;
-    Timer::ImplDeInitTimer();
-    Idle::ImplDeInitIdle();
+    //Timer::ImplDeInitTimer();
+    Scheduler::ImplDeInitScheduler();
 
     if ( pSVData->maWinData.mpMsgBoxImgList )
     {
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 97ab45c..b8be2d7 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -18,83 +18,14 @@
  */
 
 #include <tools/time.hxx>
-
-#include <vcl/svapp.hxx>
 #include <vcl/timer.hxx>
-
 #include <saltimer.hxx>
 #include <svdata.hxx>
 #include <salinst.hxx>
+#include <vcl/scheduler.hxx>
 
 #define MAX_TIMER_PERIOD    ((sal_uLong)0xFFFFFFFF)
 
-struct ImplTimerData
-{
-    ImplTimerData*  mpNext;         // Pointer to the next Instance
-    Timer*          mpTimer;        // Pointer to VCL Timer instance
-    sal_uLong       mnUpdateTime;   // Last Update Time
-    sal_uLong       mnTimerUpdate;  // TimerCallbackProcs on stack
-    bool            mbDelete;       // Was timer deleted during Update()?
-    bool            mbInTimeout;    // Are we in a timeout handler?
-
-    void Invoke()
-    {
-        if (mbDelete || mbInTimeout )
-            return;
-
-        // if no AutoTimer than stop
-        if ( !mpTimer->mbAuto )
-        {
-            mbDelete = true;
-            mpTimer->mbActive = false;
-        }
-
-        // invoke it
-        mbInTimeout = true;
-        mpTimer->Timeout();
-        mbInTimeout = false;
-    }
-
-    sal_uLong GetDeadline()
-    {
-        return mnUpdateTime + mpTimer->mnTimeout;
-    }
-};
-
-void Timer::ImplDeInitTimer()
-{
-    ImplSVData*     pSVData = ImplGetSVData();
-    ImplTimerData*  pTimerData = pSVData->mpFirstTimerData;
-
-    // on WNT the timer queue thread needs killing
-    if (pSVData->mpSalTimer)
-    {
-        pSVData->mpSalTimer->Stop();
-    }
-
-    if ( pTimerData )
-    {
-        do
-        {
-            ImplTimerData* pTempTimerData = pTimerData;
-            if ( pTimerData->mpTimer )
-            {
-                pTimerData->mpTimer->mbActive = false;
-                pTimerData->mpTimer->mpTimerData = NULL;
-            }
-            pTimerData = pTimerData->mpNext;
-            delete pTempTimerData;
-        }
-        while ( pTimerData );
-
-        pSVData->mpFirstTimerData   = NULL;
-        pSVData->mnTimerPeriod      = 0;
-    }
-
-    delete pSVData->mpSalTimer;
-    pSVData->mpSalTimer = 0;
-}
-
 static void ImplStartTimer( ImplSVData* pSVData, sal_uLong nMS )
 {
     if ( !nMS )
@@ -108,159 +39,59 @@ static void ImplStartTimer( ImplSVData* pSVData, sal_uLong nMS )
     }
 }
 
-void Timer::ImplTimerCallbackProc( bool idle )
+void Timer::SetDeletionFlags()
 {
-    ImplSVData*     pSVData = ImplGetSVData();
-    ImplTimerData*  pTimerData;
-    ImplTimerData*  pPrevTimerData;
-    sal_uLong       nMinPeriod = MAX_TIMER_PERIOD;
-    sal_uLong       nDeltaTime;
-    sal_uLong       nTime = tools::Time::GetSystemTicks();
-
-    pSVData->mnTimerUpdate++;
-    pSVData->mbNotAllTimerCalled = true;
-
-    Timer::CheckExpiredTimer(true);
-
-    // determine new time
-    sal_uLong nNewTime = tools::Time::GetSystemTicks();
-    pPrevTimerData = NULL;
-    pTimerData = pSVData->mpFirstTimerData;
-    while ( pTimerData )
-    {
-        // ignore if timer is still in timeout handler
-        if ( pTimerData->mbInTimeout )
-        {
-            pPrevTimerData = pTimerData;
-            pTimerData = pTimerData->mpNext;
-        }
-        // Was timer destroyed in the meantime?
-        else if ( pTimerData->mbDelete )
-        {
-            if ( pPrevTimerData )
-                pPrevTimerData->mpNext = pTimerData->mpNext;
-            else
-                pSVData->mpFirstTimerData = pTimerData->mpNext;
-            if ( pTimerData->mpTimer )
-                pTimerData->mpTimer->mpTimerData = NULL;
-            ImplTimerData* pTempTimerData = pTimerData;
-            pTimerData = pTimerData->mpNext;
-            delete pTempTimerData;
-        }
-        else
+        // if no AutoTimer than stop
+        if ( !mbAuto )
         {
-            pTimerData->mnTimerUpdate = 0;
-            // determine smallest time slot
-            if ( pTimerData->mnUpdateTime == nTime )
-            {
-                nDeltaTime = pTimerData->mpTimer->mnTimeout;
-                if ( nDeltaTime < nMinPeriod )
-                    nMinPeriod = nDeltaTime;
-            }
-            else
-            {
-                nDeltaTime = pTimerData->mnUpdateTime + pTimerData->mpTimer->mnTimeout;
-                if ( nDeltaTime < nNewTime )
-                    nMinPeriod = 1;
-                else
-                {
-                    nDeltaTime -= nNewTime;
-                    if ( nDeltaTime < nMinPeriod )
-                        nMinPeriod = nDeltaTime;
-                }
-            }
-            pPrevTimerData = pTimerData;
-            pTimerData = pTimerData->mpNext;
+            mpSchedulerData->mbDelete = true;
+            mbActive = false;
         }
-    }
-
-    // delete clock if no more timers available
-    if ( !pSVData->mpFirstTimerData )
-    {
-        pSVData->mpSalTimer->Stop();
-        pSVData->mnTimerPeriod = MAX_TIMER_PERIOD;
-    }
-    else
-        ImplStartTimer( pSVData, nMinPeriod );
-
-    pSVData->mnTimerUpdate--;
-    pSVData->mbNotAllTimerCalled = false;
 }
 
-bool Timer::TimerReady()
+bool Timer::ReadyForSchedule( bool bTimer )
 {
-    return Timer::CheckExpiredTimer(false);
+    (void)bTimer;
+    return (mpSchedulerData->mnUpdateTime + mnTimeout) <= tools::Time::GetSystemTicks();
 }
 
-bool Timer::CheckExpiredTimer(bool bDoInvoke)
+Timer::Timer() : Scheduler()
 {
-// find timer where the timer handler needs to be called
-    ImplSVData*     pSVData = ImplGetSVData();
-    ImplTimerData* pTimerData = pSVData->mpFirstTimerData;
-    sal_uLong       nTime = tools::Time::GetSystemTicks();
-    bool            timerExpired = false;
-    while ( pTimerData )
-    {
-        // If the timer is not new, was not deleted, and if it is not in the timeout handler, then
-        // call the handler as soon as the time is up.
-        if ( (pTimerData->mnTimerUpdate < pSVData->mnTimerUpdate) &&
-             !pTimerData->mbDelete && !pTimerData->mbInTimeout)
-        {
-            // time has expired
-            if ( pTimerData->GetDeadline() <= nTime )
-            {
-                if(bDoInvoke)
-                {
-                    //Set new update Timer
-                    pTimerData->mnUpdateTime = nTime;
-                    pTimerData->Invoke();
-                }
-                timerExpired = true;
-            }
-        }
-
-        pTimerData = pTimerData->mpNext;
-    }
-    return timerExpired;
+    mnTimeout = 1;
+    mbAuto = false;
+    miPriority= static_cast<sal_Int32>(SchedulerPriority::HIGHEST);
+    meDefaultPriority = SchedulerPriority::HIGHEST;
 }
 
-Timer::Timer():
-    mpTimerData(NULL),
-    mnTimeout(1),
-    mbActive(false),
-    mbAuto(false)
+Timer::Timer( const Timer& rTimer ) : Scheduler(rTimer)
 {
+    mnTimeout = rTimer.mnTimeout;
+    mbAuto = rTimer.mbAuto;
+    maTimeoutHdl = rTimer.maTimeoutHdl;
 }
 
-Timer::Timer( const Timer& rTimer ):
-    mpTimerData(NULL),
-    mnTimeout(rTimer.mnTimeout),
-    mbActive(false),
-    mbAuto(false),
-    maTimeoutHdl(rTimer.maTimeoutHdl)
+void Timer::Invoke()
 {
-    if ( rTimer.IsActive() )
-        Start();
+    maTimeoutHdl.Call( this );
 }
 
-Timer::~Timer()
+void Timer::Start()
 {
-    if ( mpTimerData )
+    Scheduler::Start();
+    ImplSVData*     pSVData = ImplGetSVData();
+    if( ! pSVData->mpSalTimer )
     {
-        mpTimerData->mbDelete = true;
-        mpTimerData->mpTimer = NULL;
-     }
-}
-
-void Timer::Timeout()
-{
-    maTimeoutHdl.Call( this );
+        pSVData->mnTimerPeriod = MAX_TIMER_PERIOD;
+        pSVData->mpSalTimer = pSVData->mpDefInst->CreateSalTimer();
+        pSVData->mpSalTimer->SetCallback( CallbackTaskScheduling );
+    }
+    if ( mnTimeout < pSVData->mnTimerPeriod )
+        ImplStartTimer( pSVData, mnTimeout );
 }
 
 void Timer::SetTimeout( sal_uLong nNewTimeout )
 {
     mnTimeout = nNewTimeout;
-
     // if timer is active then renew clock
     if ( mbActive )
     {
@@ -270,80 +101,12 @@ void Timer::SetTimeout( sal_uLong nNewTimeout )
     }
 }
 
-void Timer::Start()
-{
-    mbActive = true;
-
-    ImplSVData* pSVData = ImplGetSVData();
-    if ( !mpTimerData )
-    {
-        if ( !pSVData->mpFirstTimerData )
-        {
-            pSVData->mnTimerPeriod = MAX_TIMER_PERIOD;
-            if( ! pSVData->mpSalTimer )
-            {
-                pSVData->mpSalTimer = pSVData->mpDefInst->CreateSalTimer();
-                pSVData->mpSalTimer->SetCallback( ImplTimerCallbackProc );
-            }
-        }
-
-        // insert timer and start
-        mpTimerData = new ImplTimerData;
-        mpTimerData->mpTimer        = this;
-        mpTimerData->mnUpdateTime   = tools::Time::GetSystemTicks();
-        mpTimerData->mnTimerUpdate  = pSVData->mnTimerUpdate;
-        mpTimerData->mbDelete       = false;
-        mpTimerData->mbInTimeout    = false;
-
-        // insert last due to SFX!
-        ImplTimerData* pPrev = NULL;
-        ImplTimerData* pData = pSVData->mpFirstTimerData;
-        while ( pData )
-        {
-            pPrev = pData;
-            pData = pData->mpNext;
-        }
-        mpTimerData->mpNext = NULL;
-        if ( pPrev )
-            pPrev->mpNext = mpTimerData;
-        else
-            pSVData->mpFirstTimerData = mpTimerData;
-
-        if ( mnTimeout < pSVData->mnTimerPeriod )
-            ImplStartTimer( pSVData, mnTimeout );
-    }
-    else if( !mpTimerData->mpTimer ) // TODO: remove when guilty found
-    {
-        OSL_FAIL( "Timer::Start() on a destroyed Timer!" );
-    }
-    else
-    {
-        mpTimerData->mnUpdateTime    = tools::Time::GetSystemTicks();
-        mpTimerData->mnTimerUpdate   = pSVData->mnTimerUpdate;
-        mpTimerData->mbDelete        = false;
-    }
-}
-
-void Timer::Stop()
-{
-    mbActive = false;
-
-    if ( mpTimerData )
-        mpTimerData->mbDelete = true;
-}
-
 Timer& Timer::operator=( const Timer& rTimer )
 {
-    if ( IsActive() )
-        Stop();
-
-    mbActive        = false;
-    mnTimeout       = rTimer.mnTimeout;
-    maTimeoutHdl    = rTimer.maTimeoutHdl;
-
-    if ( rTimer.IsActive() )
-        Start();
-
+    Scheduler::operator=(rTimer);
+    maTimeoutHdl = rTimer.maTimeoutHdl;
+    mnTimeout = rTimer.mnTimeout;
+    mbAuto = rTimer.mbAuto;
     return *this;
 }
 
commit 8f9b0c869222e57f738bc25d51cc6364e3c6a65a
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Thu Feb 26 07:28:54 2015 +0000

    Idle: Changed to new enum name
    
    Change-Id: Id3852abe9bc7bbe774331a7d691abd2a79ff59b4

diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 3c20767..d41783ff 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -187,7 +187,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
         maMinSize.Height() = ( maMinSize.Height() << 1 ) + AVMEDIA_CONTROLOFFSET;
     }
 
-    maIdle.SetPriority( IdlePriority::LOW );
+    maIdle.SetPriority( SchedulerPriority::LOW );
     maIdle.SetIdleHdl( LINK( this, MediaControl, implTimeoutHdl ) );
     maIdle.Start();
 }
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx
index 22658db..f820e9c 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -263,7 +263,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 = css::uno::Reference< css::uno::XInterface >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
         m_xPlayer->start();
-        m_aUpdateIdle.SetPriority( IdlePriority::LOWER );
+        m_aUpdateIdle.SetPriority( SchedulerPriority::LOWER );
         m_aUpdateIdle.Start();
     }
     catch( css::uno::Exception& e )
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 69b5665..58a28f8 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -969,7 +969,7 @@ void EditorWindow::CreateEditEngine()
 
     ImplSetFont();
 
-    aSyntaxIdle.SetPriority( IdlePriority::LOWER );
+    aSyntaxIdle.SetPriority( SchedulerPriority::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 9b4bb81..2847f58 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -220,7 +220,7 @@ DlgEditor::DlgEditor (
     m_ClipboardDataFlavorsResource[1].HumanPresentableName = "Dialog 8.0" ;
     m_ClipboardDataFlavorsResource[1].DataType =             ::getCppuType( (const Sequence< sal_Int8 >*) 0 );
 
-    aMarkIdle.SetPriority(IdlePriority::LOW);
+    aMarkIdle.SetPriority(SchedulerPriority::LOW);
     aMarkIdle.SetIdleHdl( LINK( this, DlgEditor, MarkTimeout ) );
 
     rWindow.SetMapMode( MapMode( MAP_100TH_MM ) );
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index f9def83..6b77813 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -560,7 +560,7 @@ GL3DBarChart::GL3DBarChart(
         {
             mbAutoFly = atoi(aAutoFly);
         }
-        maIdle.SetPriority(IdlePriority::REPAINT);
+        maIdle.SetPriority(SchedulerPriority::REPAINT);
         maIdle.SetIdleHdl(LINK(this, GL3DBarChart, UpdateTimerHdl));
         maIdle.Start();
         osl_getSystemTime(&maFPSRenderStartTime);
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 8610c0e..f8c6c50 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -452,7 +452,7 @@ short ActualizeProgress::Execute()
     if ( pIdle )
     {
         pIdle->SetIdleHdl( LINK( this, ActualizeProgress, TimeoutHdl ) );
-        pIdle->SetPriority( IdlePriority::LOWEST );
+        pIdle->SetPriority( SchedulerPriority::LOWEST );
         pIdle->Start();
     }
 
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index b588ea1..3535828 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -125,7 +125,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( IdlePriority::LOWEST );
+    aUpdateIdle.SetPriority( SchedulerPriority::LOWEST );
 
     m_pPbOpenSource->Hide();
 
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index f24ab65..5ad4a5d 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -61,7 +61,7 @@ LookUpComboBox::LookUpComboBox(vcl::Window *pParent)
     EnableAutoSize(true);
 
     m_aModifyIdle.SetIdleHdl( LINK( this, LookUpComboBox, ModifyTimer_Hdl ) );
-    m_aModifyIdle.SetPriority( IdlePriority::LOWEST );
+    m_aModifyIdle.SetPriority( SchedulerPriority::LOWEST );
 
     EnableAutocomplete( false );
 }
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 8572b79..3c01c4f 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -182,7 +182,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(IdlePriority::LOWER);
+    m_aResetIdle.SetPriority(SchedulerPriority::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 4f3a148..bf58de0 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1093,7 +1093,7 @@ void SvxBackgroundTabPage::ShowSelector()
 
         // delayed loading via timer (because of UI-Update)
         pPageImpl->pLoadIdle = new Idle;
-        pPageImpl->pLoadIdle->SetPriority( IdlePriority::LOWEST );
+        pPageImpl->pLoadIdle->SetPriority( SchedulerPriority::LOWEST );
         pPageImpl->pLoadIdle->SetIdleHdl(
             LINK( this, SvxBackgroundTabPage, LoadIdleHdl_Impl ) );
 
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index c0cf87a..578ce8c 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -251,7 +251,7 @@ struct SvxCharNamePage_Impl
         m_bInSearchMode ( false )
 
     {
-        m_aUpdateIdle.SetPriority( IdlePriority::LOWEST );
+        m_aUpdateIdle.SetPriority( SchedulerPriority::LOWEST );
     }
 
     ~SvxCharNamePage_Impl()
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 1a54d84..380d49c 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -192,7 +192,7 @@ void _SfxMacroTabPage::LaunchFillGroup()
     if (!mpImpl->maFillGroupIdle.GetIdleHdl().IsSet())
     {
         mpImpl->maFillGroupIdle.SetIdleHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) );
-        mpImpl->maFillGroupIdle.SetPriority( IdlePriority::HIGHEST );
+        mpImpl->maFillGroupIdle.SetPriority( SchedulerPriority::HIGHEST );
         mpImpl->maFillGroupIdle.Start();
     }
 }
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index 200bf50..a6ec039 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -1048,7 +1048,7 @@ bool OJoinTableView::ScrollWhileDragging()
     // resetting timer, if still necessary
     if (bNeedScrollTimer)
     {
-        m_aDragScrollIdle.SetPriority(IdlePriority::LOW);
+        m_aDragScrollIdle.SetPriority(SchedulerPriority::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 3fb4919..cd4e2a5 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -709,7 +709,7 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager)
 
     m_pUpdateBtn->Enable(false);
 
-    m_aIdle.SetPriority(IdlePriority::LOWEST);
+    m_aIdle.SetPriority(SchedulerPriority::LOWEST);
     m_aIdle.SetIdleHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) );
 }
 
@@ -1191,7 +1191,7 @@ UpdateRequiredDialog::UpdateRequiredDialog(vcl::Window *pParent, TheExtensionMan
     m_pUpdateBtn->Enable( false );
     m_pCloseBtn->GrabFocus();
 
-    m_aIdle.SetPriority( IdlePriority::MEDIUM );
+    m_aIdle.SetPriority( SchedulerPriority::MEDIUM );
     m_aIdle.SetIdleHdl( LINK( this, UpdateRequiredDialog, TimeOutHdl ) );
 }
 
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 604d2cb..74f89cc 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -145,7 +145,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
     aStatusTimer.SetTimeout( 200 );
     aStatusTimer.SetTimeoutHdl( LINK( this, ImpEditEngine, StatusTimerHdl ) );
 
-    aIdleFormatter.SetPriority( IdlePriority::REPAINT );
+    aIdleFormatter.SetPriority( SchedulerPriority::REPAINT );
     aIdleFormatter.SetIdleHdl( LINK( this, ImpEditEngine, IdleFormatHdl ) );
 
     aOnlineSpellTimer.SetTimeout( 100 );
diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx
index 98f39dc..954700c 100644
--- a/extensions/source/bibliography/bibcont.cxx
+++ b/extensions/source/bibliography/bibcont.cxx
@@ -127,7 +127,7 @@ BibBookContainer::BibBookContainer(vcl::Window* pParent, WinBits nStyle):
 {
     pBibMod = OpenBibModul();
     aIdle.SetIdleHdl(LINK( this, BibBookContainer, SplitHdl));
-    aIdle.SetPriority(IdlePriority::LOWEST);
+    aIdle.SetPriority(SchedulerPriority::LOWEST);
 }
 
 BibBookContainer::~BibBookContainer()
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index c59b1ab..c831dc5 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -207,7 +207,7 @@ BibToolBar::BibToolBar(vcl::Window* pParent, Link aLink, WinBits nStyle):
     Application::AddEventListener( LINK( this, BibToolBar, SettingsChanged_Impl ) );
 
     aIdle.SetIdleHdl(LINK( this, BibToolBar, SendSelHdl));
-    aIdle.SetPriority(IdlePriority::LOWEST);
+    aIdle.SetPriority(SchedulerPriority::LOWEST);
 
     SetDropdownClickHdl( LINK( this, BibToolBar, MenuHdl));
 
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index d353a37..9bbe03d 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -213,7 +213,7 @@ UpdateCheckUI::UpdateCheckUI(const uno::Reference<uno::XComponentContext>& xCont
 
     maBubbleImage = GetBubbleImage( maBubbleImageURL );
 
-    maWaitIdle.SetPriority( IdlePriority::LOWEST );
+    maWaitIdle.SetPriority( SchedulerPriority::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 e866696..2fd08c7 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -1784,7 +1784,7 @@ namespace frm
 
         doSetDelegator();
 
-        m_aChangeIdle.SetPriority(IdlePriority::LOWEST);
+        m_aChangeIdle.SetPriority(SchedulerPriority::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 c33d1e0..15ca7bd 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -1773,7 +1773,7 @@ OUString FormulaDlg::GetMeText() const
 void FormulaDlg::Update()
 {
     m_pImpl->Update();
-    m_pImpl->aIdle.SetPriority(IdlePriority::LOWER);
+    m_pImpl->aIdle.SetPriority(SchedulerPriority::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 70653dd..d6313d4 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -461,7 +461,7 @@ RefEdit::RefEdit( vcl::Window* _pParent, vcl::Window* pShrinkModeLabel, WinBits
     , pLabelWidget(pShrinkModeLabel)
 {
     aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) );
-    aIdle.SetPriority( IdlePriority::LOW );
+    aIdle.SetPriority( SchedulerPriority::LOW );
 }
 
 RefEdit::RefEdit( vcl::Window* _pParent,IControlReferenceHandler* pParent,
@@ -471,7 +471,7 @@ RefEdit::RefEdit( vcl::Window* _pParent,IControlReferenceHandler* pParent,
     , pLabelWidget(pShrinkModeLabel)
 {
     aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) );
-    aIdle.SetPriority( IdlePriority::LOW );
+    aIdle.SetPriority( SchedulerPriority::LOW );
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeRefEdit(vcl::Window *pParent, VclBuilder::stringmap &)
@@ -523,7 +523,7 @@ void RefEdit::SetReferences( IControlReferenceHandler* pDlg, vcl::Window* pLabel
     if( pDlg )
     {
         aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) );
-        aIdle.SetPriority( IdlePriority::LOW );
+        aIdle.SetPriority( SchedulerPriority::LOW );
     }
     else
     {
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index a87e3c9..aa73362 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -476,7 +476,7 @@ LngSvcMgr::LngSvcMgr()
 
     UpdateAll();
 
-    aUpdateIdle.SetPriority(IdlePriority::LOWEST);
+    aUpdateIdle.SetPriority(SchedulerPriority::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 1104bdd..96953d8 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -118,7 +118,7 @@ ODesignView::ODesignView(   vcl::Window* pParent,
     m_aSplitWin.SetAlign(WINDOWALIGN_LEFT);
     m_aSplitWin.Show();
 
-    m_aMarkIdle.SetPriority( IdlePriority::LOW );
+    m_aMarkIdle.SetPriority( SchedulerPriority::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 4a4310a..15a5a46 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -250,7 +250,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
     SetLanguage( ScGlobal::eLnge, ScGlobal::eLnge, ScGlobal::eLnge );
 
     aTrackIdle.SetIdleHdl( LINK( this, ScDocument, TrackTimeHdl ) );
-    aTrackIdle.SetPriority( IdlePriority::LOW );
+    aTrackIdle.SetPriority( SchedulerPriority::LOW );
 }
 
 sfx2::LinkManager* ScDocument::GetLinkManager()
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index d3dea90..9d80f65 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -589,7 +589,7 @@ void ScChartListenerCollection::FreeUno( const uno::Reference< chart::XChartData
 
 void ScChartListenerCollection::StartTimer()
 {
-    aIdle.SetPriority( IdlePriority::REPAINT );
+    aIdle.SetPriority( SchedulerPriority::REPAINT );
     aIdle.Start();
 }
 
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index d3abb5a..2115fec 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -174,7 +174,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
                                         ERRCODE_AREA_APP2-1,
                                         GetResMgr() );
 
-    aSpellIdle.SetPriority(IdlePriority::REPAINT);
+    aSpellIdle.SetPriority(SchedulerPriority::REPAINT);
     aSpellIdle.SetIdleHdl( LINK( this, ScModule, SpellTimerHdl ) );
     aIdleTimer.SetTimeout(SC_IDLE_MIN);
     aIdleTimer.SetTimeoutHdl( LINK( this, ScModule, IdleHandler ) );
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 2999cb2..5ac8147 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -87,7 +87,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vc
 
     // Hack: RefInput-Kontrolle
     pIdle = new Idle;
-    pIdle->SetPriority( IdlePriority::MEDIUM ); // 50ms warten
+    pIdle->SetPriority( SchedulerPriority::MEDIUM ); // 50ms warten
     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 9ab079a..4c2ea19 100644
--- a/sc/source/ui/docshell/autostyl.cxx
+++ b/sc/source/ui/docshell/autostyl.cxx
@@ -84,7 +84,7 @@ ScAutoStyleList::ScAutoStyleList(ScDocShell* pShell)
 {
     aTimer.SetTimeoutHdl( LINK( this, ScAutoStyleList, TimerHdl ) );
     aInitIdle.SetIdleHdl( LINK( this, ScAutoStyleList, InitHdl ) );
-    aInitIdle.SetPriority( IdlePriority::HIGHEST );
+    aInitIdle.SetPriority( SchedulerPriority::HIGHEST );
 }
 
 ScAutoStyleList::~ScAutoStyleList()
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 2dd6bbe..dec8991 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -103,7 +103,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
     InitLRUList();
     SetStyle(GetStyle()|WB_CLIPCHILDREN);
 
-    aIdle.SetPriority(IdlePriority::LOWER);
+    aIdle.SetPriority(SchedulerPriority::LOWER);
     aIdle.SetIdleHdl(LINK( this, ScFunctionDockWin, TimerHdl));
 
     if (pCW != NULL)
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index b4a7507..6f4fb08 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -114,13 +114,13 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window
     m_pAcceptChgCtr = new SvxAcceptChgCtr(get_content_area(), this);
     nAcceptCount=0;
     nRejectCount=0;
-    aReOpenIdle.SetPriority(IdlePriority::MEDIUM);
+    aReOpenIdle.SetPriority(SchedulerPriority::MEDIUM);
     aReOpenIdle.SetIdleHdl(LINK( this, ScAcceptChgDlg, ReOpenTimerHdl ));
 
     pTPFilter=m_pAcceptChgCtr->GetFilterPage();
     pTPView=m_pAcceptChgCtr->GetViewPage();
     pTheView=pTPView->GetTableControl();
-    aSelectionIdle.SetPriority(IdlePriority::LOW);
+    aSelectionIdle.SetPriority(SchedulerPriority::LOW);
     aSelectionIdle.SetIdleHdl(LINK( this, ScAcceptChgDlg, UpdateSelectionHdl ));
 
     pTPFilter->SetReadyHdl(LINK( this, ScAcceptChgDlg, FilterHandle ));
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 8cfed18..fc0d82c 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -767,7 +767,7 @@ ScRefHandler::ScRefHandler( vcl::Window &rWindow, SfxBindings* pB, bool bBindRef
 {
     m_aHelper.SetWindow(&m_rWindow);
     reverseUniqueHelpIdHack(m_rWindow);
-    aIdle.SetPriority(IdlePriority::LOWER);
+    aIdle.SetPriority(SchedulerPriority::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 e2d4e15..27ab197 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -420,7 +420,7 @@ ScConflictsDlg::ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScD
     m_pLbConflicts->SetSelectionMode( MULTIPLE_SELECTION );
     m_pLbConflicts->SetHighlightRange();
 
-    maSelectionIdle.SetPriority( IdlePriority::LOW );
+    maSelectionIdle.SetPriority( SchedulerPriority::LOW );
     maSelectionIdle.SetIdleHdl( LINK( this, ScConflictsDlg, UpdateSelectionHdl ) );
 
     m_pLbConflicts->SetSelectHdl( LINK( this, ScConflictsDlg, SelectHandle ) );
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 9756adc..b31623c 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -657,7 +657,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl
     aWndScenarios.SetPosPixel( aLbEntries.GetPosPixel() );
 
     aContentIdle.SetIdleHdl( LINK( this, ScNavigatorDlg, TimeHdl ) );
-    aContentIdle.SetPriority( IdlePriority::LOWEST );
+    aContentIdle.SetPriority( SchedulerPriority::LOWEST );
 
     FreeResource();
 
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index e0e6102..c0f3166 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -331,7 +331,7 @@ ScExtIButton::ScExtIButton(vcl::Window* pParent, WinBits nBits )
     : ImageButton(pParent,nBits), pPopupMenu(NULL)
 {
     nSelected=0;
-    aIdle.SetPriority(IdlePriority::LOWEST);
+    aIdle.SetPriority(SchedulerPriority::LOWEST);
     SetDropDown(PUSHBUTTON_DROPDOWN_TOOLBOX);
 }
 
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index b51fd3f..7543c77 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -775,7 +775,7 @@ void SdDrawDocument::StartOnlineSpelling(bool bForceSpelling)
         mpOnlineSpellingList->seekShape(0);
         mpOnlineSpellingIdle = new Idle();
         mpOnlineSpellingIdle->SetIdleHdl( LINK(this, SdDrawDocument, OnlineSpellingHdl) );
-        mpOnlineSpellingIdle->SetPriority(IdlePriority::LOWEST);
+        mpOnlineSpellingIdle->SetPriority(SchedulerPriority::LOWEST);
         mpOnlineSpellingIdle->Start();
     }
 }
diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx
index d0696dc..6f1ebc6 100644
--- a/sd/source/ui/dlg/brkdlg.cxx
+++ b/sd/source/ui/dlg/brkdlg.cxx
@@ -144,7 +144,7 @@ IMPL_LINK( BreakDlg, UpDate, void*, nInit )
  */
 short BreakDlg::Execute()
 {
-  aIdle.SetPriority( IdlePriority::REPAINT );
+  aIdle.SetPriority( SchedulerPriority::REPAINT );
   aIdle.SetIdleHdl( LINK( this, BreakDlg, InitialUpdate ) );
   aIdle.Start();
 
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 430c685..fbf21f5 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -585,13 +585,13 @@ AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link& rFinishLin
     maAssistentFunc.GotoPage(1);
     mpLastPageButton->Disable();
 
-    maPrevIdle.SetPriority( IdlePriority::LOWER );
+    maPrevIdle.SetPriority( SchedulerPriority::LOWER );
     maPrevIdle.SetIdleHdl( LINK( this, AssistentDlgImpl, UpdatePreviewHdl));
 
-    maEffectPrevIdle.SetPriority( IdlePriority::MEDIUM );
+    maEffectPrevIdle.SetPriority( SchedulerPriority::MEDIUM );
     maEffectPrevIdle.SetIdleHdl( LINK( this, AssistentDlgImpl, EffectPreviewHdl ));
 
-    maUpdatePageListIdle.SetPriority( IdlePriority::MEDIUM );
+    maUpdatePageListIdle.SetPriority( SchedulerPriority::MEDIUM );
     maUpdatePageListIdle.SetIdleHdl( LINK( this, AssistentDlgImpl, UpdatePageListHdl));
 
     SetStartType( ST_EMPTY );
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 2b9cdcc..a749a5b 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -133,7 +133,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, PlayMusicHdl)
             {
                 mxPlayer.set( avmedia::MediaWindow::createPlayer( aUrl, "" ), css::uno::UNO_QUERY_THROW );
                 mxPlayer->start();
-                maUpdateIdle.SetPriority( IdlePriority::LOW );
+                maUpdateIdle.SetPriority( SchedulerPriority::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 4e44b73..7f2f172 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(IdlePriority::LOWER);
+        maPrinterPollingIdle.SetPriority(SchedulerPriority::LOWER);
     }
 }
 
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
index 48014c0..99a8388 100644
--- a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
@@ -68,7 +68,7 @@ Animator::Animator (SlideSorter& rSlideSorter)
       mpDrawLock(),
       mnNextAnimationId(0)
 {
-    maIdle.SetPriority(IdlePriority::REPAINT);
+    maIdle.SetPriority(SchedulerPriority::REPAINT);
     maIdle.SetIdleHdl(LINK(this,Animator,TimeoutHandler));
 }
 
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index e3f9d67..b3db161 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -139,9 +139,9 @@ View::View(SdDrawDocument& rDrawDoc, OutputDevice* pOutDev,
 
     // Timer for delayed drop (has to be for MAC)
     maDropErrorIdle.SetIdleHdl( LINK(this, View, DropErrorHdl) );
-    maDropErrorIdle.SetPriority(IdlePriority::MEDIUM);
+    maDropErrorIdle.SetPriority(SchedulerPriority::MEDIUM);
     maDropInsertFileIdle.SetIdleHdl( LINK(this, View, DropInsertFileHdl) );
-    maDropInsertFileIdle.SetPriority(IdlePriority::MEDIUM);
+    maDropInsertFileIdle.SetPriority(SchedulerPriority::MEDIUM);
 }
 
 void View::ImplClearDrawDropMarker()
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 8b10b64..5a522ae 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -115,7 +115,7 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint )
         StartListening( *rHint.GetObjShell() );
     pIdle = new Idle;
     pIdle->SetIdleHdl( LINK(this, SfxEventAsyncer_Impl, IdleHdl) );
-    pIdle->SetPriority( IdlePriority::HIGHEST );
+    pIdle->SetPriority( SchedulerPriority::HIGHEST );
     pIdle->Start();
 }
 
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index d2aaead..d73c9e7 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -539,7 +539,7 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Im
     m_pOpenBtn->SetClickHdl( LINK( this, IndexTabPage_Impl, OpenHdl ) );
     Link aTimeoutLink = LINK( this, IndexTabPage_Impl, TimeoutHdl );
     aFactoryIdle.SetIdleHdl( LINK(this, IndexTabPage_Impl, IdleHdl ));
-    aFactoryIdle.SetPriority(IdlePriority::LOWER);
+    aFactoryIdle.SetPriority(SchedulerPriority::LOWER);
     aKeywordTimer.SetTimeoutHdl( aTimeoutLink );
 }
 
@@ -1406,7 +1406,7 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent)
     nMinWidth = ( m_pActiveLB->GetSizePixel().Width() / 2 );
 
     aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) );
-    aIdle.SetPriority( IdlePriority::LOWER );
+    aIdle.SetPriority( SchedulerPriority::LOWER );
     aIdle.Start();
 
     Show();
@@ -1533,7 +1533,7 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, InitHdl)
 
     // now use the timer for selection
     aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectFactoryHdl ) );
-    aIdle.SetPriority( IdlePriority::LOWEST );
+    aIdle.SetPriority( SchedulerPriority::LOWEST );
 
     return 0;
 }
@@ -1879,7 +1879,7 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
     aOnStartupCB.SetClickHdl( LINK( this, SfxHelpTextWindow_Impl, CheckHdl ) );
 
     aSelectIdle.SetIdleHdl( LINK( this, SfxHelpTextWindow_Impl, SelectHdl ) );
-    aSelectIdle.SetPriority( IdlePriority::LOWEST );
+    aSelectIdle.SetPriority( SchedulerPriority::LOWEST );
 
     char* pEnv = getenv( "help_debug" );
     if ( pEnv )
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index cf2b4ed..cf6c373 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -337,7 +337,7 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent )
 
     xImp->xPoster = new SfxHintPoster(aGenLink);
 
-    xImp->aIdle.SetPriority(IdlePriority::MEDIUM);
+    xImp->aIdle.SetPriority(SchedulerPriority::MEDIUM);
     xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
 }
 
@@ -473,7 +473,7 @@ void SfxDispatcher::Pop(SfxShell& rShell, sal_uInt16 nMode)
     if(!pSfxApp->IsDowning() && !xImp->aToDoStack.empty())
     {
         // No immediate update is requested
-        xImp->aIdle.SetPriority(IdlePriority::MEDIUM);
+        xImp->aIdle.SetPriority(SchedulerPriority::MEDIUM);
         xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
         xImp->aIdle.Start();
     }
@@ -684,7 +684,7 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI, SfxViewFrame* /* pOld */)
     if(!xImp->aToDoStack.empty())
     {
         // No immediate update is requested
-        xImp->aIdle.SetPriority(IdlePriority::MEDIUM);
+        xImp->aIdle.SetPriority(SchedulerPriority::MEDIUM);
         xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
         xImp->aIdle.Start();
     }
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 0329d7f..cb175b0 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -319,7 +319,7 @@ void SfxModelessDialog::Init(SfxBindings *pBindinx, SfxChildWindow *pCW)
     SetUniqueId( GetHelpId() );
     if ( pBindinx )
         pImp->StartListening( *pBindinx );
-    pImp->aMoveIdle.SetPriority(IdlePriority::RESIZE);
+    pImp->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
     pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxModelessDialog,TimerHdl));
 }
 
@@ -458,7 +458,7 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
     SetHelpId("");
     if ( pBindinx )
         pImp->StartListening( *pBindinx );
-    pImp->aMoveIdle.SetPriority(IdlePriority::RESIZE);
+    pImp->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
     pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl));
 }
 
@@ -479,7 +479,7 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
 
     if ( pBindinx )
         pImp->StartListening( *pBindinx );
-    pImp->aMoveIdle.SetPriority(IdlePriority::RESIZE);
+    pImp->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
     pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl));
 }
 
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index cb56a35..36d31f3 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1398,9 +1398,9 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
         LogicToPixel(Point(159, 2), MAP_APPFONT),
         LogicToPixel(Size(61, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT));
 
-    m_aEditLoseFocusIdle.SetPriority( IdlePriority::LOWEST );
+    m_aEditLoseFocusIdle.SetPriority( SchedulerPriority::LOWEST );
     m_aEditLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) );
-    m_aBoxLoseFocusIdle.SetPriority( IdlePriority::LOWEST );
+    m_aBoxLoseFocusIdle.SetPriority( SchedulerPriority::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 e24aaea..7d4f6b6 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -889,7 +889,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
     pImp->nPos  = pImp->nDockPos = 0;
     pImp->bNewLine = false;
     pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
-    pImp->aMoveIdle.SetPriority(IdlePriority::RESIZE);

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list