diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-02-13 11:35:13 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-02-13 12:13:56 +0000 |
commit | c138a8aec8dccb97948a7d7993e6869da4079b32 (patch) | |
tree | 51efecacb1aad23c2a965fda20d1ac319501386f /sw/inc/doc.hxx | |
parent | 496222d64d36b69f95b790a8cdd47074b2410add (diff) |
asynchronous word-count.
Diffstat (limited to 'sw/inc/doc.hxx')
-rw-r--r-- | sw/inc/doc.hxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index c67f79fb8ce6..ccebf5c7985a 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -282,6 +282,7 @@ class SW_DLLPUBLIC SwDoc : */ Timer aIdleTimer; ///< Own IdleTimer Timer aOLEModifiedTimer; ///< Timer for update modified OLE-Objecs + Timer aStatsUpdateTimer; ///< Timer for asynchronous stats calculation SwDBData aDBData; ///< database descriptor ::com::sun::star::uno::Sequence <sal_Int8 > aRedlinePasswd; String sTOIAutoMarkURL; ///< ::com::sun::star::util::URL of table of index AutoMark file @@ -909,9 +910,9 @@ public: */ virtual void DocInfoChgd(); virtual const SwDocStat &GetDocStat() const; - virtual const SwDocStat &GetUpdatedDocStat(); + virtual const SwDocStat &GetUpdatedDocStat(bool bCompleteAsync = false); virtual void SetDocStat(const SwDocStat& rStat); - virtual void UpdateDocStat(); + virtual void UpdateDocStat(bool bCompleteAsync = false); /** IDocumentState */ @@ -2071,6 +2072,17 @@ private: void CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead, SwPageDesc *pDesc, bool bLeft); /// Copies master footer to left / first one, if necessary - used by ChgPageDesc(). void CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter &rFoot, SwPageDesc *pDesc, bool bLeft); + + /** continue computing a chunk of document statistics + * \param nTextNodes number of paragraphs to calculate before + * exiting + * + * returns false when there is no more to calculate + */ + bool IncrementalDocStatCalculate(long nTextNodes = 250); + + /// Our own 'StatsUpdateTimer' calls the following method + DECL_LINK( DoIdleStatsUpdate, Timer * ); }; // This method is called in Dtor of SwDoc and deletes cache of ContourObjects. |