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

#include <DocumentTimerManager.hxx>

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

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
 
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 33 of file DocumentTimerManager.hxx.

Member Enumeration Documentation

◆ IdleJob

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.

Constructor & Destructor Documentation

◆ DocumentTimerManager() [1/2]

sw::DocumentTimerManager::DocumentTimerManager ( SwDoc i_rSwdoc)

◆ ~DocumentTimerManager()

sw::DocumentTimerManager::~DocumentTimerManager ( )
overridevirtual

Definition at line 230 of file DocumentTimerManager.cxx.

◆ DocumentTimerManager() [2/2]

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

Member Function Documentation

◆ BlockIdling()

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 84 of file DocumentTimerManager.cxx.

References m_nIdleBlockCount, and SAL_MAX_UINT32.

◆ DECL_LINK() [1/2]

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

◆ DECL_LINK() [2/2]

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

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

Used by LOK only.

◆ GetNextIdleJob()

DocumentTimerManager::IdleJob sw::DocumentTimerManager::GetNextIdleJob ( ) const
private

◆ IsDocIdle()

bool sw::DocumentTimerManager::IsDocIdle ( ) const
inlineoverridevirtual

Is the document ready to be processed?

Implements IDocumentTimerAccess.

Definition at line 79 of file DocumentTimerManager.hxx.

References Busy, GetNextIdleJob(), and m_nIdleBlockCount.

◆ operator=()

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

◆ StartIdling()

void sw::DocumentTimerManager::StartIdling ( )
overridevirtual

◆ StopIdling()

void sw::DocumentTimerManager::StopIdling ( )
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().

◆ UnblockIdling()

void sw::DocumentTimerManager::UnblockIdling ( )
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().

Member Data Documentation

◆ m_aDocIdle

SwDocIdle sw::DocumentTimerManager::m_aDocIdle
private

◆ m_aFireIdleJobsTimer

Timer sw::DocumentTimerManager::m_aFireIdleJobsTimer
private

Definition at line 75 of file DocumentTimerManager.hxx.

Referenced by DocumentTimerManager(), and StartIdling().

◆ m_bStartOnUnblock

bool sw::DocumentTimerManager::m_bStartOnUnblock
private

true, if the last unblock should start the timer

Definition at line 73 of file DocumentTimerManager.hxx.

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

◆ m_bWaitForLokInit

bool sw::DocumentTimerManager::m_bWaitForLokInit
private

true if we waited for LOK to initialize already.

Definition at line 76 of file DocumentTimerManager.hxx.

Referenced by StartIdling().

◆ m_nIdleBlockCount

sal_uInt32 sw::DocumentTimerManager::m_nIdleBlockCount
private

Don't run the Idle, if > 0.

Definition at line 72 of file DocumentTimerManager.hxx.

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

◆ m_rDoc

SwDoc& sw::DocumentTimerManager::m_rDoc
private

Definition at line 70 of file DocumentTimerManager.hxx.

Referenced by GetNextIdleJob().


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