LibreOffice Module sw (master)  1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
sw::DocumentTimerManager Class Reference

#include <DocumentTimerManager.hxx>

Inheritance diagram for sw::DocumentTimerManager:
[legend]
Collaboration diagram for sw::DocumentTimerManager:
[legend]

Public Types

enum  IdleJob {
  IdleJob::None,
  IdleJob::Busy,
  IdleJob::Grammar,
  IdleJob::Layout,
  IdleJob::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...
 

Private Member Functions

 DocumentTimerManager (DocumentTimerManager const &)=delete
 
DocumentTimerManageroperator= (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

SwDocm_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 ()
 

Detailed Description

Definition at line 34 of file DocumentTimerManager.hxx.

Member Enumeration Documentation

Enumerator
None 

document has no idle jobs to do

Busy 

document is busy and idle jobs are postponed

Grammar 
Layout 
Fields 

Definition at line 37 of file DocumentTimerManager.hxx.

Constructor & Destructor Documentation

sw::DocumentTimerManager::DocumentTimerManager ( SwDoc i_rSwdoc)
sw::DocumentTimerManager::~DocumentTimerManager ( )
overridevirtual

Definition at line 231 of file DocumentTimerManager.cxx.

sw::DocumentTimerManager::DocumentTimerManager ( DocumentTimerManager const &  )
privatedelete

Member Function Documentation

void sw::DocumentTimerManager::BlockIdling ( )
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 86 of file DocumentTimerManager.cxx.

References m_nIdleBlockCount, and SAL_MAX_UINT32.

sw::DocumentTimerManager::DECL_LINK ( FireIdleJobsTimeout  ,
Timer ,
void   
)
private

Delay starting idle jobs to allow for post-load activity.

Used by LOK only.

sw::DocumentTimerManager::DECL_LINK ( DoIdleJobs  ,
Timer ,
void   
)
private
DocumentTimerManager::IdleJob sw::DocumentTimerManager::GetNextIdleJob ( ) const
private
bool sw::DocumentTimerManager::IsDocIdle ( ) const
inlineoverridevirtual

Is the document ready to be processed?

Implements IDocumentTimerAccess.

Definition at line 80 of file DocumentTimerManager.hxx.

References Busy, GetNextIdleJob(), and m_nIdleBlockCount.

DocumentTimerManager& sw::DocumentTimerManager::operator= ( DocumentTimerManager const &  )
privatedelete
void sw::DocumentTimerManager::StartIdling ( )
overridevirtual
void sw::DocumentTimerManager::StopIdling ( )
overridevirtual

Stop idle processing.

Implements IDocumentTimerAccess.

Definition at line 80 of file DocumentTimerManager.cxx.

References m_aDocIdle, m_bStartOnUnblock, and Task::Stop().

Referenced by StartIdling().

void sw::DocumentTimerManager::UnblockIdling ( )
overridevirtual

Decrement block count.

May re-start the idle task, if active.

Implements IDocumentTimerAccess.

Definition at line 92 of file DocumentTimerManager.cxx.

References Task::IsActive(), m_aDocIdle, m_bStartOnUnblock, m_nIdleBlockCount, Idle::Start(), and Scheduler::Wakeup().

Member Data Documentation

SwDocIdle sw::DocumentTimerManager::m_aDocIdle
private
Timer sw::DocumentTimerManager::m_aFireIdleJobsTimer
private

Definition at line 76 of file DocumentTimerManager.hxx.

Referenced by DocumentTimerManager(), and StartIdling().

bool sw::DocumentTimerManager::m_bStartOnUnblock
private

true, if the last unblock should start the timer

Definition at line 74 of file DocumentTimerManager.hxx.

Referenced by StartIdling(), StopIdling(), and UnblockIdling().

bool sw::DocumentTimerManager::m_bWaitForLokInit
private

true if we waited for LOK to initialize already.

Definition at line 77 of file DocumentTimerManager.hxx.

Referenced by StartIdling().

sal_uInt32 sw::DocumentTimerManager::m_nIdleBlockCount
private

Don't run the Idle, if > 0.

Definition at line 73 of file DocumentTimerManager.hxx.

Referenced by BlockIdling(), IsDocIdle(), StartIdling(), and UnblockIdling().

SwDoc& sw::DocumentTimerManager::m_rDoc
private

Definition at line 71 of file DocumentTimerManager.hxx.

Referenced by GetNextIdleJob().


The documentation for this class was generated from the following files: