Kaydet (Commit) edabf0c5 authored tarafından Jennifer Liebel's avatar Jennifer Liebel Kaydeden (comit) Michael Meeks

changed some timer to idle

Change-Id: Ifd5e2d87732d3e537c7754e52be24ef768ecb8d9
üst d6e89e75
......@@ -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
......
......@@ -182,7 +182,7 @@ struct FormatterFontMetric
sal_uInt16 GetHeight() const { return nMaxAscent+nMaxDescent; }
};
class IdleFormattter : public Timer
class IdleFormattter : public Idle
{
private:
EditView* pView;
......
......@@ -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 );
......
......@@ -152,7 +152,7 @@ protected:
SdrDragStat aDragStat;
Rectangle aMaxWorkArea;
SfxItemSet aDefaultAttr;
Timer aComeBackTimer;
Idle aComeBackIdle;
SdrAnimationMode eAnimationMode;
......
......@@ -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;
}
......
......@@ -114,7 +114,7 @@ public:
class SdrView;
class SdrItemBrowser: public _SdrItemBrowserWindow {
Timer aIdleTimer;
Idle aIdleTimer;
SdrView* pView;
bool bDirty;
private:
......
......@@ -1107,7 +1107,7 @@ void SdrItemBrowser::SetDirty()
{
if (!bDirty) {
bDirty = true;
aIdleTimer.SetTimeout(1);
aIdleTimer.SetPriority(VCL_IDLE_PRIORITY_HIGH);
aIdleTimer.Start();
}
}
......
......@@ -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();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment