[Libreoffice-commits] core.git: Branch 'feature/priorities' - cui/source include/svtools sd/source sfx2/source svtools/source sw/source

Jennifer Liebel jliebel94 at gmail.com
Mon Nov 17 01:23:23 PST 2014


 cui/source/options/optjava.cxx                          |    6 ++---
 cui/source/options/optjava.hxx                          |    2 -
 cui/source/tabpages/macroass.cxx                        |   10 ++++-----
 include/svtools/treelistbox.hxx                         |    2 -
 sd/source/ui/dlg/brkdlg.cxx                             |    6 ++---
 sd/source/ui/framework/module/ShellStackGuard.cxx       |   12 +++++------
 sd/source/ui/framework/module/ShellStackGuard.hxx       |    2 -
 sd/source/ui/inc/BreakDlg.hxx                           |    2 -
 sd/source/ui/slidesorter/controller/SlsAnimator.cxx     |   12 +++++------
 sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx |    2 -
 sfx2/source/appl/appcfg.cxx                             |   17 +++++++---------
 sfx2/source/appl/newhelp.cxx                            |   13 +++++-------
 sfx2/source/appl/newhelp.hxx                            |    2 -
 svtools/source/contnr/imivctl1.cxx                      |   10 ++++-----
 svtools/source/contnr/treelistbox.cxx                   |    8 +++----
 svtools/source/control/tabbar.cxx                       |   12 +++++------
 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 ++++-----
 21 files changed, 70 insertions(+), 72 deletions(-)

New commits:
commit aa1d615453846d38c242a40da9661164316073d1
Author: Jennifer Liebel <jliebel94 at gmail.com>
Date:   Mon Nov 17 09:18:52 2014 +0000

    changed timers to idle
    
    Change-Id: I92f40d3dad133347f1b8db0b025b624d3305f885

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 10ee781..51da12c 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -182,8 +182,8 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* pParent, const SfxItemSet&
     m_pAddBtn->SetClickHdl( LINK( this, SvxJavaOptionsPage, AddHdl_Impl ) );
     m_pParameterBtn->SetClickHdl( LINK( this, SvxJavaOptionsPage, ParameterHdl_Impl ) );
     m_pClassPathBtn->SetClickHdl( LINK( this, SvxJavaOptionsPage, ClassPathHdl_Impl ) );
-    m_aResetTimer.SetTimeoutHdl( LINK( this, SvxJavaOptionsPage, ResetHdl_Impl ) );
-    m_aResetTimer.SetTimeout( RESET_TIMEOUT );
+    m_aResetIdle.SetIdleHdl( LINK( this, SvxJavaOptionsPage, ResetHdl_Impl ) );
+    m_aResetIdle.SetPriority(VCL_IDLE_PRIORITY_LOWER);
 
     m_pExpertConfigBtn->SetClickHdl( LINK( this, SvxJavaOptionsPage, ExpertConfigHdl_Impl) );
     if (!officecfg::Office::Common::Security::EnableExpertConfiguration::get())
@@ -771,7 +771,7 @@ void SvxJavaOptionsPage::Reset( const SfxItemSet* /*rSet*/ )
     m_pMacroCB->Check( aMiscOpt.IsMacroRecorderMode() );
     m_pMacroCB->SaveValue();
 
-    m_aResetTimer.Start();
+    m_aResetIdle.Start();
 }
 
 
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 353b749..247d9cd 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -72,7 +72,7 @@ private:
     OUString                m_sInstallText;
     OUString                m_sAccessibilityText;
     OUString                m_sAddDialogText;
-    Timer                   m_aResetTimer;
+    Idle                    m_aResetIdle;
 
     CheckBox*               m_pExperimentalCB;
     CheckBox*               m_pMacroCB;
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 0288663..233b9b9 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -55,7 +55,7 @@ public:
     SfxConfigFunctionListBox*       pMacroLB;
 
     bool                            bReadOnly;
-    Timer                           maFillGroupTimer;
+    Idle                            maFillGroupIdle;
     bool                            bGotEvents;
     bool m_bDummyActivated; ///< has this tab page already been activated
 };
