dbaccess/source/ui/inc/JoinTableView.hxx | 2 - dbaccess/source/ui/querydesign/JoinTableView.cxx | 18 ++++++------ editeng/source/editeng/impedit.hxx | 6 ++-- editeng/source/editeng/impedit2.cxx | 6 ++-- editeng/source/editeng/impedit3.cxx | 2 - editeng/source/editeng/impedit4.cxx | 4 +- include/svtools/wizdlg.hxx | 2 - include/svx/sidebar/PanelLayout.hxx | 2 - include/vcl/syswin.hxx | 4 +- reportdesign/source/ui/inc/DesignView.hxx | 2 - reportdesign/source/ui/report/DesignView.cxx | 12 ++++---- sc/inc/document.hxx | 2 - sc/source/core/data/documen2.cxx | 14 ++++----- sc/source/ui/inc/conflictsdlg.hxx | 2 - sc/source/ui/miscdlgs/conflictsdlg.cxx | 6 ++-- sd/source/ui/dlg/dlgass.cxx | 33 +++++++++++------------ svtools/source/dialogs/wizdlg.cxx | 14 ++++----- svx/source/dialog/_contdlg.cxx | 18 ++++++------ svx/source/dialog/contimp.hxx | 4 +- svx/source/sidebar/PanelLayout.cxx | 10 +++--- sw/source/uibase/inc/swruler.hxx | 2 - sw/source/uibase/misc/swruler.cxx | 10 +++--- vcl/source/window/syswin.cxx | 10 +++--- 23 files changed, 92 insertions(+), 93 deletions(-)
New commits: commit 0125ded66c28458591e88d118337c1985767c900 Author: Jennifer Liebel <jliebe...@gmail.com> Date: Mon Nov 10 14:57:14 2014 +0000 changed timers to idle Change-Id: I5846940cc45781f4a0264047107dbb568604d543 diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx index c9c5002..a14be0d 100644 --- a/dbaccess/source/ui/inc/JoinTableView.hxx +++ b/dbaccess/source/ui/inc/JoinTableView.hxx @@ -85,7 +85,7 @@ namespace dbaui OTableWindowMap m_aTableMap; ::std::vector<OTableConnection*> m_vTableConnection; - Timer m_aDragScrollTimer; + Idle m_aDragScrollIdle; Rectangle m_aDragRect; Rectangle m_aSizingRect; Point m_aDragOffset; diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 2944efc..29b64ef 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -169,7 +169,7 @@ OJoinTableView::OJoinTableView( vcl::Window* pParent, OJoinDesignView* pView ) InitColors(); - m_aDragScrollTimer.SetTimeoutHdl(LINK(this, OJoinTableView, OnDragScrollTimer)); + m_aDragScrollIdle.SetIdleHdl(LINK(this, OJoinTableView, OnDragScrollTimer)); } OJoinTableView::~OJoinTableView() @@ -717,8 +717,8 @@ void OJoinTableView::Tracking( const TrackingEvent& rTEvt ) { if( m_pDragWin ) { - if (m_aDragScrollTimer.IsActive()) - m_aDragScrollTimer.Stop(); + if (m_aDragScrollIdle.IsActive()) + m_aDragScrollIdle.Stop(); // adjust position of child after moving // windows are not allowed to leave display range @@ -777,8 +777,8 @@ void OJoinTableView::Tracking( const TrackingEvent& rTEvt ) } else if (rTEvt.IsTrackingCanceled()) { - if (m_aDragScrollTimer.IsActive()) - m_aDragScrollTimer.Stop(); + if (m_aDragScrollIdle.IsActive()) + m_aDragScrollIdle.Stop(); EndTracking(); } else @@ -990,8 +990,8 @@ bool OJoinTableView::ScrollWhileDragging() OSL_ENSURE(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging must not be called when a window is being dragged !"); // kill the timer - if (m_aDragScrollTimer.IsActive()) - m_aDragScrollTimer.Stop(); + if (m_aDragScrollIdle.IsActive()) + m_aDragScrollIdle.Stop(); Point aDragWinPos = m_ptPrevDraggingPos - m_aDragOffset; Size aDragWinSize = m_pDragWin->GetSizePixel(); @@ -1049,8 +1049,8 @@ bool OJoinTableView::ScrollWhileDragging() // resetting timer, if still necessary if (bNeedScrollTimer) { - m_aDragScrollTimer.SetTimeout(100); - m_aDragScrollTimer.Start(); + m_aDragScrollIdle.SetPriority(VCL_IDLE_PRIORITY_LOW); + m_aDragScrollIdle.Start(); } // redraw DraggingRect diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 9c44b36..a6f50ad 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -464,7 +464,7 @@ private: IdleFormattter aIdleFormatter; - Timer aOnlineSpellTimer; + Idle aOnlineSpellIdle; // If it is detected at one point that the StatusHdl has to be called, but // this should not happen immediately (critical section): @@ -978,8 +978,8 @@ public: inline EditEngine* GetEditEnginePtr() const { return pEditEngine; } - void StartOnlineSpellTimer() { aOnlineSpellTimer.Start(); } - void StopOnlineSpellTimer() { aOnlineSpellTimer.Stop(); } + void StartOnlineSpellTimer() { aOnlineSpellIdle.Start(); } + void StopOnlineSpellTimer() { aOnlineSpellIdle.Stop(); } const OUString& GetAutoCompleteText() const { return aAutoCompleteText; } void SetAutoCompleteText(const OUString& rStr, bool bUpdateTipWindow); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index c2bfdb2..5b92c58 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -148,8 +148,8 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : aIdleFormatter.SetPriority( VCL_IDLE_PRIORITY_REPAINT ); aIdleFormatter.SetIdleHdl( LINK( this, ImpEditEngine, IdleFormatHdl ) ); - aOnlineSpellTimer.SetTimeout( 100 ); - aOnlineSpellTimer.SetTimeoutHdl( LINK( this, ImpEditEngine, OnlineSpellHdl ) ); + aOnlineSpellIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); + aOnlineSpellIdle.SetIdleHdl( LINK( this, ImpEditEngine, OnlineSpellHdl ) ); // Access data already from here on! SetRefDevice( NULL ); @@ -163,7 +163,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : ImpEditEngine::~ImpEditEngine() { aStatusTimer.Stop(); - aOnlineSpellTimer.Stop(); + aOnlineSpellIdle.Stop(); aIdleFormatter.Stop(); // Destroying templates may otherwise cause unnecessary formatting, diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index f68bc5c..1529eba 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -312,7 +312,7 @@ IMPL_LINK_NOARG(ImpEditEngine, OnlineSpellHdl) if ( !Application::AnyInput( VCL_INPUT_KEYBOARD ) && GetUpdateMode() && IsFormatted() ) DoOnlineSpelling(); else - aOnlineSpellTimer.Start(); + aOnlineSpellIdle.Start(); return 0; } diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 6af9a8f..044c740 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1476,7 +1476,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc ) if ( !xSpeller.is() ) return EE_SPELL_NOSPELLER; - aOnlineSpellTimer.Stop(); + aOnlineSpellIdle.Stop(); // In MultipleDoc always from the front / rear ... if ( bMultipleDoc ) @@ -2445,7 +2445,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC break; } if ( bRestartTimer ) - aOnlineSpellTimer.Start(); + aOnlineSpellIdle.Start(); } diff --git a/include/svtools/wizdlg.hxx b/include/svtools/wizdlg.hxx index a4ab002..67f4e57 100644 --- a/include/svtools/wizdlg.hxx +++ b/include/svtools/wizdlg.hxx @@ -197,7 +197,7 @@ IMPL_LINK( MyWizardDlg, ImplNextHdl, PushButton*, pBtn ) class SVT_DLLPUBLIC WizardDialog : public ModalDialog { private: - Timer maWizardLayoutTimer; + Idle maWizardLayoutIdle; Size maPageSize; ImplWizPageData* mpFirstPage; ImplWizButtonData* mpFirstBtn; diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx index 93b0030..c696a62 100644 --- a/include/svx/sidebar/PanelLayout.hxx +++ b/include/svx/sidebar/PanelLayout.hxx @@ -23,7 +23,7 @@ class SVX_DLLPUBLIC PanelLayout : public Control, public VclBuilderContainer { private: - Timer m_aPanelLayoutTimer; + Idle m_aPanelLayoutIdle; bool m_bInClose; bool hasPanelPendingLayout() const; diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 1f98a6b..1ec6054 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -152,7 +152,7 @@ private: sal_uInt16 mnMenuBarMode; sal_uInt16 mnIcon; ImplData* mpImplData; - Timer maLayoutTimer; + Idle maLayoutIdle; protected: bool mbIsDefferedInit; vcl::Window* mpDialogParent; @@ -274,7 +274,7 @@ public: void SetCloseHdl(const Link& rLink); const Link& GetCloseHdl() const; - SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutTimer.IsActive(); } + SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutIdle.IsActive(); } virtual void doDeferredInit(WinBits nBits); }; diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index 2b219ea..047b727 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -68,7 +68,7 @@ namespace rptui OAddFieldWindow* m_pAddField; OSectionView* m_pCurrentView; ONavigator* m_pReportExplorer; - Timer m_aMarkTimer; + Idle m_aMarkIdle; Point m_aScrollOffset; DlgEdMode m_eMode; sal_uInt16 m_nCurrentPosition; diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index b9df2ba..fc004be 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -118,8 +118,8 @@ ODesignView::ODesignView( vcl::Window* pParent, m_aSplitWin.SetAlign(WINDOWALIGN_LEFT); m_aSplitWin.Show(); - m_aMarkTimer.SetTimeout( 100 ); - m_aMarkTimer.SetTimeoutHdl( LINK( this, ODesignView, MarkTimeout ) ); + m_aMarkIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); + m_aMarkIdle.SetIdleHdl( LINK( this, ODesignView, MarkTimeout ) ); } @@ -128,7 +128,7 @@ ODesignView::~ODesignView() m_bDeleted = true; Hide(); m_aScrollWindow.Hide(); - m_aMarkTimer.Stop(); + m_aMarkIdle.Stop(); if ( m_pPropWin ) { notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); @@ -360,7 +360,7 @@ void ODesignView::UpdatePropertyBrowserDelayed(OSectionView& _rView) DlgEdHint aHint( RPTUI_HINT_SELECTIONCHANGED ); Broadcast( aHint ); } - m_aMarkTimer.Start(); + m_aMarkIdle.Start(); } @@ -461,7 +461,7 @@ void ODesignView::togglePropertyBrowser(bool _bToogleOn) m_aSplitWin.RemoveItem(TASKPANE_ID); if ( bWillBeVisible ) - m_aMarkTimer.Start(); + m_aMarkIdle.Start(); } } @@ -473,7 +473,7 @@ void ODesignView::showProperties(const uno::Reference< uno::XInterface>& _xRepor if ( m_pCurrentView ) m_aScrollWindow.setMarked(m_pCurrentView,false); m_pCurrentView = NULL; - m_aMarkTimer.Start(); + m_aMarkIdle.Start(); } } diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index cfc9c41..a0fbdda 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -349,7 +349,7 @@ private: ScRange aEmbedRange; ScAddress aCurTextWidthCalcPos; - Timer aTrackTimer; + Idle aTrackIdle; com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > mxVbaEvents; diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index d9ab457..508ab73 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -248,8 +248,8 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) : // languages for a visible document are set by docshell later (from options) SetLanguage( ScGlobal::eLnge, ScGlobal::eLnge, ScGlobal::eLnge ); - aTrackTimer.SetTimeoutHdl( LINK( this, ScDocument, TrackTimeHdl ) ); - aTrackTimer.SetTimeout( 100 ); + aTrackIdle.SetIdleHdl( LINK( this, ScDocument, TrackTimeHdl ) ); + aTrackIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); } sfx2::LinkManager* ScDocument::GetLinkManager() @@ -330,11 +330,11 @@ void ScDocument::SetChangeTrack( ScChangeTrack* pTrack ) IMPL_LINK_NOARG(ScDocument, TrackTimeHdl) { - if ( ScDdeLink::IsInUpdate() ) // nicht verschachteln + if ( ScDdeLink::IsInUpdate() ) // don't nest it { - aTrackTimer.Start(); // spaeter nochmal versuchen + aTrackIdle.Start(); // try it later again } - else if (pShell) // ausfuehren + else if (pShell) // execute { TrackFormulas(); pShell->Broadcast( SfxSimpleHint( FID_DATACHANGED ) ); @@ -363,8 +363,8 @@ void ScDocument::SetExpandRefs( bool bVal ) void ScDocument::StartTrackTimer() { - if (!aTrackTimer.IsActive()) // nicht ewig aufschieben - aTrackTimer.Start(); + if (!aTrackIdle.IsActive()) // don't postpone forever + aTrackIdle.Start(); } ScDocument::~ScDocument() diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx index 461a7c7..57cc724 100644 --- a/sc/source/ui/inc/conflictsdlg.hxx +++ b/sc/source/ui/inc/conflictsdlg.hxx @@ -136,7 +136,7 @@ private: ScConflictsList& mrConflictsList; Size maDialogSize; - Timer maSelectionTimer; + Idle maSelectionIdle; bool mbInSelectHdl; bool mbInDeselectHdl; diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index 61df8e2..b9c6a0c 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -420,8 +420,8 @@ ScConflictsDlg::ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScD m_pLbConflicts->SetSelectionMode( MULTIPLE_SELECTION ); m_pLbConflicts->SetHighlightRange(); - maSelectionTimer.SetTimeout( 100 ); - maSelectionTimer.SetTimeoutHdl( LINK( this, ScConflictsDlg, UpdateSelectionHdl ) ); + maSelectionIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); + maSelectionIdle.SetIdleHdl( LINK( this, ScConflictsDlg, UpdateSelectionHdl ) ); m_pLbConflicts->SetSelectHdl( LINK( this, ScConflictsDlg, SelectHandle ) ); m_pLbConflicts->SetDeselectHdl( LINK( this, ScConflictsDlg, DeselectHandle ) ); @@ -534,7 +534,7 @@ IMPL_LINK_NOARG(ScConflictsDlg, SelectHandle) mbInSelectHdl = true; HandleListBoxSelection( true ); - maSelectionTimer.Start(); + maSelectionIdle.Start(); mbInSelectHdl = false; return 0; diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 9338dc4..60f6363 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -188,10 +188,9 @@ public: // preview bool mbUserDataDirty; - Timer maPrevTimer; - Timer maEffectPrevTimer; - Timer maUpdatePageListTimer; - Timer maStartScanTimer; + Idle maPrevIdle; + Idle maEffectPrevIdle; + Idle maUpdatePageListIdle; SfxObjectShellLock xDocShell; @@ -585,14 +584,14 @@ AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link& rFinishLin maAssistentFunc.GotoPage(1); mpLastPageButton->Disable(); - maPrevTimer.SetTimeout( 200 ); - maPrevTimer.SetTimeoutHdl( LINK( this, AssistentDlgImpl, UpdatePreviewHdl)); + maPrevIdle.SetPriority( VCL_IDLE_PRIORITY_LOWER ); + maPrevIdle.SetIdleHdl( LINK( this, AssistentDlgImpl, UpdatePreviewHdl)); - maEffectPrevTimer.SetTimeout( 50 ); - maEffectPrevTimer.SetTimeoutHdl( LINK( this, AssistentDlgImpl, EffectPreviewHdl )); + maEffectPrevIdle.SetPriority( VCL_IDLE_PRIORITY_MEDIUM ); + maEffectPrevIdle.SetIdleHdl( LINK( this, AssistentDlgImpl, EffectPreviewHdl )); - maUpdatePageListTimer.SetTimeout( 50 ); - maUpdatePageListTimer.SetTimeoutHdl( LINK( this, AssistentDlgImpl, UpdatePageListHdl)); + maUpdatePageListIdle.SetPriority( VCL_IDLE_PRIORITY_MEDIUM ); + maUpdatePageListIdle.SetIdleHdl( LINK( this, AssistentDlgImpl, UpdatePageListHdl)); SetStartType( ST_EMPTY ); @@ -999,7 +998,7 @@ void AssistentDlgImpl::LeavePage() int nPage = maAssistentFunc.GetCurrentPage(); if( nPage == 4 && mbUserDataDirty ) - maPrevTimer.Start(); + maPrevIdle.Start(); } void AssistentDlgImpl::ChangePage() @@ -1054,7 +1053,7 @@ void AssistentDlgImpl::UpdatePage() if(mbDocPreview || maPageListFile != maDocFile) mpPage5PageListCT->Clear(); - maUpdatePageListTimer.Start(); + maUpdatePageListIdle.Start(); break; } @@ -1096,7 +1095,7 @@ IMPL_LINK( AssistentDlgImpl, SelectRegionHdl, ListBox *, pLB ) IMPL_LINK_NOARG(AssistentDlgImpl, SelectEffectHdl) { - maEffectPrevTimer.Start(); + maEffectPrevIdle.Start(); return 0; } @@ -1144,20 +1143,20 @@ IMPL_LINK_NOARG(AssistentDlgImpl, SelectTemplateHdl) SetStartType( ST_TEMPLATE ); mpPage2Medium5RB->Check(); mpPage2LayoutLB->SelectEntryPos(0); - maPrevTimer.Start(); + maPrevIdle.Start(); return 0; } IMPL_LINK_NOARG(AssistentDlgImpl, SelectLayoutHdl) { - maPrevTimer.Start(); + maPrevIdle.Start(); return 0; } IMPL_LINK_NOARG(AssistentDlgImpl, SelectFileHdl) { SetStartType( ST_OPEN ); - maPrevTimer.Start(); + maPrevIdle.Start(); return 0; } @@ -1204,7 +1203,7 @@ IMPL_LINK( AssistentDlgImpl, StartTypeHdl, RadioButton *, pButton ) else if(eType == ST_OPEN) mpPage1OpenLB->SelectEntryPos(0); - maPrevTimer.Start(); + maPrevIdle.Start(); return 0; } diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 8b0b3d5..88dc6da 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -61,8 +61,8 @@ void WizardDialog::ImplInitData() mbEmptyViewMargin = false; mnLeftAlignCount = 0; - maWizardLayoutTimer.SetTimeout(50); - maWizardLayoutTimer.SetTimeoutHdl( LINK( this, WizardDialog, ImplHandleWizardLayoutTimerHdl ) ); + maWizardLayoutIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); + maWizardLayoutIdle.SetIdleHdl( LINK( this, WizardDialog, ImplHandleWizardLayoutTimerHdl ) ); } @@ -113,7 +113,7 @@ void WizardDialog::ImplCalcSize( Size& rSize ) bool WizardDialog::hasWizardPendingLayout() const { - return maWizardLayoutTimer.IsActive(); + return maWizardLayoutIdle.IsActive(); } void WizardDialog::queue_resize(StateChangedType /*eReason*/) @@ -122,7 +122,7 @@ void WizardDialog::queue_resize(StateChangedType /*eReason*/) return; if (IsInClose()) return; - maWizardLayoutTimer.Start(); + maWizardLayoutIdle.Start(); } IMPL_LINK( WizardDialog, ImplHandleWizardLayoutTimerHdl, void*, EMPTYARG ) @@ -263,7 +263,7 @@ void WizardDialog::ImplPosTabPage() return; } - // ButtonBar-Hoehe berechnen + // calculate height of ButtonBar long nMaxHeight = 0; ImplWizButtonData* pBtnData = mpFirstBtn; while ( pBtnData ) @@ -276,7 +276,7 @@ void WizardDialog::ImplPosTabPage() if ( nMaxHeight ) nMaxHeight += WIZARDDIALOG_BUTTON_OFFSET_Y*2; - // TabPage positionieren + // position TabPage Size aDlgSize = GetOutputSizePixel(); aDlgSize.Height() -= nMaxHeight; long nOffX = 0; @@ -363,7 +363,7 @@ WizardDialog::WizardDialog( vcl::Window* pParent, const OString& rID, const OUSt WizardDialog::~WizardDialog() { - maWizardLayoutTimer.Stop(); + maWizardLayoutIdle.Stop(); // Remove all buttons while ( mpFirstBtn ) diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 9b471b4..6362690 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -264,11 +264,11 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow * Resize(); - aUpdateTimer.SetTimeout( 100 ); - aUpdateTimer.SetTimeoutHdl( LINK( this, SvxSuperContourDlg, UpdateHdl ) ); + aUpdateIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); + aUpdateIdle.SetIdleHdl( LINK( this, SvxSuperContourDlg, UpdateHdl ) ); - aCreateTimer.SetTimeout( 50 ); - aCreateTimer.SetTimeoutHdl( LINK( this, SvxSuperContourDlg, CreateHdl ) ); + aCreateIdle.SetPriority( VCL_IDLE_PRIORITY_RESIZE ); + aCreateIdle.SetIdleHdl( LINK( this, SvxSuperContourDlg, CreateHdl ) ); } SvxSuperContourDlg::~SvxSuperContourDlg() @@ -386,7 +386,7 @@ void SvxSuperContourDlg::UpdateGraphic( const Graphic& rGraphic, bool _bGraphicL else aUpdatePolyPoly = tools::PolyPolygon(); - aUpdateTimer.Start(); + aUpdateIdle.Start(); } bool SvxSuperContourDlg::IsUndoPossible() const @@ -480,7 +480,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) } else if (nId == mnAutoContourId) { - aCreateTimer.Start(); + aCreateIdle.Start(); } else if (nId == mnPipetteId) { @@ -543,7 +543,7 @@ IMPL_LINK( SvxSuperContourDlg, GraphSizeHdl, ContourWindow*, pWnd ) IMPL_LINK_NOARG(SvxSuperContourDlg, UpdateHdl) { - aUpdateTimer.Stop(); + aUpdateIdle.Stop(); if ( pUpdateEditingObject != pCheckObj ) { @@ -569,7 +569,7 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, UpdateHdl) IMPL_LINK_NOARG(SvxSuperContourDlg, CreateHdl) { - aCreateTimer.Stop(); + aCreateIdle.Stop(); const Rectangle aWorkRect = m_pContourWnd->LogicToPixel( m_pContourWnd->GetWorkRect(), MapMode( MAP_100TH_MM ) ); const Graphic& rGraphic = m_pContourWnd->GetGraphic(); @@ -696,7 +696,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow*, pWnd ) pWnd->SetGraphic( aGraphic, bNewContour ); if( bNewContour ) - aCreateTimer.Start(); + aCreateIdle.Start(); } } diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index 407dd2f..2e999e85 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -35,8 +35,8 @@ class SvxSuperContourDlg : public SvxContourDlg Graphic aRedoGraphic; Graphic aUpdateGraphic; tools::PolyPolygon aUpdatePolyPoly; - Timer aUpdateTimer; - Timer aCreateTimer; + Idle aUpdateIdle; + Idle aCreateIdle; Size aLastSize; void* pUpdateEditingObject; void* pCheckObj; diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx index 08256d1..6630d7a 100644 --- a/svx/source/sidebar/PanelLayout.cxx +++ b/svx/source/sidebar/PanelLayout.cxx @@ -20,14 +20,14 @@ PanelLayout::PanelLayout(vcl::Window* pParent, const OString& rID, const OUStrin { SetStyle(GetStyle() | WB_DIALOGCONTROL); m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID, rFrame); - m_aPanelLayoutTimer.SetTimeout(50); - m_aPanelLayoutTimer.SetTimeoutHdl( LINK( this, PanelLayout, ImplHandlePanelLayoutTimerHdl ) ); + m_aPanelLayoutIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); + m_aPanelLayoutIdle.SetIdleHdl( LINK( this, PanelLayout, ImplHandlePanelLayoutTimerHdl ) ); } PanelLayout::~PanelLayout() { m_bInClose = true; - m_aPanelLayoutTimer.Stop(); + m_aPanelLayoutIdle.Stop(); } Size PanelLayout::GetOptimalSize() const @@ -40,7 +40,7 @@ Size PanelLayout::GetOptimalSize() const bool PanelLayout::hasPanelPendingLayout() const { - return m_aPanelLayoutTimer.IsActive(); + return m_aPanelLayoutIdle.IsActive(); } void PanelLayout::queue_resize(StateChangedType /*eReason*/) @@ -51,7 +51,7 @@ void PanelLayout::queue_resize(StateChangedType /*eReason*/) return; if (!isLayoutEnabled(this)) return; - m_aPanelLayoutTimer.Start(); + m_aPanelLayoutIdle.Start(); } IMPL_LINK( PanelLayout, ImplHandlePanelLayoutTimerHdl, void*, EMPTYARG ) diff --git a/sw/source/uibase/inc/swruler.hxx b/sw/source/uibase/inc/swruler.hxx index 015815c..19b877f 100644 --- a/sw/source/uibase/inc/swruler.hxx +++ b/sw/source/uibase/inc/swruler.hxx @@ -45,7 +45,7 @@ protected: SwViewShell * mpViewShell; //< Shell to check if there is any comments on doc and their visibility SwEditWin * mpSwWin; //< Used to get SwView to change the SideBar visibility bool mbIsHighlighted; //< If comment control is highlighted (mouse is over it) - Idle maFadeIdle; //< Timer for high/'low'light fading + Timer maFadeTimer; //< Timer for high/'low'light fading int mnFadeRate; //< From 0 to 100. 0 means not highlighted. VirtualDevice maVirDev; //< VirtualDevice of this window. Just for convenience. diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx index 8b374b9..172a0b3 100644 --- a/sw/source/uibase/misc/swruler.cxx +++ b/sw/source/uibase/misc/swruler.cxx @@ -44,8 +44,8 @@ SwCommentRuler::SwCommentRuler( SwViewShell* pViewSh, vcl::Window* pParent, SwEd , maVirDev( *this ) { // Set fading timeout: 5 x 40ms = 200ms - maFadeIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); - maFadeIdle.SetIdleHdl( LINK( this, SwCommentRuler, FadeHandler ) ); + maFadeTimer.SetTimeout(40); + maFadeTimer.SetTimeoutHdl( LINK( this, SwCommentRuler, FadeHandler ) ); } // Destructor @@ -203,7 +203,7 @@ void SwCommentRuler::MouseMove(const MouseEvent& rMEvt) SetQuickHelpText( OUString() ); } // Do start fading - maFadeIdle.Start(); + maFadeTimer.Start(); } } @@ -274,7 +274,7 @@ Rectangle SwCommentRuler::GetCommentControlRegion() Color SwCommentRuler::GetFadedColor(const Color &rHighColor, const Color &rLowColor) { - if ( ! maFadeIdle.IsActive() ) + if ( ! maFadeTimer.IsActive() ) return mbIsHighlighted ? rHighColor : rLowColor; Color aColor = rHighColor; @@ -295,7 +295,7 @@ IMPL_LINK_NOARG(SwCommentRuler, FadeHandler) Invalidate(); if ( mnFadeRate != 0 && mnFadeRate != 100) - maFadeIdle.Start(); + maFadeTimer.Start(); return 0; } diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 6ecf711..379b1d8 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -85,8 +85,8 @@ void SystemWindow::Init() mpDialogParent = NULL; //To-Do, reuse maResizeTimer - maLayoutTimer.SetTimeout(50); - maLayoutTimer.SetTimeoutHdl( LINK( this, SystemWindow, ImplHandleLayoutTimerHdl ) ); + maLayoutIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); + maLayoutIdle.SetIdleHdl( LINK( this, SystemWindow, ImplHandleLayoutTimerHdl ) ); } SystemWindow::SystemWindow(WindowType nType) @@ -106,7 +106,7 @@ void SystemWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUStri SystemWindow::~SystemWindow() { - maLayoutTimer.Stop(); + maLayoutIdle.Stop(); delete mpImplData; mpImplData = NULL; } @@ -997,7 +997,7 @@ void SystemWindow::queue_resize(StateChangedType /*eReason*/) WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; pWindowImpl->mnOptimalWidthCache = -1; pWindowImpl->mnOptimalHeightCache = -1; - maLayoutTimer.Start(); + maLayoutIdle.Start(); } void SystemWindow::Resize() @@ -1071,7 +1071,7 @@ void SystemWindow::settingOptimalLayoutSize(VclBox* /*pBox*/) void SystemWindow::setOptimalLayoutSize() { - maLayoutTimer.Stop(); + maLayoutIdle.Stop(); //resize SystemWindow to fit requisition on initial show VclBox *pBox = static_cast<VclBox*>(GetWindow(WINDOW_FIRSTCHILD)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits