[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/svx svtools/source svx/source

Tobias Madl tobias.madl.dev at gmail.com
Wed Nov 12 05:01:21 PST 2014


 include/svx/fontwork.hxx           |    2 +-
 include/svx/graphctl.hxx           |    2 +-
 svtools/source/contnr/imivctl.hxx  |    4 ++--
 svtools/source/contnr/imivctl1.cxx |    6 +++---
 svx/source/dialog/fontwork.cxx     |    6 +++---
 svx/source/dialog/graphctl.cxx     |    6 +++---
 svx/source/dialog/srchdlg.cxx      |    8 ++++----
 svx/source/form/datanavi.cxx       |    8 ++++----
 svx/source/form/formcontroller.cxx |   18 +++++++++---------
 svx/source/inc/datanavi.hxx        |    4 ++--
 svx/source/inc/formcontroller.hxx  |    2 +-
 11 files changed, 33 insertions(+), 33 deletions(-)

New commits:
commit e2f6f98e0dca3888e50dbc6efca2771e9bcb66f9
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Wed Nov 12 12:59:59 2014 +0000

    changed timers to idles
    
    Change-Id: I39b081b751219201e86fec1e626b450f15bea9ab

diff --git a/include/svx/fontwork.hxx b/include/svx/fontwork.hxx
index 656eb91..ac91d4c 100644
--- a/include/svx/fontwork.hxx
+++ b/include/svx/fontwork.hxx
@@ -109,7 +109,7 @@ class SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow
     ColorLB         aShadowColorLB;
 
     SfxBindings&    rBindings;
-    Timer           aInputTimer;
+    Idle            aInputIdle;
 
     sal_uInt16          nLastStyleTbxId;
     sal_uInt16          nLastAdjustTbxId;
diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx
index 4e8060d..a2863d0 100644
--- a/include/svx/graphctl.hxx
+++ b/include/svx/graphctl.hxx
@@ -38,7 +38,7 @@ class SVX_DLLPUBLIC GraphCtrl : public Control
     friend class GraphCtrlUserCall;
 
     Graphic             aGraphic;
-    Timer               aUpdateTimer;
+    Idle                aUpdateIdle;
     Link                aMousePosLink;
     Link                aGraphSizeLink;
     Link                aMarkObjLink;
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index 03a9d06..ed244ad 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -168,7 +168,7 @@ class SvxIconChoiceCtrl_Impl
     Timer                   aAutoArrangeTimer;
     Timer                   aDocRectChangedTimer;
     Timer                   aVisRectChangedTimer;
-    Timer                   aCallSelectHdlTimer;
+    Idle                    aCallSelectHdlIdle;
     Size                    aVirtOutputSize;
     Size                    aImageSize;
     Size                    aDefaultTextSize;
@@ -552,7 +552,7 @@ public:
                             const Rectangle& rBmpRect,
                             bool bHide
                         );
-    void                StopSelectTimer() { aCallSelectHdlTimer.Stop(); }
+    void                StopSelectTimer() { aCallSelectHdlIdle.Stop(); }
 
     void                CallEventListeners( sal_uLong nEvent, void* pData = NULL );
 
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index bbffe70..af597bb 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -139,8 +139,8 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
     aEditIdle.SetIdleHdl(LINK(this,SvxIconChoiceCtrl_Impl,EditTimeoutHdl));
     aAutoArrangeTimer.SetTimeout( 100 );
     aAutoArrangeTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,AutoArrangeHdl));
-    aCallSelectHdlTimer.SetTimeout( 500 );
-    aCallSelectHdlTimer.SetTimeoutHdl( LINK(this,SvxIconChoiceCtrl_Impl,CallSelectHdlHdl));
+    aCallSelectHdlIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+    aCallSelectHdlIdle.SetIdleHdl( LINK(this,SvxIconChoiceCtrl_Impl,CallSelectHdlHdl));
 
     aDocRectChangedTimer.SetTimeout( 50 );
     aDocRectChangedTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,DocRectChangedHdl));
@@ -3778,7 +3778,7 @@ void SvxIconChoiceCtrl_Impl::CallSelectHandler( SvxIconChoiceCtrlEntry* )
         //pView->Select();
     }
     else
