[Libreoffice-commits] core.git: Branch 'feature/priorities' - chart2/source editeng/source include/svx reportdesign/source svx/inc svx/source

Jennifer Liebel jliebel94 at gmail.com
Tue Nov 4 03:53:48 PST 2014


 chart2/source/controller/drawinglayer/DrawViewWrapper.cxx |    4 -
 editeng/source/editeng/impedit.hxx                        |    2 
 editeng/source/editeng/impedit2.cxx                       |    2 
 include/svx/svdpntv.hxx                                   |    2 
 reportdesign/source/ui/dlg/Navigator.cxx                  |   37 ++++++--------
 svx/inc/svdibrow.hxx                                      |    2 
 svx/source/svdraw/svdibrow.cxx                            |    2 
 svx/source/svdraw/svdpntv.cxx                             |   10 +--
 8 files changed, 28 insertions(+), 33 deletions(-)

New commits:
commit df6e72c0135a70c1abb20fadbfc3ddc287376189
Author: Jennifer Liebel <jliebel94 at gmail.com>
Date:   Tue Nov 4 11:51:15 2014 +0000

    changed some timer to idle
    
    Change-Id: Ifd5e2d87732d3e537c7754e52be24ef768ecb8d9

diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 63d093f..0870786 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -154,8 +154,8 @@ void DrawViewWrapper::ReInit()
 
 DrawViewWrapper::~DrawViewWrapper()
 {
-    aComeBackTimer.Stop();//@todo this should be done in destructor of base class
-    UnmarkAllObj();//necessary to aavoid a paint call during the destructor hierarchy
+    aComeBackIdle.Stop();//@todo this should be done in destructor of base class
+    UnmarkAllObj();//necessary to avoid a paint call during the destructor hierarchy
 }
 
 SdrPageView* DrawViewWrapper::GetPageView() const
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 68ef6ed..9c44b36 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -182,7 +182,7 @@ struct FormatterFontMetric
     sal_uInt16  GetHeight() const       { return nMaxAscent+nMaxDescent; }
 };
 