@@ -188,11 +188,11 @@ bool _SfxMacroTabPage::FillItemSet( SfxItemSet* rSet )
 
 void _SfxMacroTabPage::LaunchFillGroup()
 {
-    if (!mpImpl->maFillGroupTimer.GetTimeoutHdl().IsSet())
+    if (!mpImpl->maFillGroupIdle.GetTimeoutHdl().IsSet())
     {
-        mpImpl->maFillGroupTimer.SetTimeoutHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) );
-        mpImpl->maFillGroupTimer.SetTimeout( 0 );
-        mpImpl->maFillGroupTimer.Start();
+        mpImpl->maFillGroupIdle.SetIdleHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) );
+        mpImpl->maFillGroupIdle.SetPriority( VCL_IDLE_PRIORITY_HIGHEST );
+        mpImpl->maFillGroupIdle.Start();
     }
 }
 
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 733d4a2..94ad1d7 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -800,7 +800,7 @@ class SvInplaceEdit2
     Link        aCallBackHdl;
     Accelerator aAccReturn;
     Accelerator aAccEscape;
-    Timer       aTimer;
+    Idle        aIdle;
     Edit*       pEdit;
     bool        bCanceled;
     bool        bAlreadyInCallBack;
diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx
index b596add..eb34dc0 100644
--- a/sd/source/ui/dlg/brkdlg.cxx
+++ b/sd/source/ui/dlg/brkdlg.cxx
@@ -144,9 +144,9 @@ IMPL_LINK( BreakDlg, UpDate, void*, nInit )
  */
 short BreakDlg::Execute()
 {
-  aTimer.SetTimeout( 10 );
-  aTimer.SetTimeoutHdl( LINK( this, BreakDlg, InitialUpdate ) );
-  aTimer.Start();
+  aIdle.SetPriority( VCL_IDLE_PRIORITY_REPAINT );
+  aIdle.SetIdleHdl( LINK( this, BreakDlg, InitialUpdate ) );
+  aIdle.Start();
 
   return SfxModalDialog::Execute();
 }
diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx b/sd/source/ui/framework/module/ShellStackGuard.cxx
index de8ecb3..cf72edc 100644
--- a/sd/source/ui/framework/module/ShellStackGuard.cxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.cxx
@@ -43,7 +43,7 @@ ShellStackGuard::ShellStackGuard (Reference<frame::XController>& rxController)
       mxConfigurationController(),
       mpBase(NULL),
       mpUpdateLock(),
-      maPrinterPollingTimer()
+      maPrinterPollingIdle()
 {
     Reference<XControllerManager> xControllerManager (rxController, UNO_QUERY);
     if (xControllerManager.is())
@@ -71,8 +71,8 @@ ShellStackGuard::ShellStackGuard (Reference<frame::XController>& rxController)
             Any());
 
         // Prepare the printer polling.
-        maPrinterPollingTimer.SetTimeoutHdl(LINK(this,ShellStackGuard,TimeoutHandler));
-        maPrinterPollingTimer.SetTimeout(300);
+        maPrinterPollingIdle.SetIdleHdl(LINK(this,ShellStackGuard,TimeoutHandler));
+        maPrinterPollingIdle.SetPriority(VCL_IDLE_PRIORITY_LOWER);
     }
 }
 
@@ -101,7 +101,7 @@ void SAL_CALL ShellStackGuard::notifyConfigurationChange (
             mpUpdateLock.reset(new ConfigurationController::Lock(mxConfigurationController));
 
             // Start polling for the printer having finished printing.
-            maPrinterPollingTimer.Start();
+            maPrinterPollingIdle.Start();
         }
     }
 }
