diff options
author | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-11-18 15:11:29 +0000 |
---|---|---|
committer | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-12-09 12:35:00 +0000 |
commit | ec5851361bcf636c57691988b669d76313762a8c (patch) | |
tree | df3181e9488048e27ca082297693226b56c381bd | |
parent | 2a5500567544ef4e70528c0da0cf927d407dbf78 (diff) |
changed timers to idles
Change-Id: I1595a9711e3d5c564f1c9028cbb756f2b0ca45f1
-rw-r--r-- | sc/source/ui/dbgui/sfiltdlg.cxx | 20 | ||||
-rw-r--r-- | sc/source/ui/inc/filtdlg.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/View.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/sdview.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 28 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 16 |
7 files changed, 46 insertions, 46 deletions
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 5f1e33f848d9..d39e7c424e4d 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -57,7 +57,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vc pDoc ( NULL ), pRefInputEdit ( NULL ), bRefInputMode ( false ), - pTimer ( NULL ) + pIdle ( NULL ) { get(pLbFilterArea,"lbfilterarea"); get(pEdFilterArea,"edfilterarea"); @@ -85,10 +85,10 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vc pEdFilterArea->GrabFocus(); // Hack: RefInput-Kontrolle - pTimer = new Timer; - pTimer->SetTimeout( 50 ); // 50ms warten - pTimer->SetTimeoutHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) ); - pTimer->Start(); + pIdle = new Idle; + pIdle->SetTimeout( VCL_IDLE_PRIORITY_MEDIUM ); // 50ms warten + pIdle->SetIdleHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) ); + pIdle->Start(); pLbCopyArea->SetAccessibleName(pBtnCopyResult->GetText()); pEdCopyArea->SetAccessibleName(pBtnCopyResult->GetText()); @@ -108,8 +108,8 @@ ScSpecialFilterDlg::~ScSpecialFilterDlg() delete pOutItem; // Hack: RefInput-Kontrolle - pTimer->Stop(); - delete pTimer; + pIdle->Stop(); + delete pIdle; } void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet ) @@ -376,11 +376,11 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) return 0; } -IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer ) +IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle ) { // alle 50ms nachschauen, ob RefInputMode noch stimmt - if( (_pTimer == pTimer) && IsActive() ) + if( (_pIdle == pIdle) && IsActive() ) { if( pEdCopyArea->HasFocus() || pRbCopyArea->HasFocus() ) { @@ -399,7 +399,7 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer ) } } - pTimer->Start(); + pIdle->Start(); return 0; } diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index 1b1fdc54c1f9..e7e89cc9fcab 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -206,7 +206,7 @@ private: bool bRefInputMode; // Hack: RefInput control - Timer* pTimer; + Idle* pIdle; private: void Init( const SfxItemSet& rArgSet ); @@ -220,7 +220,7 @@ private: DECL_LINK( ScrollHdl, ScrollBar* ); // Hack: RefInput control - DECL_LINK( TimeOutHdl, Timer* ); + DECL_LINK( TimeOutHdl, Idle* ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_FILTDLG_HXX diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index 962f75d9a9ba..e9630c7a2b21 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -276,8 +276,8 @@ protected: Point maDropPos; ::std::vector<OUString> maDropFileVector; sal_Int8 mnAction; - Timer maDropErrorTimer; - Timer maDropInsertFileTimer; + Idle maDropErrorIdle; + Idle maDropInsertFileIdle; sal_uInt16 mnLockRedrawSmph; boost::ptr_vector<SdViewRedrawRec> maLockedRedraws; bool mbIsDropAllowed; diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 1eb87b55839a..bf3ec430b186 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -138,10 +138,10 @@ View::View(SdDrawDocument& rDrawDoc, OutputDevice* pOutDev, SetMeasureLayer(SD_RESSTR(STR_LAYER_MEASURELINES)); // Timer for delayed drop (has to be for MAC) - maDropErrorTimer.SetTimeoutHdl( LINK(this, View, DropErrorHdl) ); - maDropErrorTimer.SetTimeout(50); - maDropInsertFileTimer.SetTimeoutHdl( LINK(this, View, DropInsertFileHdl) ); - maDropInsertFileTimer.SetTimeout(50); + maDropErrorIdle.SetIdleHdl( LINK(this, View, DropErrorHdl) ); + maDropErrorIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); + maDropInsertFileIdle.SetIdleHdl( LINK(this, View, DropInsertFileHdl) ); + maDropInsertFileIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); } void View::ImplClearDrawDropMarker() @@ -160,8 +160,8 @@ View::~View() // release content of selection clipboard, if we own the content UpdateSelectionClipboard( true ); - maDropErrorTimer.Stop(); - maDropInsertFileTimer.Stop(); + maDropErrorIdle.Stop(); + maDropInsertFileIdle.Stop(); ImplClearDrawDropMarker(); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 2cc0b56becbf..e029afabfcac 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -580,7 +580,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } else { - maDropErrorTimer.Start(); + maDropErrorIdle.Start(); bReturn = false; } } @@ -617,7 +617,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } else { - maDropErrorTimer.Start(); + maDropErrorIdle.Start(); bReturn = false; } } @@ -1448,7 +1448,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, for( sal_uLong i = 0, nCount = aDropFileList.Count(); i < nCount; i++ ) maDropFileVector.push_back( aDropFileList.GetFile( i ) ); - maDropInsertFileTimer.Start(); + maDropInsertFileIdle.Start(); } bReturn = true; @@ -1462,7 +1462,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, { maDropFileVector.clear(); maDropFileVector.push_back( aDropFile ); - maDropInsertFileTimer.Start(); + maDropInsertFileIdle.Start(); } bReturn = true; diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index dbabdba1fa9f..8be4a17b9370 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -52,7 +52,7 @@ public: bool bConstructed; void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; - Timer aMoveTimer; + Idle aMoveIdle; }; void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint ) @@ -75,7 +75,7 @@ public: OString aWinState; SfxChildWindow* pMgr; bool bConstructed; - Timer aMoveTimer; + Idle aMoveIdle; void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; }; @@ -267,7 +267,7 @@ void SfxModelessDialog::Resize() if ( pImp->bConstructed && pImp->pMgr ) { // start timer for saving window status information - pImp->aMoveTimer.Start(); + pImp->aMoveIdle.Start(); } } @@ -277,7 +277,7 @@ void SfxModelessDialog::Move() if ( pImp->bConstructed && pImp->pMgr && IsReallyVisible() ) { // start timer for saving window status information - pImp->aMoveTimer.Start(); + pImp->aMoveIdle.Start(); } } @@ -287,7 +287,7 @@ void SfxModelessDialog::Move() */ IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl) { - pImp->aMoveTimer.Stop(); + pImp->aMoveIdle.Stop(); if ( pImp->bConstructed && pImp->pMgr ) { if ( !IsRollUp() ) @@ -318,8 +318,8 @@ void SfxModelessDialog::Init(SfxBindings *pBindinx, SfxChildWindow *pCW) SetUniqueId( GetHelpId() ); if ( pBindinx ) pImp->StartListening( *pBindinx ); - pImp->aMoveTimer.SetTimeout(50); - pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxModelessDialog,TimerHdl)); + pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); + pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxModelessDialog,TimerHdl)); } /* [Description] @@ -457,8 +457,8 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, SetHelpId(""); if ( pBindinx ) pImp->StartListening( *pBindinx ); - pImp->aMoveTimer.SetTimeout(50); - pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl)); + pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); + pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl)); } SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, @@ -478,8 +478,8 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, if ( pBindinx ) pImp->StartListening( *pBindinx ); - pImp->aMoveTimer.SetTimeout(50); - pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl)); + pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); + pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl)); } bool SfxFloatingWindow::Close() @@ -532,7 +532,7 @@ void SfxFloatingWindow::Resize() if ( pImp->bConstructed && pImp->pMgr ) { // start timer for saving window status information - pImp->aMoveTimer.Start(); + pImp->aMoveIdle.Start(); } } @@ -542,7 +542,7 @@ void SfxFloatingWindow::Move() if ( pImp->bConstructed && pImp->pMgr ) { // start timer for saving window status information - pImp->aMoveTimer.Start(); + pImp->aMoveIdle.Start(); } } @@ -552,7 +552,7 @@ void SfxFloatingWindow::Move() */ IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl) { - pImp->aMoveTimer.Stop(); + pImp->aMoveIdle.Stop(); if ( pImp->bConstructed && pImp->pMgr ) { if ( !IsRollUp() ) diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index fa4c31cc056c..b5fabebb2faf 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -403,7 +403,7 @@ friend class SfxDockingWindow; Size aMinSize; SfxSplitWindow* pSplitWin; bool bSplitable; - Timer aMoveTimer; + Idle aMoveIdle; // The following members are only valid in the time from startDocking to // EndDocking: @@ -447,7 +447,7 @@ void SfxDockingWindow::Resize() if ( IsFloatingMode() ) { // start timer for saving window status information - pImp->aMoveTimer.Start(); + pImp->aMoveIdle.Start(); } else { @@ -888,8 +888,8 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW, pImp->nPos = pImp->nDockPos = 0; pImp->bNewLine = false; pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT); - pImp->aMoveTimer.SetTimeout(50); - pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl)); + pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); + pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl)); } @@ -939,8 +939,8 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW, pImp->nPos = pImp->nDockPos = 0; pImp->bNewLine = false; pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT); - pImp->aMoveTimer.SetTimeout(50); - pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl)); + pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); + pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl)); } @@ -1869,12 +1869,12 @@ void SfxDockingWindow::StateChanged( StateChangedType nStateChange ) void SfxDockingWindow::Move() { if ( pImp ) - pImp->aMoveTimer.Start(); + pImp->aMoveIdle.Start(); } IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl) { - pImp->aMoveTimer.Stop(); + pImp->aMoveIdle.Stop(); if ( IsReallyVisible() && IsFloatingMode() ) { if( !GetFloatingWindow()->IsRollUp() ) |