summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJennifer Liebel <jliebel94@gmail.com>2014-11-06 14:18:54 +0000
committerTobias Madl <tobias.madl.dev@gmail.com>2014-12-09 12:34:51 +0000
commit7523b588f16e14f87c8146118a1f050f680795fa (patch)
treec66173cd0a556ebae6bc4a08c1aa7d4f768cf91c
parent18102201f4a68bc41f7caa21fc22ec761812b70b (diff)
changed timers to idles
Change-Id: Ic045e0c066ff1f607f0582b88e72375efaaa708f
-rw-r--r--basctl/source/dlged/dlged.cxx8
-rw-r--r--basctl/source/inc/dlged.hxx2
-rw-r--r--sc/source/ui/docshell/autostyl.cxx6
-rw-r--r--sc/source/ui/inc/autostyl.hxx2
-rw-r--r--svtools/source/contnr/svimpbox.cxx22
-rw-r--r--svtools/source/inc/svimpbox.hxx9
6 files changed, 24 insertions, 25 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 5a00fc4fcd17..2ba6fcff1fcf 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -220,8 +220,8 @@ DlgEditor::DlgEditor (
m_ClipboardDataFlavorsResource[1].HumanPresentableName = "Dialog 8.0" ;
m_ClipboardDataFlavorsResource[1].DataType = ::getCppuType( (const Sequence< sal_Int8 >*) 0 );
- aMarkTimer.SetTimeout( 100 );
- aMarkTimer.SetTimeoutHdl( LINK( this, DlgEditor, MarkTimeout ) );
+ aMarkIdle.SetPriority(VCL_IDLE_PRIORITY_LOW);
+ aMarkIdle.SetIdleHdl( LINK( this, DlgEditor, MarkTimeout ) );
rWindow.SetMapMode( MapMode( MAP_100TH_MM ) );
pDlgEdPage->SetSize( rWindow.PixelToLogic( Size(DLGED_PAGE_WIDTH_MIN, DLGED_PAGE_HEIGHT_MIN) ) );
@@ -247,7 +247,7 @@ DlgEditor::DlgEditor (
DlgEditor::~DlgEditor()
{
- aMarkTimer.Stop();
+ aMarkIdle.Stop();
::comphelper::disposeComponent( m_xControlContainer );
}
@@ -1079,7 +1079,7 @@ void DlgEditor::ShowProperties()
void DlgEditor::UpdatePropertyBrowserDelayed()
{
- aMarkTimer.Start();
+ aMarkIdle.Start();
}
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 5204262df2cb..cd722fed6846 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -129,7 +129,7 @@ private:
bool bCreateOK;
Rectangle aPaintRect;
bool bDialogModelChanged;
- Timer aMarkTimer;
+ Idle aMarkIdle;
long mnPaintGuard;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument;
diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx
index 7873310fd4c5..d7b9374e5aec 100644
--- a/sc/source/ui/docshell/autostyl.cxx
+++ b/sc/source/ui/docshell/autostyl.cxx
@@ -83,8 +83,8 @@ ScAutoStyleList::ScAutoStyleList(ScDocShell* pShell)
, nTimerStart(0)
{
aTimer.SetTimeoutHdl( LINK( this, ScAutoStyleList, TimerHdl ) );
- aInitTimer.SetTimeoutHdl( LINK( this, ScAutoStyleList, InitHdl ) );
- aInitTimer.SetTimeout( 0 );
+ aInitIdle.SetIdleHdl( LINK( this, ScAutoStyleList, InitHdl ) );
+ aInitIdle.SetPriority( VCL_IDLE_PRIORITY_HIGHEST );
}
ScAutoStyleList::~ScAutoStyleList()
@@ -97,7 +97,7 @@ void ScAutoStyleList::AddInitial( const ScRange& rRange, const OUString& rStyle1
sal_uLong nTimeout, const OUString& rStyle2 )
{
aInitials.push_back(new ScAutoStyleInitData( rRange, rStyle1, nTimeout, rStyle2 ));
- aInitTimer.Start();
+ aInitIdle.Start();
}
IMPL_LINK_NOARG(ScAutoStyleList, InitHdl)
diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx
index 746f52e966a5..6ffd437ce552 100644
--- a/sc/source/ui/inc/autostyl.hxx
+++ b/sc/source/ui/inc/autostyl.hxx
@@ -35,7 +35,7 @@ private:
ScDocShell* pDocSh;
Timer aTimer;
- Timer aInitTimer;
+ Idle aInitIdle;
sal_uLong nTimerStart;
boost::ptr_vector<ScAutoStyleData> aEntries;
boost::ptr_vector<ScAutoStyleInitData> aInitials;
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 3a16820e7579..0162b97c739a 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -89,8 +89,8 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
nNodeBmpWidth = 0;
bAsyncBeginDrag = false;
- aAsyncBeginDragTimer.SetTimeout( 0 );
- aAsyncBeginDragTimer.SetTimeoutHdl( LINK(this,SvImpLBox,BeginDragHdl));
+ aAsyncBeginDragIdle.SetPriority( VCL_IDLE_PRIORITY_HIGHEST );
+ aAsyncBeginDragIdle.SetIdleHdl( LINK(this,SvImpLBox,BeginDragHdl));
// button animation in listbox
pActiveButton = 0;
pActiveEntry = 0;
@@ -99,8 +99,8 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
nFlags = 0;
nCurTabPos = FIRST_ENTRY_TAB;
- aEditTimer.SetTimeout( 800 );
- aEditTimer.SetTimeoutHdl( LINK(this,SvImpLBox,EditTimerCall) );
+ aEditIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+ aEditIdle.SetIdleHdl( LINK(this,SvImpLBox,EditTimerCall) );
nMostRight = -1;
pMostRightEntry = 0;
@@ -115,7 +115,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
SvImpLBox::~SvImpLBox()
{
- aEditTimer.Stop();
+ aEditIdle.Stop();
StopUserEvent();
delete m_pStringSorter;
@@ -2037,7 +2037,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
if ( !rMEvt.IsLeft() && !rMEvt.IsRight())
return;
- aEditTimer.Stop();
+ aEditIdle.Stop();
Point aPos( rMEvt.GetPosPixel());
if( aPos.X() > aOutputSize.Width() || aPos.Y() > aOutputSize.Height() )
@@ -2128,7 +2128,7 @@ void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt)
{
nFlags &= (~F_START_EDITTIMER);
aEditClickPos = rMEvt.GetPosPixel();
- aEditTimer.Start();
+ aEditIdle.Start();
}
return;
@@ -2144,7 +2144,7 @@ void SvImpLBox::MouseMove( const MouseEvent& rMEvt)
bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
{
- aEditTimer.Stop();
+ aEditIdle.Stop();
const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
if( rKeyCode.IsMod2() )
@@ -2622,7 +2622,7 @@ void SvImpLBox::GetFocus()
void SvImpLBox::LoseFocus()
{
- aEditTimer.Stop();
+ aEditIdle.Stop();
if( pCursor )
pView->SetEntryFocus( pCursor,false );
ShowCursor( false );
@@ -2933,7 +2933,7 @@ void SvImpLBox::BeginDrag()
else
{
aAsyncBeginDragPos = aSelEng.GetMousePosPixel();
- aAsyncBeginDragTimer.Start();
+ aAsyncBeginDragIdle.Start();
}
}
@@ -2981,7 +2981,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
sal_uInt16 nCommand = rCEvt.GetCommand();
if( nCommand == COMMAND_CONTEXTMENU )
- aEditTimer.Stop();
+ aEditIdle.Stop();
// scroll mouse event?
if( ( ( nCommand == COMMAND_WHEEL ) || ( nCommand == COMMAND_STARTAUTOSCROLL ) || ( nCommand == COMMAND_AUTOSCROLL ) )
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index a897aa3320a7..84a5235d9758 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -122,19 +122,18 @@ private:
// all our images
Image m_aNodeAndEntryImages[ IT_IMAGE_COUNT ];
- // wg. kompat. hier
Size aOutputSize;
SelectionEngine aSelEng;
ImpLBSelEng aFctSet;
- Timer aAsyncBeginDragTimer;
+ Idle aAsyncBeginDragIdle;
Point aAsyncBeginDragPos;
long nYoffsNodeBmp;
- long nNodeBmpTabDistance; // typisch kleiner 0
+ long nNodeBmpTabDistance; // typical smaller than 0
long nNodeBmpWidth;
long nNextVerVisSize;
long nMostRight;
- sal_uLong nVisibleCount; // Anzahl Zeilen im Control
+ sal_uLong nVisibleCount; // Number of lines in control
ImplSVEvent * nCurUserEvent;
short nHorSBarHeight, nVerSBarWidth;
sal_uInt16 nFlags;
@@ -154,7 +153,7 @@ private:
bool bAreChildrenTransient;
Point aEditClickPos;
- Timer aEditTimer;
+ Idle aEditIdle;
// #102891# -------------------
comphelper::string::NaturalStringSorter *m_pStringSorter;