@@ -121,7 +121,7 @@ void SAL_CALL ShellStackGuard::disposing (
 IMPL_LINK(ShellStackGuard, TimeoutHandler, Timer*, pTimer)
 {
 #ifdef DEBUG
-    OSL_ASSERT(pTimer==&maPrinterPollingTimer);
+    OSL_ASSERT(pTimer==&maPrinterPollingIdle);
 #else
     (void)pTimer;
 #endif
@@ -135,7 +135,7 @@ IMPL_LINK(ShellStackGuard, TimeoutHandler, Timer*, pTimer)
         else
         {
             // Wait long for the printing to finish.
-            maPrinterPollingTimer.Start();
+            maPrinterPollingIdle.Start();
         }
     }
 
diff --git a/sd/source/ui/framework/module/ShellStackGuard.hxx b/sd/source/ui/framework/module/ShellStackGuard.hxx
index 44ea6a3..22aaaa7 100644
--- a/sd/source/ui/framework/module/ShellStackGuard.hxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.hxx
@@ -84,7 +84,7 @@ private:
         mxConfigurationController;
     ViewShellBase* mpBase;
     ::boost::scoped_ptr<ConfigurationController::Lock> mpUpdateLock;
-    Timer maPrinterPollingTimer;
+    Idle maPrinterPollingIdle;
 
     DECL_LINK(TimeoutHandler, Timer*);
 
diff --git a/sd/source/ui/inc/BreakDlg.hxx b/sd/source/ui/inc/BreakDlg.hxx
index 66110e0..2159e8b 100644
--- a/sd/source/ui/inc/BreakDlg.hxx
+++ b/sd/source/ui/inc/BreakDlg.hxx
@@ -65,7 +65,7 @@ private:
 
     bool            bCancel;
 
-    Timer           aTimer;
+    Idle            aIdle;
     SvdProgressInfo *pProgrInfo;
     Link            aLink;
     SfxProgress     *mpProgress;
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
index fd50b7c..b9127b7 100644
--- a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
@@ -64,15 +64,15 @@ public:
 
 Animator::Animator (SlideSorter& rSlideSorter)
     : mrSlideSorter(rSlideSorter),
-      maTimer(),
+      maIdle(),
       mbIsDisposed(false),
       maAnimations(),
       maElapsedTime(),
       mpDrawLock(),
       mnNextAnimationId(0)
 {
-    maTimer.SetTimeout(gnResolution);
-    maTimer.SetTimeoutHdl(LINK(this,Animator,TimeoutHandler));
+    maIdle.SetPriority(VCL_IDLE_PRIORITY_REPAINT);
+    maIdle.SetIdleHdl(LINK(this,Animator,TimeoutHandler));
 }
 
 Animator::~Animator (void)
@@ -93,7 +93,7 @@ void Animator::Dispose (void)
     for (iAnimation=aCopy.begin(); iAnimation!=aCopy.end(); ++iAnimation)
         (*iAnimation)->Expire();
 
-    maTimer.Stop();
+    maIdle.Stop();
     if (mpDrawLock)
     {
         mpDrawLock->Dispose();
@@ -212,13 +212,13 @@ void Animator::CleanUpAnimationList (void)
 void Animator::RequestNextFrame (const double nFrameStart)
 {
     (void)nFrameStart;
-    if ( ! maTimer.IsActive())
+    if ( ! maIdle.IsActive())
     {
         // Prevent redraws except for the ones in TimeoutHandler.  While the
         // Animator is active it will schedule repaints regularly.  Repaints
         // in between would only lead to visual artifacts.
         mpDrawLock.reset(new view::SlideSorterView::DrawLock(mrSlideSorter));
-        maTimer.Start();
+        maIdle.Start();
     }
 }
 
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx
index 9d177f7..0eb10ce 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx
@@ -93,7 +93,7 @@ public:
 
 private:
     SlideSorter& mrSlideSorter;
-    Timer maTimer;
+    Idle maIdle;
     bool mbIsDisposed;
     class Animation;
     typedef ::std::vector<boost::shared_ptr<Animation> > AnimationList;
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index e4bf242..2a8c7a3 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -83,7 +83,7 @@ using namespace ::com::sun::star::beans;
 class SfxEventAsyncer_Impl : public SfxListener
 {
     SfxEventHint        aHint;
-    Timer*              pTimer;
+    Idle*               pIdle;
 
 public:
 
@@ -98,9 +98,9 @@ public:
 void SfxEventAsyncer_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
 {
     const SfxSimpleHint* pHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
-    if( pHint && pHint->GetId() == SFX_HINT_DYING && pTimer->IsActive() )
+    if( pHint && pHint->GetId() == SFX_HINT_DYING && pIdle->IsActive() )
     {
-        pTimer->Stop();
+        pIdle->Stop();
         delete this;
     }
 }
@@ -112,24 +112,23 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint )
 {
     if( rHint.GetObjShell() )
         StartListening( *rHint.GetObjShell() );
-    pTimer = new Timer;
-    pTimer->SetTimeoutHdl( LINK(this, SfxEventAsyncer_Impl, TimerHdl) );
-    pTimer->SetTimeout( 0 );
-    pTimer->Start();
+    pIdle = new Idle;
+    pIdle->SetIdleHdl( LINK(this, SfxEventAsyncer_Impl, TimerHdl) );
+    pIdle->SetPriority( VCL_IDLE_PRIORITY_HIGHEST );
+    pIdle->Start();
 }
 
 
 
 SfxEventAsyncer_Impl::~SfxEventAsyncer_Impl()
 {
-    delete pTimer;
+    delete pIdle;
 }
 
 
 
 IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer)
 {
-    (void)pAsyncTimer; // unused variable
     SfxObjectShellRef xRef( aHint.GetObjShell() );
     pAsyncTimer->Stop();
 #ifdef DBG_UTIL
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index d9bb71d..aa88b88 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -538,10 +538,9 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Im
 
     m_pOpenBtn->SetClickHdl( LINK( this, IndexTabPage_Impl, OpenHdl ) );
     Link aTimeoutLink = LINK( this, IndexTabPage_Impl, TimeoutHdl );
-    aFactoryTimer.SetTimeoutHdl( aTimeoutLink );
-    aFactoryTimer.SetTimeout( 300 );
+    aFactoryIdle.SetIdleHdl( aTimeoutLink );
+    aFactoryIdle.SetPriority(VCL_IDLE_PRIORITY_LOWER);
     aKeywordTimer.SetTimeoutHdl( aTimeoutLink );
-    aFactoryTimer.SetTimeout( 300 );
 }
 
 IndexTabPage_Impl::~IndexTabPage_Impl()
@@ -711,7 +710,7 @@ IMPL_LINK_NOARG(IndexTabPage_Impl, OpenHdl)
 
 IMPL_LINK( IndexTabPage_Impl, TimeoutHdl, Timer*, pTimer )
 {
-    if ( &aFactoryTimer == pTimer )
+    if ( &aFactoryIdle == pTimer )
         InitializeIndex();
     else if ( &aKeywordTimer == pTimer && !sKeyword.isEmpty() )
         aKeywordLink.Call( this );
@@ -723,7 +722,7 @@ void IndexTabPage_Impl::ActivatePage()
     if ( !bIsActivated )
     {
         bIsActivated = true;
-        aFactoryTimer.Start();
+        aFactoryIdle.Start();
     }
 
     if ( !m_pIdxWin->WasCursorLeftOrRight() )
@@ -757,7 +756,7 @@ void IndexTabPage_Impl::SetFactory( const OUString& rFactory )
         sFactory = sNewFactory;
         ClearIndex();
         if ( bIsActivated )
-            aFactoryTimer.Start();
+            aFactoryIdle.Start();
     }
 }
 