-        aCallSelectHdlTimer.Start();
+        aCallSelectHdlIdle.Start();
 }
 
 IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, CallSelectHdlHdl)
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index ed0a318..660869c 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -265,8 +265,8 @@ SvxFontWorkDialog::SvxFontWorkDialog( SfxBindings *pBindinx,
 
     aShadowColorLB.SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
 
-    aInputTimer.SetTimeout(500);
-    aInputTimer.SetTimeoutHdl(LINK(this, SvxFontWorkDialog, InputTimoutHdl_Impl));
+    aInputIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+    aInputIdle.SetIdleHdl(LINK(this, SvxFontWorkDialog, InputTimoutHdl_Impl));
 }
 
 SvxFontWorkDialog::~SvxFontWorkDialog()
@@ -709,7 +709,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectShadowHdl_Impl)
 
 IMPL_LINK_NOARG_INLINE_START(SvxFontWorkDialog, ModifyInputHdl_Impl)
 {
-    aInputTimer.Start();
+    aInputIdle.Start();
     return 0;
 }
 IMPL_LINK_NOARG_INLINE_END(SvxFontWorkDialog, ModifyInputHdl_Impl)
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 0c590d3..61f5a31 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -67,9 +67,9 @@ GraphCtrl::GraphCtrl( vcl::Window* pParent, WinBits nStyle ) :
             pView           ( NULL )
 {
     pUserCall = new GraphCtrlUserCall( *this );
-    aUpdateTimer.SetTimeout( 500 );
-    aUpdateTimer.SetTimeoutHdl( LINK( this, GraphCtrl, UpdateHdl ) );
-    aUpdateTimer.Start();
+    aUpdateIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+    aUpdateIdle.SetIdleHdl( LINK( this, GraphCtrl, UpdateHdl ) );
+    aUpdateIdle.Start();
     EnableRTL( false );
 }
 
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index a306762..c811632 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -110,7 +110,7 @@ struct SearchDlg_Impl
     bool        bSaveToModule  : 1,
                 bFocusOnSearch : 1;
     sal_uInt16* pRanges;
-    Timer       aSelectionTimer;
+    Idle        aSelectionIdle;
 
     uno::Reference< frame::XDispatch > xCommand1Dispatch;
     uno::Reference< frame::XDispatch > xCommand2Dispatch;
@@ -364,8 +364,8 @@ void SvxSearchDialog::Construct_Impl()
 {
     // temporary to avoid incompatibility
     pImpl = new SearchDlg_Impl();
-    pImpl->aSelectionTimer.SetTimeout( 500 );
-    pImpl->aSelectionTimer.SetTimeoutHdl(
+    pImpl->aSelectionIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+    pImpl->aSelectionIdle.SetIdleHdl(
         LINK( this, SvxSearchDialog, TimeoutHdl_Impl ) );
     EnableControls_Impl( 0 );
 
@@ -408,7 +408,7 @@ void SvxSearchDialog::Construct_Impl()
         new SvxSearchController( SID_SEARCH_OPTIONS, rBindings, *this );
     rBindings.LeaveRegistrations();
     rBindings.GetDispatcher()->Execute( FID_SEARCH_ON, SfxCallMode::SLOT, ppArgs );
-    pImpl->aSelectionTimer.Start();
+    pImpl->aSelectionIdle.Start();
 
 
     SvtCJKOptions aCJKOptions;
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 461c11d..d407155 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -2744,8 +2744,8 @@ namespace svxform
         m_pConditionED->SetModifyHdl( LINK( this, AddConditionDialog, ModifyHdl ) );
         m_pEditNamespacesBtn->SetClickHdl( LINK( this, AddConditionDialog, EditHdl ) );
         m_pOKBtn->SetClickHdl( LINK( this, AddConditionDialog, OKHdl ) );
-        m_aResultTimer.SetTimeout( 500 );
-        m_aResultTimer.SetTimeoutHdl( LINK( this, AddConditionDialog, ResultHdl ) );
+        m_aResultIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+        m_aResultIdle.SetIdleHdl( LINK( this, AddConditionDialog, ResultHdl ) );
 
         if ( !m_sPropertyName.isEmpty() )
         {
@@ -2774,7 +2774,7 @@ namespace svxform
         }
 
         DBG_ASSERT( m_xUIHelper.is(), "AddConditionDialog::Ctor(): no UIHelper" );
-        ResultHdl( &m_aResultTimer );
+        ResultHdl( &m_aResultIdle );
     }
 
 
@@ -2823,7 +2823,7 @@ namespace svxform
 
     IMPL_LINK_NOARG(AddConditionDialog, ModifyHdl)
     {
-        m_aResultTimer.Start();
+        m_aResultIdle.Start();
         return 0;
     }
 
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index b464f06..a253efd 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -576,8 +576,8 @@ FormController::FormController(const Reference< css::uno::XComponentContext > &
     }
     ::comphelper::decrement(m_refCount);
 
-    m_aTabActivationTimer.SetTimeout( 500 );
-    m_aTabActivationTimer.SetTimeoutHdl( LINK( this, FormController, OnActivateTabOrder ) );
+    m_aTabActivationIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+    m_aTabActivationIdle.SetIdleHdl( LINK( this, FormController, OnActivateTabOrder ) );
 
     m_aFeatureInvalidationTimer.SetTimeout( 200 );
     m_aFeatureInvalidationTimer.SetTimeoutHdl( LINK( this, FormController, OnInvalidateFeatures ) );
@@ -594,8 +594,8 @@ FormController::~FormController()
         m_aActivationEvent.CancelPendingCall();
         m_aDeactivationEvent.CancelPendingCall();
 
-        if ( m_aTabActivationTimer.IsActive() )
-            m_aTabActivationTimer.Stop();
+        if ( m_aTabActivationIdle.IsActive() )
+            m_aTabActivationIdle.Stop();
     }
 
     if ( m_aFeatureInvalidationTimer.IsActive() )
@@ -2030,8 +2030,8 @@ void FormController::setContainer(const Reference< XControlContainer > & xContai
     {
         xCurrentContainer->removeContainerListener(this);
 
-        if ( m_aTabActivationTimer.IsActive() )
-            m_aTabActivationTimer.Stop();
+        if ( m_aTabActivationIdle.IsActive() )
+            m_aTabActivationIdle.Stop();
 
         // clear the filter map
         ::std::for_each( m_aFilterComponents.begin(), m_aFilterComponents.end(), RemoveComponentTextListener( this ) );
@@ -2835,10 +2835,10 @@ void SAL_CALL FormController::elementInserted(const ContainerEvent& evt) throw(
     {
         insertControl(xControl);
 
-        if ( m_aTabActivationTimer.IsActive() )
-            m_aTabActivationTimer.Stop();
+        if ( m_aTabActivationIdle.IsActive() )
+            m_aTabActivationIdle.Stop();
 
-        m_aTabActivationTimer.Start();
+        m_aTabActivationIdle.Start();
     }
     // are we in filtermode and a XModeSelector has inserted an element
     else if (m_bFiltering && Reference< XModeSelector > (evt.Source, UNO_QUERY).is())
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index c7a75a9..a3459b8 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -483,7 +483,7 @@ namespace svxform
         PushButton*             m_pEditNamespacesBtn;
         OKButton*               m_pOKBtn;
 
-        Timer                   m_aResultTimer;
+        Idle                    m_aResultIdle;
         OUString         m_sPropertyName;
 
         XFormsUIHelper1_ref     m_xUIHelper;
@@ -503,7 +503,7 @@ namespace svxform
         void SetCondition(const OUString& _rCondition)
         {
             m_pConditionED->SetText(_rCondition);
-            m_aResultTimer.Start();
+            m_aResultIdle.Start();
         }
     };
 
diff --git a/svx/source/inc/formcontroller.hxx b/svx/source/inc/formcontroller.hxx
index 5ecc4be..cac5459 100644
--- a/svx/source/inc/formcontroller.hxx
+++ b/svx/source/inc/formcontroller.hxx
@@ -164,7 +164,7 @@ namespace svxform
         FilterComponents            m_aFilterComponents;
         FmFilterRows                m_aFilterRows;
 
-        Timer                       m_aTabActivationTimer;
+        Idle                        m_aTabActivationIdle;
         Timer                       m_aFeatureInvalidationTimer;
 
         ::svxform::ControlBorderManager*


More information about the Libreoffice-commits mailing list