-class IdleFormattter : public Timer
+class IdleFormattter : public Idle
 {
 private:
     EditView*   pView;
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 9a46f58..27c2ad9 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -145,7 +145,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
     aStatusTimer.SetTimeout( 200 );
     aStatusTimer.SetTimeoutHdl( LINK( this, ImpEditEngine, StatusTimerHdl ) );
 
-    aIdleFormatter.SetTimeout( 5 );
+    aIdleFormatter.SetPriority( VCL_IDLE_PRIORITY_REPAINT );
     aIdleFormatter.SetTimeoutHdl( LINK( this, ImpEditEngine, IdleFormatHdl ) );
 
     aOnlineSpellTimer.SetTimeout( 100 );
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 54df1af..44da516 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -152,7 +152,7 @@ protected:
     SdrDragStat                 aDragStat;
     Rectangle                   aMaxWorkArea;
     SfxItemSet                  aDefaultAttr;
-    Timer                       aComeBackTimer;
+    Idle                        aComeBackIdle;
 
     SdrAnimationMode            eAnimationMode;
 
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 13c9dad..d36b761 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -423,29 +423,24 @@ IMPL_LINK_NOARG(NavigatorTree, OnDropActionTimer)
 
     switch ( m_aDropActionType )
     {
-    case DA_EXPANDNODE:
-    {
-        SvTreeListEntry* pToExpand = GetEntry(m_aTimerTriggered);
-        if (pToExpand && (GetChildCount(pToExpand) > 0) &&  !IsExpanded(pToExpand))
-            // tja, eigentlich muesste ich noch testen, ob die Node nicht schon expandiert ist, aber ich
-            // habe dazu weder in den Basisklassen noch im Model eine Methode gefunden ...
-            // aber ich denke, die BK sollte es auch so vertragen
-            Expand(pToExpand);
-
-        // nach dem Expand habe ich im Gegensatz zum Scrollen natuerlich nix mehr zu tun
-        m_aDropActionTimer.Stop();
-    }
-    break;
-
-    case DA_SCROLLUP :
-        ScrollOutputArea( 1 );
-        m_nTimerCounter = DROP_ACTION_TIMER_SCROLL_TICKS;
+        case DA_EXPANDNODE:
+        {
+            SvTreeListEntry* pToExpand = GetEntry(m_aTimerTriggered);
+            if (pToExpand && (GetChildCount(pToExpand) > 0) &&  !IsExpanded(pToExpand))
+                Expand(pToExpand);
+            m_aDropActionTimer.Stop();
+        }
         break;
 
-    case DA_SCROLLDOWN :
-        ScrollOutputArea( -1 );
-        m_nTimerCounter = DROP_ACTION_TIMER_SCROLL_TICKS;
-        break;
+        case DA_SCROLLUP :
+            ScrollOutputArea( 1 );
+            m_nTimerCounter = DROP_ACTION_TIMER_SCROLL_TICKS;
+            break;
+
+        case DA_SCROLLDOWN :
+            ScrollOutputArea( -1 );
+            m_nTimerCounter = DROP_ACTION_TIMER_SCROLL_TICKS;
+            break;
 
     }
 
diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index 52965b1..f4c4a0f 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -114,7 +114,7 @@ public:
 class SdrView;
 
 class SdrItemBrowser: public _SdrItemBrowserWindow {
-    Timer aIdleTimer;
+    Idle aIdleTimer;
     SdrView* pView;
     bool bDirty;
 private:
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 2123500..2694111 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -1107,7 +1107,7 @@ void SdrItemBrowser::SetDirty()
 {
     if (!bDirty) {
         bDirty = true;
-        aIdleTimer.SetTimeout(1);
+        aIdleTimer.SetPriority(VCL_IDLE_PRIORITY_HIGH);
         aIdleTimer.Start();
     }
 }
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 09dcd31..3fdde7e 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -190,8 +190,8 @@ void SdrPaintView::ImpClearVars()
     pDefaultStyleSheet=NULL;
     bSomeObjChgdFlag=false;
     nGraphicManagerDrawMode = GRFMGR_DRAW_STANDARD;
-    aComeBackTimer.SetTimeout(1);
-    aComeBackTimer.SetTimeoutHdl(LINK(this,SdrPaintView,ImpComeBackHdl));
+    aComeBackIdle.SetPriority(VCL_IDLE_PRIORITY_HIGH);
+    aComeBackIdle.SetTimeoutHdl(LINK(this,SdrPaintView,ImpComeBackHdl));
 
     if (pMod)
         SetDefaultStyleSheet(pMod->GetDefaultStyleSheet(), true);
@@ -269,7 +269,7 @@ void SdrPaintView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
             if (eKind==HINT_OBJCHG || eKind==HINT_OBJINSERTED || eKind==HINT_OBJREMOVED) {
                 if (bObjChg) {
                     bSomeObjChgdFlag=true;
-                    aComeBackTimer.Start();
+                    aComeBackIdle.Start();
                 }
             }
             if (eKind==HINT_PAGEORDERCHG) {
@@ -309,8 +309,8 @@ void SdrPaintView::FlushComeBackTimer() const
 {
     if (bSomeObjChgdFlag) {
         // casting to nonconst
-        ((SdrPaintView*)this)->ImpComeBackHdl(&((SdrPaintView*)this)->aComeBackTimer);
-        ((SdrPaintView*)this)->aComeBackTimer.Stop();
+        ((SdrPaintView*)this)->ImpComeBackHdl(&((SdrPaintView*)this)->aComeBackIdle);
+        ((SdrPaintView*)this)->aComeBackIdle.Stop();
     }
 }
 


More information about the Libreoffice-commits mailing list