changed timers to idles

Change-Id: I1595a9711e3d5c564f1c9028cbb756f2b0ca45f1
This commit is contained in:
Tobias Madl
2014-11-18 15:11:29 +00:00
parent 2a55005675
commit ec5851361b
7 changed files with 46 additions and 46 deletions

View File

@@ -57,7 +57,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vc
pDoc ( NULL ),
pRefInputEdit ( NULL ),
bRefInputMode ( false ),
pTimer ( NULL )
pIdle ( NULL )
{
get(pLbFilterArea,"lbfilterarea");
get(pEdFilterArea,"edfilterarea");
@@ -85,10 +85,10 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vc
pEdFilterArea->GrabFocus();
// Hack: RefInput-Kontrolle
pTimer = new Timer;
pTimer->SetTimeout( 50 ); // 50ms warten
pTimer->SetTimeoutHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
pTimer->Start();
pIdle = new Idle;
pIdle->SetTimeout( VCL_IDLE_PRIORITY_MEDIUM ); // 50ms warten
pIdle->SetIdleHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
pIdle->Start();
pLbCopyArea->SetAccessibleName(pBtnCopyResult->GetText());
pEdCopyArea->SetAccessibleName(pBtnCopyResult->GetText());
@@ -108,8 +108,8 @@ ScSpecialFilterDlg::~ScSpecialFilterDlg()
delete pOutItem;
// Hack: RefInput-Kontrolle
pTimer->Stop();
delete pTimer;
pIdle->Stop();
delete pIdle;
}
void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
@@ -376,11 +376,11 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
return 0;
}
IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer )
IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle )
{
// alle 50ms nachschauen, ob RefInputMode noch stimmt
if( (_pTimer == pTimer) && IsActive() )
if( (_pIdle == pIdle) && IsActive() )
{
if( pEdCopyArea->HasFocus() || pRbCopyArea->HasFocus() )
{
@@ -399,7 +399,7 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer )
}
}
pTimer->Start();
pIdle->Start();
return 0;
}

View File

@@ -206,7 +206,7 @@ private:
bool bRefInputMode;
// Hack: RefInput control
Timer* pTimer;
Idle* pIdle;
private:
void Init( const SfxItemSet& rArgSet );
@@ -220,7 +220,7 @@ private:
DECL_LINK( ScrollHdl, ScrollBar* );
// Hack: RefInput control
DECL_LINK( TimeOutHdl, Timer* );
DECL_LINK( TimeOutHdl, Idle* );
};
#endif // INCLUDED_SC_SOURCE_UI_INC_FILTDLG_HXX

View File

@@ -276,8 +276,8 @@ protected:
Point maDropPos;
::std::vector<OUString> maDropFileVector;
sal_Int8 mnAction;
Timer maDropErrorTimer;
Timer maDropInsertFileTimer;
Idle maDropErrorIdle;
Idle maDropInsertFileIdle;
sal_uInt16 mnLockRedrawSmph;
boost::ptr_vector<SdViewRedrawRec> maLockedRedraws;
bool mbIsDropAllowed;

View File

@@ -138,10 +138,10 @@ View::View(SdDrawDocument& rDrawDoc, OutputDevice* pOutDev,
SetMeasureLayer(SD_RESSTR(STR_LAYER_MEASURELINES));
// Timer for delayed drop (has to be for MAC)
maDropErrorTimer.SetTimeoutHdl( LINK(this, View, DropErrorHdl) );
maDropErrorTimer.SetTimeout(50);
maDropInsertFileTimer.SetTimeoutHdl( LINK(this, View, DropInsertFileHdl) );
maDropInsertFileTimer.SetTimeout(50);
maDropErrorIdle.SetIdleHdl( LINK(this, View, DropErrorHdl) );
maDropErrorIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM);
maDropInsertFileIdle.SetIdleHdl( LINK(this, View, DropInsertFileHdl) );
maDropInsertFileIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM);
}
void View::ImplClearDrawDropMarker()
@@ -160,8 +160,8 @@ View::~View()
// release content of selection clipboard, if we own the content
UpdateSelectionClipboard( true );
maDropErrorTimer.Stop();
maDropInsertFileTimer.Stop();
maDropErrorIdle.Stop();
maDropInsertFileIdle.Stop();
ImplClearDrawDropMarker();

View File

