From d843f3de731667a298a83fc66637c7f983f3b24d Mon Sep 17 00:00:00 2001 From: Jennifer Liebel Date: Mon, 17 Nov 2014 09:18:52 +0000 Subject: changed timers to idle Change-Id: I92f40d3dad133347f1b8db0b025b624d3305f885 --- sw/source/uibase/docvw/srcedtw.cxx | 8 ++++---- sw/source/uibase/inc/edtwin.hxx | 2 +- sw/source/uibase/inc/srcedtw.hxx | 2 +- sw/source/uibase/inc/unotools.hxx | 2 +- sw/source/uibase/utlui/unotools.cxx | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'sw') diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index c75575a07827..34ca9921a31b 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -278,7 +278,7 @@ SwSrcEditWindow::SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView ) if (n.is()) { n->removePropertiesChangeListener(listener_.get()); } - aSyntaxIdleTimer.Stop(); + aSyntaxIdle.Stop(); if ( pTextEngine ) { EndListening( *pTextEngine ); @@ -514,8 +514,8 @@ void SwSrcEditWindow::CreateTextEngine() pOutWin->SetFont( aFont ); pTextEngine->SetFont( aFont ); - aSyntaxIdleTimer.SetTimeout( SYNTAX_HIGHLIGHT_TIMEOUT ); - aSyntaxIdleTimer.SetTimeoutHdl( LINK( this, SwSrcEditWindow, SyntaxTimerHdl ) ); + aSyntaxIdle.SetPriority( VCL_IDLE_PRIORITY_LOWER ); + aSyntaxIdle.SetIdleHdl( LINK( this, SwSrcEditWindow, SyntaxTimerHdl ) ); pTextEngine->EnableUndo( true ); pTextEngine->SetUpdateMode( true ); @@ -660,7 +660,7 @@ void SwSrcEditWindow::DoDelayedSyntaxHighlight( sal_uInt16 nPara ) if ( !bHighlighting && bDoSyntaxHighlight ) { aSyntaxLineTable.insert( nPara ); - aSyntaxIdleTimer.Start(); + aSyntaxIdle.Start(); } } diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index d1f7e35fb969..e08e23750cdc 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -82,7 +82,7 @@ friend void PageNumNotify( SwViewShell* pVwSh, AutoTimer m_aTimer; // timer for overlapping KeyInputs (e.g. for tables) Timer m_aKeyInputTimer; - // timer for ANY-KeyInut question without a following KeyInputEvent + // timer for ANY-KeyInput question without a following KeyInputEvent Timer m_aKeyInputFlushTimer; OUString m_aInBuffer; diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx index 8cb2ea611bdd..3a533864d6e6 100644 --- a/sw/source/uibase/inc/srcedtw.hxx +++ b/sw/source/uibase/inc/srcedtw.hxx @@ -86,7 +86,7 @@ private: bool bDoSyntaxHighlight; bool bHighlighting; - Timer aSyntaxIdleTimer; + Idle aSyntaxIdle; SyntaxLineSet aSyntaxLineTable; void ImpDoHighlight( const OUString& rSource, sal_uInt16 nLineOff ); diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx index 2fd2b4384280..cd4574f50e62 100644 --- a/sw/source/uibase/inc/unotools.hxx +++ b/sw/source/uibase/inc/unotools.hxx @@ -73,7 +73,7 @@ class SW_DLLPUBLIC SwOneExampleFrame ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > _xCursor; SwFrmCtrlWindow aTopWindow; - Timer aLoadedTimer; + Idle aLoadedIdle; Link aInitializedLink; MenuResource aMenuRes; diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index a3c19c0e578b..97b530f9796a 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -82,8 +82,8 @@ SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin, aInitializedLink = *pInitializedLink; // the controller is asynchronously set - aLoadedTimer.SetTimeoutHdl(LINK(this, SwOneExampleFrame, TimeoutHdl)); - aLoadedTimer.SetTimeout(200); + aLoadedIdle.SetIdleHdl(LINK(this, SwOneExampleFrame, TimeoutHdl)); + aLoadedIdle.SetPriority(VCL_IDLE_PRIORITY_LOWER); CreateControl(); @@ -153,7 +153,7 @@ void SwOneExampleFrame::CreateControl() xPrSet->setPropertyValue("ComponentURL", aURL); - aLoadedTimer.Start(); + aLoadedIdle.Start(); bServiceAvailable = true; } } @@ -421,13 +421,13 @@ void SwOneExampleFrame::ClearDocument( bool bStartUpdateTimer ) pDoc->ClearDoc(); pSh->ClearUpCrsrs(); - if( aLoadedTimer.IsActive() || !bStartUpdateTimer ) + if( aLoadedIdle.IsActive() || !bStartUpdateTimer ) { pSh->EndAllAction(); pSh->UnlockPaint(); } if( bStartUpdateTimer ) - aLoadedTimer.Start(); + aLoadedIdle.Start(); } else { -- cgit