changed timers to idles
Change-Id: I1595a9711e3d5c564f1c9028cbb756f2b0ca45f1
This commit is contained in:
@@ -57,7 +57,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vc
|
|||||||
pDoc ( NULL ),
|
pDoc ( NULL ),
|
||||||
pRefInputEdit ( NULL ),
|
pRefInputEdit ( NULL ),
|
||||||
bRefInputMode ( false ),
|
bRefInputMode ( false ),
|
||||||
pTimer ( NULL )
|
pIdle ( NULL )
|
||||||
{
|
{
|
||||||
get(pLbFilterArea,"lbfilterarea");
|
get(pLbFilterArea,"lbfilterarea");
|
||||||
get(pEdFilterArea,"edfilterarea");
|
get(pEdFilterArea,"edfilterarea");
|
||||||
@@ -85,10 +85,10 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vc
|
|||||||
pEdFilterArea->GrabFocus();
|
pEdFilterArea->GrabFocus();
|
||||||
|
|
||||||
// Hack: RefInput-Kontrolle
|
// Hack: RefInput-Kontrolle
|
||||||
pTimer = new Timer;
|
pIdle = new Idle;
|
||||||
pTimer->SetTimeout( 50 ); // 50ms warten
|
pIdle->SetTimeout( VCL_IDLE_PRIORITY_MEDIUM ); // 50ms warten
|
||||||
pTimer->SetTimeoutHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
|
pIdle->SetIdleHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
|
||||||
pTimer->Start();
|
pIdle->Start();
|
||||||
|
|
||||||
pLbCopyArea->SetAccessibleName(pBtnCopyResult->GetText());
|
pLbCopyArea->SetAccessibleName(pBtnCopyResult->GetText());
|
||||||
pEdCopyArea->SetAccessibleName(pBtnCopyResult->GetText());
|
pEdCopyArea->SetAccessibleName(pBtnCopyResult->GetText());
|
||||||
@@ -108,8 +108,8 @@ ScSpecialFilterDlg::~ScSpecialFilterDlg()
|
|||||||
delete pOutItem;
|
delete pOutItem;
|
||||||
|
|
||||||
// Hack: RefInput-Kontrolle
|
// Hack: RefInput-Kontrolle
|
||||||
pTimer->Stop();
|
pIdle->Stop();
|
||||||
delete pTimer;
|
delete pIdle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
|
void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
|
||||||
@@ -376,11 +376,11 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer )
|
IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle )
|
||||||
{
|
{
|
||||||
// alle 50ms nachschauen, ob RefInputMode noch stimmt
|
// alle 50ms nachschauen, ob RefInputMode noch stimmt
|
||||||
|
|
||||||
if( (_pTimer == pTimer) && IsActive() )
|
if( (_pIdle == pIdle) && IsActive() )
|
||||||
{
|
{
|
||||||
if( pEdCopyArea->HasFocus() || pRbCopyArea->HasFocus() )
|
if( pEdCopyArea->HasFocus() || pRbCopyArea->HasFocus() )
|
||||||
{
|
{
|
||||||
@@ -399,7 +399,7 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pTimer->Start();
|
pIdle->Start();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -206,7 +206,7 @@ private:
|
|||||||
bool bRefInputMode;
|
bool bRefInputMode;
|
||||||
|
|
||||||
// Hack: RefInput control
|
// Hack: RefInput control
|
||||||
Timer* pTimer;
|
Idle* pIdle;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init( const SfxItemSet& rArgSet );
|
void Init( const SfxItemSet& rArgSet );
|
||||||
@@ -220,7 +220,7 @@ private:
|
|||||||
DECL_LINK( ScrollHdl, ScrollBar* );
|
DECL_LINK( ScrollHdl, ScrollBar* );
|
||||||
|
|
||||||
// Hack: RefInput control
|
// Hack: RefInput control
|
||||||
DECL_LINK( TimeOutHdl, Timer* );
|
DECL_LINK( TimeOutHdl, Idle* );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDED_SC_SOURCE_UI_INC_FILTDLG_HXX
|
#endif // INCLUDED_SC_SOURCE_UI_INC_FILTDLG_HXX
|
||||||
|
@@ -276,8 +276,8 @@ protected:
|
|||||||
Point maDropPos;
|
Point maDropPos;
|
||||||
::std::vector<OUString> maDropFileVector;
|
::std::vector<OUString> maDropFileVector;
|
||||||
sal_Int8 mnAction;
|
sal_Int8 mnAction;
|
||||||
Timer maDropErrorTimer;
|
Idle maDropErrorIdle;
|
||||||
Timer maDropInsertFileTimer;
|
Idle maDropInsertFileIdle;
|
||||||
sal_uInt16 mnLockRedrawSmph;
|
sal_uInt16 mnLockRedrawSmph;
|
||||||
boost::ptr_vector<SdViewRedrawRec> maLockedRedraws;
|
boost::ptr_vector<SdViewRedrawRec> maLockedRedraws;
|
||||||
bool mbIsDropAllowed;
|
bool mbIsDropAllowed;
|
||||||
|
@@ -138,10 +138,10 @@ View::View(SdDrawDocument& rDrawDoc, OutputDevice* pOutDev,
|
|||||||
SetMeasureLayer(SD_RESSTR(STR_LAYER_MEASURELINES));
|
SetMeasureLayer(SD_RESSTR(STR_LAYER_MEASURELINES));
|
||||||
|
|
||||||
// Timer for delayed drop (has to be for MAC)
|
// Timer for delayed drop (has to be for MAC)
|
||||||
maDropErrorTimer.SetTimeoutHdl( LINK(this, View, DropErrorHdl) );
|
maDropErrorIdle.SetIdleHdl( LINK(this, View, DropErrorHdl) );
|
||||||
maDropErrorTimer.SetTimeout(50);
|
maDropErrorIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM);
|
||||||
maDropInsertFileTimer.SetTimeoutHdl( LINK(this, View, DropInsertFileHdl) );
|
maDropInsertFileIdle.SetIdleHdl( LINK(this, View, DropInsertFileHdl) );
|
||||||
maDropInsertFileTimer.SetTimeout(50);
|
maDropInsertFileIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM);
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::ImplClearDrawDropMarker()
|
void View::ImplClearDrawDropMarker()
|
||||||
@@ -160,8 +160,8 @@ View::~View()
|
|||||||
// release content of selection clipboard, if we own the content
|
// release content of selection clipboard, if we own the content
|
||||||
UpdateSelectionClipboard( true );
|
UpdateSelectionClipboard( true );
|
||||||
|
|
||||||
maDropErrorTimer.Stop();
|
maDropErrorIdle.Stop();
|
||||||
maDropInsertFileTimer.Stop();
|
maDropInsertFileIdle.Stop();
|
||||||
|
|
||||||
ImplClearDrawDropMarker();
|
ImplClearDrawDropMarker();
|
||||||
|
|
||||||
|
@@ -580,7 +580,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
maDropErrorTimer.Start();
|
maDropErrorIdle.Start();
|
||||||
bReturn = false;
|
bReturn = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -617,7 +617,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
maDropErrorTimer.Start();
|
maDropErrorIdle.Start();
|
||||||
bReturn = false;
|
bReturn = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1448,7 +1448,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
|||||||
for( sal_uLong i = 0, nCount = aDropFileList.Count(); i < nCount; i++ )
|
for( sal_uLong i = 0, nCount = aDropFileList.Count(); i < nCount; i++ )
|
||||||
maDropFileVector.push_back( aDropFileList.GetFile( i ) );
|
maDropFileVector.push_back( aDropFileList.GetFile( i ) );
|
||||||
|
|
||||||
maDropInsertFileTimer.Start();
|
maDropInsertFileIdle.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
bReturn = true;
|
bReturn = true;
|
||||||
@@ -1462,7 +1462,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
|||||||
{
|
{
|
||||||
maDropFileVector.clear();
|
maDropFileVector.clear();
|
||||||
maDropFileVector.push_back( aDropFile );
|
maDropFileVector.push_back( aDropFile );
|
||||||
maDropInsertFileTimer.Start();
|
maDropInsertFileIdle.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
bReturn = true;
|
bReturn = true;
|
||||||
|
@@ -52,7 +52,7 @@ public:
|
|||||||
bool bConstructed;
|
bool bConstructed;
|
||||||
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
|
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
|
||||||
|
|
||||||
Timer aMoveTimer;
|
Idle aMoveIdle;
|
||||||
};
|
};
|
||||||
|
|
||||||
void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
|
void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
|
||||||
@@ -75,7 +75,7 @@ public:
|
|||||||
OString aWinState;
|
OString aWinState;
|
||||||
SfxChildWindow* pMgr;
|
SfxChildWindow* pMgr;
|
||||||
bool bConstructed;
|
bool bConstructed;
|
||||||
Timer aMoveTimer;
|
Idle aMoveIdle;
|
||||||
|
|
||||||
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
|
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
@@ -267,7 +267,7 @@ void SfxModelessDialog::Resize()
|
|||||||
if ( pImp->bConstructed && pImp->pMgr )
|
if ( pImp->bConstructed && pImp->pMgr )
|
||||||
{
|
{
|
||||||
// start timer for saving window status information
|
// 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() )
|
if ( pImp->bConstructed && pImp->pMgr && IsReallyVisible() )
|
||||||
{
|
{
|
||||||
// start timer for saving window status information
|
// 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)
|
IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl)
|
||||||
{
|
{
|
||||||
pImp->aMoveTimer.Stop();
|
pImp->aMoveIdle.Stop();
|
||||||
if ( pImp->bConstructed && pImp->pMgr )
|
if ( pImp->bConstructed && pImp->pMgr )
|
||||||
{
|
{
|
||||||
if ( !IsRollUp() )
|
if ( !IsRollUp() )
|
||||||
@@ -318,8 +318,8 @@ void SfxModelessDialog::Init(SfxBindings *pBindinx, SfxChildWindow *pCW)
|
|||||||
SetUniqueId( GetHelpId() );
|
SetUniqueId( GetHelpId() );
|
||||||
if ( pBindinx )
|
if ( pBindinx )
|
||||||
pImp->StartListening( *pBindinx );
|
pImp->StartListening( *pBindinx );
|
||||||
pImp->aMoveTimer.SetTimeout(50);
|
pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
|
||||||
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxModelessDialog,TimerHdl));
|
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxModelessDialog,TimerHdl));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* [Description]
|
/* [Description]
|
||||||
@@ -457,8 +457,8 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
|
|||||||
SetHelpId("");
|
SetHelpId("");
|
||||||
if ( pBindinx )
|
if ( pBindinx )
|
||||||
pImp->StartListening( *pBindinx );
|
pImp->StartListening( *pBindinx );
|
||||||
pImp->aMoveTimer.SetTimeout(50);
|
pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
|
||||||
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl));
|
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl));
|
||||||
}
|
}
|
||||||
|
|
||||||
SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
|
SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
|
||||||
@@ -478,8 +478,8 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
|
|||||||
|
|
||||||
if ( pBindinx )
|
if ( pBindinx )
|
||||||
pImp->StartListening( *pBindinx );
|
pImp->StartListening( *pBindinx );
|
||||||
pImp->aMoveTimer.SetTimeout(50);
|
pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
|
||||||
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl));
|
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxFloatingWindow,TimerHdl));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SfxFloatingWindow::Close()
|
bool SfxFloatingWindow::Close()
|
||||||
@@ -532,7 +532,7 @@ void SfxFloatingWindow::Resize()
|
|||||||
if ( pImp->bConstructed && pImp->pMgr )
|
if ( pImp->bConstructed && pImp->pMgr )
|
||||||
{
|
{
|
||||||
// start timer for saving window status information
|
// 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 )
|
if ( pImp->bConstructed && pImp->pMgr )
|
||||||
{
|
{
|
||||||
// start timer for saving window status information
|
// 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)
|
IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl)
|
||||||
{
|
{
|
||||||
pImp->aMoveTimer.Stop();
|
pImp->aMoveIdle.Stop();
|
||||||
if ( pImp->bConstructed && pImp->pMgr )
|
if ( pImp->bConstructed && pImp->pMgr )
|
||||||
{
|
{
|
||||||
if ( !IsRollUp() )
|
if ( !IsRollUp() )
|
||||||
|
@@ -403,7 +403,7 @@ friend class SfxDockingWindow;
|
|||||||
Size aMinSize;
|
Size aMinSize;
|
||||||
SfxSplitWindow* pSplitWin;
|
SfxSplitWindow* pSplitWin;
|
||||||
bool bSplitable;
|
bool bSplitable;
|
||||||
Timer aMoveTimer;
|
Idle aMoveIdle;
|
||||||
|
|
||||||
// The following members are only valid in the time from startDocking to
|
// The following members are only valid in the time from startDocking to
|
||||||
// EndDocking:
|
// EndDocking:
|
||||||
@@ -447,7 +447,7 @@ void SfxDockingWindow::Resize()
|
|||||||
if ( IsFloatingMode() )
|
if ( IsFloatingMode() )
|
||||||
{
|
{
|
||||||
// start timer for saving window status information
|
// start timer for saving window status information
|
||||||
pImp->aMoveTimer.Start();
|
pImp->aMoveIdle.Start();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -888,8 +888,8 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
|
|||||||
pImp->nPos = pImp->nDockPos = 0;
|
pImp->nPos = pImp->nDockPos = 0;
|
||||||
pImp->bNewLine = false;
|
pImp->bNewLine = false;
|
||||||
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
|
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
|
||||||
pImp->aMoveTimer.SetTimeout(50);
|
pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
|
||||||
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl));
|
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -939,8 +939,8 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
|
|||||||
pImp->nPos = pImp->nDockPos = 0;
|
pImp->nPos = pImp->nDockPos = 0;
|
||||||
pImp->bNewLine = false;
|
pImp->bNewLine = false;
|
||||||
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
|
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
|
||||||
pImp->aMoveTimer.SetTimeout(50);
|
pImp->aMoveIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
|
||||||
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl));
|
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1869,12 +1869,12 @@ void SfxDockingWindow::StateChanged( StateChangedType nStateChange )
|
|||||||
void SfxDockingWindow::Move()
|
void SfxDockingWindow::Move()
|
||||||
{
|
{
|
||||||
if ( pImp )
|
if ( pImp )
|
||||||
pImp->aMoveTimer.Start();
|
pImp->aMoveIdle.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl)
|
IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl)
|
||||||
{
|
{
|
||||||
pImp->aMoveTimer.Stop();
|
pImp->aMoveIdle.Stop();
|
||||||
if ( IsReallyVisible() && IsFloatingMode() )
|
if ( IsReallyVisible() && IsFloatingMode() )
|
||||||
{
|
{
|
||||||
if( !GetFloatingWindow()->IsRollUp() )
|
if( !GetFloatingWindow()->IsRollUp() )
|
||||||
|
Reference in New Issue
Block a user