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

#include <DocumentStatisticsManager.hxx>

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

Public Member Functions

 DocumentStatisticsManager (SwDoc &i_rSwdoc)
 
void DocInfoChgd (bool isEnableSetModified) override
 DocInfo has changed (notify via DocShell): make required fields update. More...
 
const SwDocStatGetDocStat () const override
 Document - Statistics. More...
 
void SetDocStatModified (bool bSet)
 
const SwDocStatGetUpdatedDocStat (bool bCompleteAsync, bool bFields) override
 Updates the document statistics if the document has been modified and returns a reference to the result. More...
 
void SetDocStat (const SwDocStat &rStat) override
 Set the document statistics. More...
 
void UpdateDocStat (bool bCompleteAsync, bool bFields) override
 Updates the internal document's statistics. More...
 
virtual ~DocumentStatisticsManager () override
 

Private Member Functions

 DocumentStatisticsManager (DocumentStatisticsManager const &)=delete
 
DocumentStatisticsManageroperator= (DocumentStatisticsManager const &)=delete
 
bool IncrementalDocStatCalculate (long nChars, bool bFields=true)
 continue computing a chunk of document statistics More...
 
 DECL_LINK (DoIdleStatsUpdate, Timer *, void)
 

Private Attributes

SwDocm_rDoc
 
std::unique_ptr< SwDocStatmpDocStat
 
bool mbInitialized
 
SwDocIdle maStatsUpdateIdle
 

Additional Inherited Members

- Protected Member Functions inherited from IDocumentStatistics
virtual ~IDocumentStatistics ()
 

Detailed Description

Definition at line 31 of file DocumentStatisticsManager.hxx.

Constructor & Destructor Documentation

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

Definition at line 214 of file DocumentStatisticsManager.cxx.

References maStatsUpdateIdle, and Task::Stop().

sw::DocumentStatisticsManager::DocumentStatisticsManager ( DocumentStatisticsManager const &  )
privatedelete

Member Function Documentation

sw::DocumentStatisticsManager::DECL_LINK ( DoIdleStatsUpdate  ,
Timer ,
void   
)
private
void sw::DocumentStatisticsManager::DocInfoChgd ( bool  isEnableSetModified)
overridevirtual
const SwDocStat & sw::DocumentStatisticsManager::GetDocStat ( ) const
overridevirtual

Document - Statistics.

Returns a reference to the existing document statistics

Implements IDocumentStatistics.

Definition at line 61 of file DocumentStatisticsManager.cxx.

References mpDocStat.

const SwDocStat & sw::DocumentStatisticsManager::GetUpdatedDocStat ( bool  bCompleteAsync,
bool  bFields 
)
overridevirtual

Updates the document statistics if the document has been modified and returns a reference to the result.

Parameters
bCompleteAsyncif true will return a partial result, and potentially trigger a timeout to complete the work.
bFieldsif stat. fields should be updated

Implements IDocumentStatistics.

Definition at line 71 of file DocumentStatisticsManager.cxx.

References mbInitialized, mpDocStat, and UpdateDocStat().

bool sw::DocumentStatisticsManager::IncrementalDocStatCalculate ( long  nChars,
bool  bFields = true 
)
private
DocumentStatisticsManager& sw::DocumentStatisticsManager::operator= ( DocumentStatisticsManager const &  )
privatedelete
void sw::DocumentStatisticsManager::SetDocStat ( const SwDocStat rStat)
overridevirtual

Set the document statistics.

Implements IDocumentStatistics.

Definition at line 80 of file DocumentStatisticsManager.cxx.

References mbInitialized, and mpDocStat.

void sw::DocumentStatisticsManager::SetDocStatModified ( bool  bSet)
void sw::DocumentStatisticsManager::UpdateDocStat ( bool  bCompleteAsync,
bool  bFields 
)
overridevirtual

Updates the internal document's statistics.

Parameters
bCompleteAsyncif true it may do part of the work and trigger a timeout to complete it.
bFieldsif stat. fields should be updated

Implements IDocumentStatistics.

Definition at line 86 of file DocumentStatisticsManager.cxx.

References IncrementalDocStatCalculate(), maStatsUpdateIdle, mbInitialized, mpDocStat, Idle::Start(), and Task::Stop().

Referenced by GetUpdatedDocStat().

Member Data Documentation

SwDoc& sw::DocumentStatisticsManager::m_rDoc
private

Definition at line 51 of file DocumentStatisticsManager.hxx.

Referenced by DocInfoChgd(), and IncrementalDocStatCalculate().

SwDocIdle sw::DocumentStatisticsManager::maStatsUpdateIdle
private
bool sw::DocumentStatisticsManager::mbInitialized
private
std::unique_ptr<SwDocStat> sw::DocumentStatisticsManager::mpDocStat
private

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