Kaydet (Commit) 7523b588 authored tarafından Jennifer Liebel's avatar Jennifer Liebel Kaydeden (comit) Tobias Madl

changed timers to idles

Change-Id: Ic045e0c066ff1f607f0582b88e72375efaaa708f
üst 18102201
...@@ -220,8 +220,8 @@ DlgEditor::DlgEditor ( ...@@ -220,8 +220,8 @@ DlgEditor::DlgEditor (
m_ClipboardDataFlavorsResource[1].HumanPresentableName = "Dialog 8.0" ; m_ClipboardDataFlavorsResource[1].HumanPresentableName = "Dialog 8.0" ;
m_ClipboardDataFlavorsResource[1].DataType = ::getCppuType( (const Sequence< sal_Int8 >*) 0 ); m_ClipboardDataFlavorsResource[1].DataType = ::getCppuType( (const Sequence< sal_Int8 >*) 0 );
aMarkTimer.SetTimeout( 100 ); aMarkIdle.SetPriority(VCL_IDLE_PRIORITY_LOW);
aMarkTimer.SetTimeoutHdl( LINK( this, DlgEditor, MarkTimeout ) ); aMarkIdle.SetIdleHdl( LINK( this, DlgEditor, MarkTimeout ) );
rWindow.SetMapMode( MapMode( MAP_100TH_MM ) ); rWindow.SetMapMode( MapMode( MAP_100TH_MM ) );
pDlgEdPage->SetSize( rWindow.PixelToLogic( Size(DLGED_PAGE_WIDTH_MIN, DLGED_PAGE_HEIGHT_MIN) ) ); pDlgEdPage->SetSize( rWindow.PixelToLogic( Size(DLGED_PAGE_WIDTH_MIN, DLGED_PAGE_HEIGHT_MIN) ) );
...@@ -247,7 +247,7 @@ DlgEditor::DlgEditor ( ...@@ -247,7 +247,7 @@ DlgEditor::DlgEditor (
DlgEditor::~DlgEditor() DlgEditor::~DlgEditor()
{ {
aMarkTimer.Stop(); aMarkIdle.Stop();
::comphelper::disposeComponent( m_xControlContainer ); ::comphelper::disposeComponent( m_xControlContainer );
} }
...@@ -1079,7 +1079,7 @@ void DlgEditor::ShowProperties() ...@@ -1079,7 +1079,7 @@ void DlgEditor::ShowProperties()
void DlgEditor::UpdatePropertyBrowserDelayed() void DlgEditor::UpdatePropertyBrowserDelayed()
{ {
aMarkTimer.Start(); aMarkIdle.Start();
} }
......
...@@ -129,7 +129,7 @@ private: ...@@ -129,7 +129,7 @@ private:
bool bCreateOK; bool bCreateOK;
Rectangle aPaintRect; Rectangle aPaintRect;
bool bDialogModelChanged; bool bDialogModelChanged;
Timer aMarkTimer; Idle aMarkIdle;
long mnPaintGuard; long mnPaintGuard;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument;
......
...@@ -83,8 +83,8 @@ ScAutoStyleList::ScAutoStyleList(ScDocShell* pShell) ...@@ -83,8 +83,8 @@ ScAutoStyleList::ScAutoStyleList(ScDocShell* pShell)
, nTimerStart(0) , nTimerStart(0)
{ {
aTimer.SetTimeoutHdl( LINK( this, ScAutoStyleList, TimerHdl ) ); aTimer.SetTimeoutHdl( LINK( this, ScAutoStyleList, TimerHdl ) );
aInitTimer.SetTimeoutHdl( LINK( this, ScAutoStyleList, InitHdl ) ); aInitIdle.SetIdleHdl( LINK( this, ScAutoStyleList, InitHdl ) );
aInitTimer.SetTimeout( 0 ); aInitIdle.SetPriority( VCL_IDLE_PRIORITY_HIGHEST );
} }
ScAutoStyleList::~ScAutoStyleList() ScAutoStyleList::~ScAutoStyleList()
...@@ -97,7 +97,7 @@ void ScAutoStyleList::AddInitial( const ScRange& rRange, const OUString& rStyle1 ...@@ -97,7 +97,7 @@ void ScAutoStyleList::AddInitial( const ScRange& rRange, const OUString& rStyle1
sal_uLong nTimeout, const OUString& rStyle2 ) sal_uLong nTimeout, const OUString& rStyle2 )
{ {
aInitials.push_back(new ScAutoStyleInitData( rRange, rStyle1, nTimeout, rStyle2 )); aInitials.push_back(new ScAutoStyleInitData( rRange, rStyle1, nTimeout, rStyle2 ));
aInitTimer.Start(); aInitIdle.Start();
} }
IMPL_LINK_NOARG(ScAutoStyleList, InitHdl) IMPL_LINK_NOARG(ScAutoStyleList, InitHdl)
......
...@@ -35,7 +35,7 @@ private: ...@@ -35,7 +35,7 @@ private:
ScDocShell* pDocSh; ScDocShell* pDocSh;
Timer aTimer; Timer aTimer;
Timer aInitTimer; Idle aInitIdle;
sal_uLong nTimerStart; sal_uLong nTimerStart;
boost::ptr_vector<ScAutoStyleData> aEntries; boost::ptr_vector<ScAutoStyleData> aEntries;
boost::ptr_vector<ScAutoStyleInitData> aInitials; boost::ptr_vector<ScAutoStyleInitData> aInitials;
......
...@@ -89,8 +89,8 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS ...@@ -89,8 +89,8 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
nNodeBmpWidth = 0; nNodeBmpWidth = 0;
bAsyncBeginDrag = false; bAsyncBeginDrag = false;
aAsyncBeginDragTimer.SetTimeout( 0 ); aAsyncBeginDragIdle.SetPriority( VCL_IDLE_PRIORITY_HIGHEST );
aAsyncBeginDragTimer.SetTimeoutHdl( LINK(this,SvImpLBox,BeginDragHdl)); aAsyncBeginDragIdle.SetIdleHdl( LINK(this,SvImpLBox,BeginDragHdl));
// button animation in listbox // button animation in listbox
pActiveButton = 0; pActiveButton = 0;
pActiveEntry = 0; pActiveEntry = 0;
...@@ -99,8 +99,8 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS ...@@ -99,8 +99,8 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
nFlags = 0; nFlags = 0;
nCurTabPos = FIRST_ENTRY_TAB; nCurTabPos = FIRST_ENTRY_TAB;
aEditTimer.SetTimeout( 800 ); aEditIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
aEditTimer.SetTimeoutHdl( LINK(this,SvImpLBox,EditTimerCall) ); aEditIdle.SetIdleHdl( LINK(this,SvImpLBox,EditTimerCall) );
nMostRight = -1; nMostRight = -1;
pMostRightEntry = 0; pMostRightEntry = 0;
...@@ -115,7 +115,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS ...@@ -115,7 +115,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
SvImpLBox::~SvImpLBox() SvImpLBox::~SvImpLBox()
{ {
aEditTimer.Stop(); aEditIdle.Stop();
StopUserEvent(); StopUserEvent();
delete m_pStringSorter; delete m_pStringSorter;
...@@ -2037,7 +2037,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt ) ...@@ -2037,7 +2037,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
if ( !rMEvt.IsLeft() && !rMEvt.IsRight()) if ( !rMEvt.IsLeft() && !rMEvt.IsRight())
return; return;
aEditTimer.Stop(); aEditIdle.Stop();
Point aPos( rMEvt.GetPosPixel()); Point aPos( rMEvt.GetPosPixel());
if( aPos.X() > aOutputSize.Width() || aPos.Y() > aOutputSize.Height() ) if( aPos.X() > aOutputSize.Width() || aPos.Y() > aOutputSize.Height() )
...@@ -2128,7 +2128,7 @@ void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt) ...@@ -2128,7 +2128,7 @@ void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt)
{ {
nFlags &= (~F_START_EDITTIMER); nFlags &= (~F_START_EDITTIMER);
aEditClickPos = rMEvt.GetPosPixel(); aEditClickPos = rMEvt.GetPosPixel();
aEditTimer.Start(); aEditIdle.Start();
} }
return; return;
...@@ -2144,7 +2144,7 @@ void SvImpLBox::MouseMove( const MouseEvent& rMEvt) ...@@ -2144,7 +2144,7 @@ void SvImpLBox::MouseMove( const MouseEvent& rMEvt)
bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
{ {
aEditTimer.Stop(); aEditIdle.Stop();
const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
if( rKeyCode.IsMod2() ) if( rKeyCode.IsMod2() )
...@@ -2622,7 +2622,7 @@ void SvImpLBox::GetFocus() ...@@ -2622,7 +2622,7 @@ void SvImpLBox::GetFocus()
void SvImpLBox::LoseFocus() void SvImpLBox::LoseFocus()
{ {
aEditTimer.Stop(); aEditIdle.Stop();
if( pCursor ) if( pCursor )
pView->SetEntryFocus( pCursor,false ); pView->SetEntryFocus( pCursor,false );
ShowCursor( false ); ShowCursor( false );
...@@ -2933,7 +2933,7 @@ void SvImpLBox::BeginDrag() ...@@ -2933,7 +2933,7 @@ void SvImpLBox::BeginDrag()
else else
{ {
aAsyncBeginDragPos = aSelEng.GetMousePosPixel(); aAsyncBeginDragPos = aSelEng.GetMousePosPixel();
aAsyncBeginDragTimer.Start(); aAsyncBeginDragIdle.Start();
} }
} }
...@@ -2981,7 +2981,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt ) ...@@ -2981,7 +2981,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
sal_uInt16 nCommand = rCEvt.GetCommand(); sal_uInt16 nCommand = rCEvt.GetCommand();
if( nCommand == COMMAND_CONTEXTMENU ) if( nCommand == COMMAND_CONTEXTMENU )
aEditTimer.Stop(); aEditIdle.Stop();
// scroll mouse event? // scroll mouse event?
if( ( ( nCommand == COMMAND_WHEEL ) || ( nCommand == COMMAND_STARTAUTOSCROLL ) || ( nCommand == COMMAND_AUTOSCROLL ) ) if( ( ( nCommand == COMMAND_WHEEL ) || ( nCommand == COMMAND_STARTAUTOSCROLL ) || ( nCommand == COMMAND_AUTOSCROLL ) )
......
...@@ -122,19 +122,18 @@ private: ...@@ -122,19 +122,18 @@ private:
// all our images // all our images
Image m_aNodeAndEntryImages[ IT_IMAGE_COUNT ]; Image m_aNodeAndEntryImages[ IT_IMAGE_COUNT ];
// wg. kompat. hier
Size aOutputSize; Size aOutputSize;
SelectionEngine aSelEng; SelectionEngine aSelEng;
ImpLBSelEng aFctSet; ImpLBSelEng aFctSet;
Timer aAsyncBeginDragTimer; Idle aAsyncBeginDragIdle;
Point aAsyncBeginDragPos; Point aAsyncBeginDragPos;
long nYoffsNodeBmp; long nYoffsNodeBmp;
long nNodeBmpTabDistance; // typisch kleiner 0 long nNodeBmpTabDistance; // typical smaller than 0
long nNodeBmpWidth; long nNodeBmpWidth;
long nNextVerVisSize; long nNextVerVisSize;
long nMostRight; long nMostRight;
sal_uLong nVisibleCount; // Anzahl Zeilen im Control sal_uLong nVisibleCount; // Number of lines in control
ImplSVEvent * nCurUserEvent; ImplSVEvent * nCurUserEvent;
short nHorSBarHeight, nVerSBarWidth; short nHorSBarHeight, nVerSBarWidth;
sal_uInt16 nFlags; sal_uInt16 nFlags;
...@@ -154,7 +153,7 @@ private: ...@@ -154,7 +153,7 @@ private:
bool bAreChildrenTransient; bool bAreChildrenTransient;
Point aEditClickPos; Point aEditClickPos;
Timer aEditTimer; Idle aEditIdle;
// #102891# ------------------- // #102891# -------------------
comphelper::string::NaturalStringSorter *m_pStringSorter; comphelper::string::NaturalStringSorter *m_pStringSorter;
......
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