@@ -781,7 +780,7 @@ void IndexTabPage_Impl::SetKeyword( const OUString& rKeyword )
     if ( m_pIndexCB->GetEntryCount() > 0 )
         aKeywordTimer.Start();
     else if ( !bIsActivated )
-        aFactoryTimer.Start();
+        aFactoryIdle.Start();
 }
 
 
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 233a317..e3f5202 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -121,7 +121,7 @@ private:
     IndexBox_Impl*      m_pIndexCB;
     PushButton*         m_pOpenBtn;
 
-    Timer               aFactoryTimer;
+    Idle                aFactoryIdle;
     Timer               aKeywordTimer;
     Link                aKeywordLink;
 
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index af597bb..84db12b 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -57,7 +57,7 @@ class IcnViewEdit_Impl : public MultiLineEdit
     Link            aCallBackHdl;
     Accelerator     aAccReturn;
     Accelerator     aAccEscape;
-    Timer           aTimer;
+    Idle            aIdle;
     bool            bCanceled;
     bool            bAlreadyInCallback;
     bool            bGrabFocus;
@@ -3328,7 +3328,7 @@ IcnViewEdit_Impl::~IcnViewEdit_Impl()
 
 void IcnViewEdit_Impl::CallCallBackHdl_Impl()
 {
-    aTimer.Stop();
+    aIdle.Stop();
     if ( !bAlreadyInCallback )
     {
         bAlreadyInCallback = true;
@@ -3393,9 +3393,9 @@ bool IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
             ((!Application::GetFocusWindow()) || !IsChild(Application::GetFocusWindow())))
         {
             bCanceled = false;
-            aTimer.SetTimeout(10);
-            aTimer.SetTimeoutHdl(LINK(this,IcnViewEdit_Impl,Timeout_Impl));
-            aTimer.Start();
+            aIdle.SetPriority(VCL_IDLE_PRIORITY_REPAINT);
+            aIdle.SetIdleHdl(LINK(this,IcnViewEdit_Impl,Timeout_Impl));
+            aIdle.Start();
         }
     }
     return false;
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 60e6fc2..5591635 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -233,9 +233,9 @@ void SvInplaceEdit2::LoseFocus()
     )
     {
         bCanceled = false;
-        aTimer.SetTimeout(10);
-        aTimer.SetTimeoutHdl(LINK(this,SvInplaceEdit2,Timeout_Impl));
-        aTimer.Start();
+        aIdle.SetPriority(VCL_IDLE_PRIORITY_REPAINT);
+        aIdle.SetIdleHdl(LINK(this,SvInplaceEdit2,Timeout_Impl));
+        aIdle.Start();
     }
 }
 
@@ -248,7 +248,7 @@ IMPL_LINK_NOARG_INLINE_END(SvInplaceEdit2, Timeout_Impl)
 
 void SvInplaceEdit2::CallCallBackHdl_Impl()
 {
-    aTimer.Stop();
+    aIdle.Stop();
     if ( !bAlreadyInCallBack )
     {
         bAlreadyInCallBack = true;
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 71dc774..9088867 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -245,7 +245,7 @@ void ImplTabSizer::Paint( const Rectangle& )
 class TabBarEdit : public Edit
 {
 private:
-    Timer           maLoseFocusTimer;
+    Idle            maLoseFocusIdle;
     bool            mbPostEvt;
 
                     DECL_LINK( ImplEndEditHdl, void* );
@@ -322,15 +322,15 @@ void TabBarEdit::LoseFocus()
 IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel )
 {
     ResetPostEvent();
-    maLoseFocusTimer.Stop();
+    maLoseFocusIdle.Stop();
 
     // We need this query, because the edit gets a losefocus event,
     // when it shows the context menu or the insert symbol dialog
     if ( !HasFocus() && HasChildPathFocus( true ) )
     {
-        maLoseFocusTimer.SetTimeout( 30 );
-        maLoseFocusTimer.SetTimeoutHdl( LINK( this, TabBarEdit, ImplEndTimerHdl ) );
-        maLoseFocusTimer.Start();
+        maLoseFocusIdle.SetPriority( VCL_IDLE_PRIORITY_REPAINT );
+        maLoseFocusIdle.SetIdleHdl( LINK( this, TabBarEdit, ImplEndTimerHdl ) );
+        maLoseFocusIdle.Start();
     }
     else
         GetParent()->EndEditMode( pCancel != 0 );
@@ -348,7 +348,7 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl)
     // We need this query, because the edit gets a losefocus event,
     // when it shows the context menu or the insert symbol dialog
     if ( HasChildPathFocus( true ) )
-        maLoseFocusTimer.Start();
+        maLoseFocusIdle.Start();
     else
         GetParent()->EndEditMode( true );
 
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 39e51cc..55e58e2 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 d1f7e35..e08e237 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 8cb2ea6..3a53386 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 2fd2b43..cd4574f 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 6d3c4ba..56501c5 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
         {


More information about the Libreoffice-commits mailing list