diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-04 12:06:42 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-17 16:08:47 +0100 |
commit | fdc612619c1c133353026166206cea18c48089a6 (patch) | |
tree | 900ab53bc8d88ed4ab4b375e8a80136401bc3145 /sfx2 | |
parent | 17bb38262471cf68167fa11ad875c2785f43a341 (diff) |
Refactor Scheduler to add Task class
Moves all the "task-specific" stuff into a Task class and just
keeps the "real" static Scheduler functions in the original
Scheduler class.
Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/control/itemdel.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/new.cxx | 2 |
10 files changed, 20 insertions, 20 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index f0a87265eb82..4e9a40e1ade6 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -109,7 +109,7 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint ) StartListening( *rHint.GetObjShell() ); pIdle.reset( new Idle("SfxEventASyncer") ); pIdle->SetIdleHdl( LINK(this, SfxEventAsyncer_Impl, IdleHdl) ); - pIdle->SetPriority( SchedulerPriority::HIGHEST ); + pIdle->SetPriority( TaskPriority::HIGHEST ); pIdle->SetDebugName( "sfx::SfxEventAsyncer_Impl pIdle" ); pIdle->Start(); } diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index e29f1398fa6a..46eb4ab89fb3 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -552,7 +552,7 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Im m_pOpenBtn->SetClickHdl( LINK( this, IndexTabPage_Impl, OpenHdl ) ); Link<Timer *, void> aTimeoutLink = LINK( this, IndexTabPage_Impl, TimeoutHdl ); aFactoryIdle.SetIdleHdl( LINK(this, IndexTabPage_Impl, IdleHdl )); - aFactoryIdle.SetPriority(SchedulerPriority::LOWER); + aFactoryIdle.SetPriority(TaskPriority::LOWER); aKeywordTimer.SetTimeoutHdl( aTimeoutLink ); } @@ -1432,7 +1432,7 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent) nMinWidth = ( m_pActiveLB->GetSizePixel().Width() / 2 ); aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) ); - aIdle.SetPriority( SchedulerPriority::LOWER ); + aIdle.SetPriority( TaskPriority::LOWER ); aIdle.Start(); Show(); @@ -1562,7 +1562,7 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, InitHdl, Idle *, void) // now use the timer for selection aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectFactoryHdl ) ); - aIdle.SetPriority( SchedulerPriority::LOWEST ); + aIdle.SetPriority( TaskPriority::LOWEST ); } IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, SelectFactoryHdl, Idle *, void) @@ -1902,7 +1902,7 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) : aOnStartupCB->SetClickHdl( LINK( this, SfxHelpTextWindow_Impl, CheckHdl ) ); aSelectIdle.SetIdleHdl( LINK( this, SfxHelpTextWindow_Impl, SelectHdl ) ); - aSelectIdle.SetPriority( SchedulerPriority::LOWEST ); + aSelectIdle.SetPriority( TaskPriority::LOWEST ); char* pEnv = getenv( "help_debug" ); if ( pEnv ) diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 49e7e5406459..fefdf6aa87ab 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -450,7 +450,7 @@ void SfxDispatcher::Construct_Impl() xImp->xPoster = new SfxHintPoster(aGenLink); - xImp->aIdle.SetPriority(SchedulerPriority::MEDIUM); + xImp->aIdle.SetPriority(TaskPriority::MEDIUM); xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); xImp->aIdle.SetDebugName( "sfx::SfxDispatcher_Impl aIdle" ); } @@ -574,7 +574,7 @@ void SfxDispatcher::Pop(SfxShell& rShell, SfxDispatcherPopFlags nMode) if(!pSfxApp->IsDowning() && !xImp->aToDoStack.empty()) { // No immediate update is requested - xImp->aIdle.SetPriority(SchedulerPriority::MEDIUM); + xImp->aIdle.SetPriority(TaskPriority::MEDIUM); xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); xImp->aIdle.Start(); } @@ -770,7 +770,7 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI) if(!xImp->aToDoStack.empty()) { // No immediate update is requested - xImp->aIdle.SetPriority(SchedulerPriority::MEDIUM); + xImp->aIdle.SetPriority(TaskPriority::MEDIUM); xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); xImp->aIdle.Start(); } diff --git a/sfx2/source/control/itemdel.cxx b/sfx2/source/control/itemdel.cxx index c835b8c145d5..706f0cceeca6 100644 --- a/sfx2/source/control/itemdel.cxx +++ b/sfx2/source/control/itemdel.cxx @@ -45,7 +45,7 @@ SfxItemDisruptor_Impl::SfxItemDisruptor_Impl(SfxPoolItem *const pItemToDisrupt) , m_Idle("sfx SfxItemDisruptor_Impl::Delete") { m_Idle.SetIdleHdl(LINK(this, SfxItemDisruptor_Impl, Delete)); - m_Idle.SetPriority(SchedulerPriority::DEFAULT_IDLE); + m_Idle.SetPriority(TaskPriority::DEFAULT_IDLE); DBG_ASSERT( 0 == pItem->GetRefCount(), "disrupting pooled item" ); pItem->SetKind(SfxItemKind::DeleteOnIdle); diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index b319f2957ec3..a09708508ad0 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -301,7 +301,7 @@ void SfxModelessDialog::Init(SfxBindings *pBindinx, SfxChildWindow *pCW) pImpl->bConstructed = false; if ( pBindinx ) pImpl->StartListening( *pBindinx ); - pImpl->aMoveIdle.SetPriority(SchedulerPriority::RESIZE); + pImpl->aMoveIdle.SetPriority(TaskPriority::RESIZE); pImpl->aMoveIdle.SetIdleHdl(LINK(this,SfxModelessDialog,TimerHdl)); } @@ -439,7 +439,7 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, pImpl->bConstructed = false; if ( pBindinx ) pImpl->StartListening( *pBindinx ); - pImpl->aMoveIdle.SetPriority(SchedulerPriority::RESIZE); + pImpl->aMoveIdle.SetPriority(TaskPriority::RESIZE); pImpl->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl)); } @@ -456,7 +456,7 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, if ( pBindinx ) pImpl->StartListening( *pBindinx ); - pImpl->aMoveIdle.SetPriority(SchedulerPriority::RESIZE); + pImpl->aMoveIdle.SetPriority(TaskPriority::RESIZE); pImpl->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl)); } diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 410d5e64e92b..cddee1ef3425 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1506,9 +1506,9 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent, m_aDateField->SetPosSizePixel(aPos, aSize); m_aTimeField->SetPosSizePixel(aPos, aSize); - m_aEditLoseFocusIdle.SetPriority( SchedulerPriority::LOWEST ); + m_aEditLoseFocusIdle.SetPriority( TaskPriority::LOWEST ); m_aEditLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) ); - m_aBoxLoseFocusIdle.SetPriority( SchedulerPriority::LOWEST ); + m_aBoxLoseFocusIdle.SetPriority( TaskPriority::LOWEST ); m_aBoxLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) ); m_aNameBox->add_mnemonic_label(m_pHeaderAccName); diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 6178bd0df75b..6bc24a7865a8 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -433,7 +433,7 @@ SfxDockingWindow_Impl::SfxDockingWindow_Impl(SfxDockingWindow* pBase) ,bNewLine(false) ,bDockingPrevented(false) { - aMoveIdle.SetPriority(SchedulerPriority::RESIZE); + aMoveIdle.SetPriority(TaskPriority::RESIZE); aMoveIdle.SetIdleHdl(LINK(pBase,SfxDockingWindow,TimerHdl)); aMoveIdle.SetDebugName( "sfx::SfxDockingWindow_Impl aMoveIdle" ); } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 4e8150851a8d..3f17a8af58ae 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -986,7 +986,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( mbHasPreview = true; // aPreviewTimer - maPreviewIdle.SetPriority( SchedulerPriority::LOWEST ); + maPreviewIdle.SetPriority( TaskPriority::LOWEST ); maPreviewIdle.SetIdleHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) ); break; @@ -1007,7 +1007,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( nTemplateDescription = TemplateDescription::FILEOPEN_LINK_PREVIEW; mbHasPreview = true; // aPreviewTimer - maPreviewIdle.SetPriority( SchedulerPriority::LOWEST ); + maPreviewIdle.SetPriority( TaskPriority::LOWEST ); maPreviewIdle.SetIdleHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) ); break; @@ -1021,7 +1021,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( nTemplateDescription = TemplateDescription::FILEOPEN_PREVIEW; mbHasPreview = true; // aPreviewTimer - maPreviewIdle.SetPriority( SchedulerPriority::LOWEST ); + maPreviewIdle.SetPriority( TaskPriority::LOWEST ); maPreviewIdle.SetIdleHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) ); break; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index a8f6af17bb75..8e56aeee142c 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1485,7 +1485,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint if(!pIdle) { pIdle=new Idle("SfxCommonTemplate"); - pIdle->SetPriority(SchedulerPriority::LOWEST); + pIdle->SetPriority(TaskPriority::LOWEST); pIdle->SetIdleHdl(LINK(this,SfxCommonTemplateDialog_Impl,TimeOut)); } pIdle->Start(); diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 5d55b9c1ab39..9b78b0cf857c 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -408,7 +408,7 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl( m_pRegionLb->SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, RegionSelect)); } - aPrevIdle.SetPriority( SchedulerPriority::LOWEST ); + aPrevIdle.SetPriority( TaskPriority::LOWEST ); aPrevIdle.SetIdleHdl( LINK( this, SfxNewFileDialog_Impl, Update)); m_pRegionLb->SelectEntryPos(0); |