@@ -580,7 +580,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
}
else
{
maDropErrorTimer.Start();
maDropErrorIdle.Start();
bReturn = false;
}
}
@@ -617,7 +617,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
}
else
{
maDropErrorTimer.Start();
maDropErrorIdle.Start();
bReturn = false;
}
}
@@ -1448,7 +1448,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
for( sal_uLong i = 0, nCount = aDropFileList.Count(); i < nCount; i++ )
maDropFileVector.push_back( aDropFileList.GetFile( i ) );
maDropInsertFileTimer.Start();
maDropInsertFileIdle.Start();
}
bReturn = true;
@@ -1462,7 +1462,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
maDropFileVector.clear();
maDropFileVector.push_back( aDropFile );
maDropInsertFileTimer.Start();
maDropInsertFileIdle.Start();
}
bReturn = true;

View File

@@ -52,7 +52,7 @@ public:
bool bConstructed;
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
Timer aMoveTimer;
Idle aMoveIdle;
};
void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
@@ -75,7 +75,7 @@ public:
OString aWinState;
SfxChildWindow* pMgr;
bool bConstructed;
Timer aMoveTimer;
Idle aMoveIdle;
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
};
@@ -267,7 +267,7 @@ void SfxModelessDialog::Resize()
if ( pImp->bConstructed && pImp->pMgr )
{
// start timer for saving window status information
pImp->aMoveTimer.Start();
pImp->aMoveIdle.Start();
}
}
@@ -277,7 +277,7 @@ void SfxModelessDialog::Move()
if ( pImp->bConstructed && pImp->pMgr && IsReallyVisible() )
{
// start timer for saving window status information
pImp->aMoveTimer.Start();
pImp->aMoveIdle.Start();
}
}
@@ -287,7 +287,7 @@ void SfxModelessDialog::Move()
*/
IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl)
{
pImp->aMoveTimer.Stop();
pImp->aMoveIdle.Stop();
if ( pImp->bConstructed && pImp->pMgr )
{
if ( !IsRollUp() )
@@ -318,8 +318,8 @@ void SfxModelessDialog::Init(SfxBindings *pBindinx, SfxChildWindow *pCW)
SetUniqueId( GetHelpId() );
if ( pBindinx )
pImp->StartListening( *pBindinx );
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxModelessDialog,TimerHdl));
pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxModelessDialog,TimerHdl));
}
/* [Description]
@@ -457,8 +457,8 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
SetHelpId("");
if ( pBindinx )
pImp->StartListening( *pBindinx );
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl));
pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl));
}
SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
@@ -478,8 +478,8 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
if ( pBindinx )
pImp->StartListening( *pBindinx );
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl));
pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl));
}
bool SfxFloatingWindow::Close()
@@ -532,7 +532,7 @@ void SfxFloatingWindow::Resize()
if ( pImp->bConstructed && pImp->pMgr )
{
// start timer for saving window status information
pImp->aMoveTimer.Start();
pImp->aMoveIdle.Start();
}
}
@@ -542,7 +542,7 @@ void SfxFloatingWindow::Move()
if ( pImp->bConstructed && pImp->pMgr )
{
// start timer for saving window status information
pImp->aMoveTimer.Start();
pImp->aMoveIdle.Start();
}
}
@@ -552,7 +552,7 @@ void SfxFloatingWindow::Move()
*/
IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl)
{
pImp->aMoveTimer.Stop();
pImp->aMoveIdle.Stop();
if ( pImp->bConstructed && pImp->pMgr )
{
if ( !IsRollUp() )

View File

@@ -403,7 +403,7 @@ friend class SfxDockingWindow;
Size aMinSize;
SfxSplitWindow* pSplitWin;
bool bSplitable;
Timer aMoveTimer;
Idle aMoveIdle;
// The following members are only valid in the time from startDocking to
// EndDocking:
@@ -447,7 +447,7 @@ void SfxDockingWindow::Resize()
if ( IsFloatingMode() )
{
// start timer for saving window status information
pImp->aMoveTimer.Start();
pImp->aMoveIdle.Start();
}
else
{
@@ -888,8 +888,8 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp->nPos = pImp->nDockPos = 0;
pImp->bNewLine = false;
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl));
pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl));
}
@@ -939,8 +939,8 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp->nPos = pImp->nDockPos = 0;
pImp->bNewLine = false;
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl));
pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl));
}
@@ -1869,12 +1869,12 @@ void SfxDockingWindow::StateChanged( StateChangedType nStateChange )
void SfxDockingWindow::Move()
{
if ( pImp )
pImp->aMoveTimer.Start();
pImp->aMoveIdle.Start();
}
IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl)
{
pImp->aMoveTimer.Stop();
pImp->aMoveIdle.Stop();
if ( IsReallyVisible() && IsFloatingMode() )
{
if( !GetFloatingWindow()->IsRollUp() )