LibreOffice Module sw (master) 1
|
#include <DocumentTimerManager.hxx>
Public Types | |
enum class | IdleJob { None , Busy , Grammar , Layout , Fields } |
Public Member Functions | |
DocumentTimerManager (SwDoc &i_rSwdoc) | |
virtual | ~DocumentTimerManager () override |
void | StartIdling () override |
Start the idle task. More... | |
void | StopIdling () override |
Stop idle processing. More... | |
void | BlockIdling () override |
Increment block count. More... | |
void | UnblockIdling () override |
Decrement block count. More... | |
bool | IsDocIdle () const override |
Is the document ready to be processed? More... | |
virtual void | StartIdling ()=0 |
Start the idle task. More... | |
virtual void | StopIdling ()=0 |
Stop idle processing. More... | |
virtual void | BlockIdling ()=0 |
Increment block count. More... | |
virtual void | UnblockIdling ()=0 |
Decrement block count. More... | |
virtual bool | IsDocIdle () const =0 |
Is the document ready to be processed? More... | |
Private Member Functions | |
DocumentTimerManager (DocumentTimerManager const &)=delete | |
DocumentTimerManager & | operator= (DocumentTimerManager const &)=delete |
DECL_LINK (FireIdleJobsTimeout, Timer *, void) | |
Delay starting idle jobs to allow for post-load activity. More... | |
DECL_LINK (DoIdleJobs, Timer *, void) | |
IdleJob | GetNextIdleJob () const |
Private Attributes | |
SwDoc & | m_rDoc |
sal_uInt32 | m_nIdleBlockCount |
Don't run the Idle, if > 0. More... | |
bool | m_bStartOnUnblock |
true, if the last unblock should start the timer More... | |
SwDocIdle | m_aDocIdle |
Timer | m_aFireIdleJobsTimer |
bool | m_bWaitForLokInit |
true if we waited for LOK to initialize already. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from IDocumentTimerAccess | |
virtual | ~IDocumentTimerAccess () |
Definition at line 33 of file DocumentTimerManager.hxx.
|
strong |
Enumerator | |
---|---|
None | document has no idle jobs to do |
Busy | document is busy and idle jobs are postponed |
Grammar | |
Layout | |
Fields |
Definition at line 36 of file DocumentTimerManager.hxx.
sw::DocumentTimerManager::DocumentTimerManager | ( | SwDoc & | i_rSwdoc | ) |
Definition at line 41 of file DocumentTimerManager.cxx.
References LINK, m_aDocIdle, m_aFireIdleJobsTimer, Timer::SetInvokeHandler(), Task::SetPriority(), and Timer::SetTimeout().
|
overridevirtual |
Definition at line 230 of file DocumentTimerManager.cxx.
|
privatedelete |
|
overridevirtual |
Increment block count.
Prevents further background idle processing. This doesn't guarantee the Idle task is not currently running!
Implements IDocumentTimerAccess.
Definition at line 84 of file DocumentTimerManager.cxx.
References m_nIdleBlockCount, and SAL_MAX_UINT32.
|
private |
|
private |
Delay starting idle jobs to allow for post-load activity.
Used by LOK only.
|
private |
Definition at line 110 of file DocumentTimerManager.cxx.
References AUTOUPD_FIELD_AND_CHARTS, AUTOUPD_FIELD_ONLY, Busy, Fields, SfxProgress::GetActiveProgress(), SwDoc::GetAllLayouts(), IDocumentLayoutAccess::GetCurrentLayout(), IDocumentLayoutAccess::GetCurrentViewShell(), SwDoc::GetDocShell(), SwDoc::GetDocumentSettingManager(), sw::DocumentSettingManager::getFieldUpdateFlags(), SwDoc::getIDocumentFieldsAccess(), SwDoc::getIDocumentLayoutAccess(), SvtLinguConfig::GetProperty(), sw::Ring< value_type >::GetRingContainer(), IDocumentFieldsAccess::GetUpdateFields(), SwViewShell::GetViewOptions(), Grammar, SwViewShell::HasDrawViewDrag(), IDocumentFieldsAccess::IsExpFieldsLocked(), SwDocUpdateField::IsFieldsDirty(), SwDocUpdateField::IsInUpdateFields(), SwRootFrame::IsNeedGrammarCheck(), SwViewOption::IsOnlineSpell(), Layout, m_rDoc, None, SwDoc::StartGrammarChecking(), and UPN_IS_GRAMMAR_AUTO.
Referenced by IsDocIdle().
|
inlineoverridevirtual |
Is the document ready to be processed?
Implements IDocumentTimerAccess.
Definition at line 79 of file DocumentTimerManager.hxx.
References Busy, GetNextIdleJob(), and m_nIdleBlockCount.
|
privatedelete |
|
overridevirtual |
Start the idle task.
Depends on the block count and various document states.
Implements IDocumentTimerAccess.
Definition at line 56 of file DocumentTimerManager.cxx.
References comphelper::LibreOfficeKit::isActive(), Task::IsActive(), m_aDocIdle, m_aFireIdleJobsTimer, m_bStartOnUnblock, m_bWaitForLokInit, m_nIdleBlockCount, Idle::Start(), Timer::Start(), StopIdling(), and Scheduler::Wakeup().
|
overridevirtual |
Stop idle processing.
Implements IDocumentTimerAccess.
Definition at line 78 of file DocumentTimerManager.cxx.
References m_aDocIdle, m_bStartOnUnblock, and Task::Stop().
Referenced by StartIdling().
|
overridevirtual |
Decrement block count.
May re-start the idle task, if active.
Implements IDocumentTimerAccess.
Definition at line 90 of file DocumentTimerManager.cxx.
References Task::IsActive(), m_aDocIdle, m_bStartOnUnblock, m_nIdleBlockCount, Idle::Start(), and Scheduler::Wakeup().
|
private |
Definition at line 74 of file DocumentTimerManager.hxx.
Referenced by DocumentTimerManager(), StartIdling(), StopIdling(), and UnblockIdling().
|
private |
Definition at line 75 of file DocumentTimerManager.hxx.
Referenced by DocumentTimerManager(), and StartIdling().
|
private |
true, if the last unblock should start the timer
Definition at line 73 of file DocumentTimerManager.hxx.
Referenced by StartIdling(), StopIdling(), and UnblockIdling().
|
private |
true if we waited for LOK to initialize already.
Definition at line 76 of file DocumentTimerManager.hxx.
Referenced by StartIdling().
|
private |
Don't run the Idle, if > 0.
Definition at line 72 of file DocumentTimerManager.hxx.
Referenced by BlockIdling(), IsDocIdle(), StartIdling(), and UnblockIdling().
|
private |
Definition at line 70 of file DocumentTimerManager.hxx.
Referenced by GetNextIdleJob().