• Jan-Marek Glogowski's avatar
    tdf#119458 fix sw background Idle state handling · 107f0e6d
    Jan-Marek Glogowski yazdı
    Starting the SwDocIdle in StartIdeling() just reintroduces the
    bug fixed in commit 401cba4c ("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: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
    107f0e6d
IDocumentTimerAccess.hxx 2.02 KB