summaryrefslogtreecommitdiff
path: root/sw/inc/IDocumentTimerAccess.hxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-08-24 18:31:35 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2018-08-27 20:30:57 +0200
commit107f0e6dba57a5b27366a35a5cdb184079546df0 (patch)
tree497a02c9d0485575e84d65e6d093b5ce54fcb661 /sw/inc/IDocumentTimerAccess.hxx
parent8e79ca904622a90b72e198f97441452d1bfffdc0 (diff)
tdf#119458 fix sw background Idle state handling
Starting the SwDocIdle in StartIdeling() just reintroduces the bug fixed in commit 401cba4c20fb ("tdf#116370 cleanup Writer idle job handing"), so trading one bug for the other. For the real solution we have to handle two states: 1. The SwDocIdle being active 2. The SwDocIdle being blocked For the first state we can just use the active state of the Idle itself. Since it's not a AutoIdle, it will be turned of, if invoked. Either some Idle handler will want to be run it again or some other thread might start it again, if needed. Since we're now tracking the wanted Idle state via the active task flag, we can drop the explicit mbStartIdleTimer handling. As a result of the first change, we can't stop the Idle anymore when blocking it. But the Idle itself checks its ready state via IsDocIdle() in its UpdateMinPeriod function, so we have to add the blocking state to IsDocIdle(). Change-Id: I33017a8e07208a6a3bce761cc899ac3ca944cd61 Reviewed-on: https://gerrit.libreoffice.org/59586 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'sw/inc/IDocumentTimerAccess.hxx')
-rw-r--r--sw/inc/IDocumentTimerAccess.hxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/inc/IDocumentTimerAccess.hxx b/sw/inc/IDocumentTimerAccess.hxx
index 1ed8679c00ac..f3e2738485af 100644
--- a/sw/inc/IDocumentTimerAccess.hxx
+++ b/sw/inc/IDocumentTimerAccess.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_SW_INC_IDOCUMENTTIMERACCESS_HXX
/**
- * Handle the background job of the Writer document.
+ * Handle the background jobs of a Writer document.
*
* Initially it's disabled and unblocked.
*
@@ -34,7 +34,9 @@ class IDocumentTimerAccess
{
public:
/**
- * Start the idle job depending on the block count.
+ * Start the idle task.
+ *
+ * Depends on the block count and various document states.
*/
virtual void StartIdling() = 0;
@@ -47,13 +49,14 @@ public:
* Increment block count.
*
* Prevents further background idle processing.
+ * This doesn't guarantee the Idle task is not currently running!
*/
virtual void BlockIdling() = 0;
/**
* Decrement block count.
*
- * May start the idle job.
+ * May re-start the idle task, if active.
*/
virtual void UnblockIdling() = 0;