https://bugs.documentfoundation.org/show_bug.cgi?id=170225
--- Comment #3 from Neil Roberts <[email protected]> --- I think it would be possible to implement the idea as an extension. In Python, you can get access to the editing duration in seconds like this: doc = XSCRIPTCONTEXT.getDocument() props = doc.getDocumentProperties() duration = props.EditingDuration You can get access to the last save time in props.ModificationDate. You could listen for whenever a document is saved by calling addDocumentEventListener on theGlobalEventBroadcaster and looking at at the “OnSave” events. Then whenever the current time minus the ModificationDate is greater than an hour you could update the EditingDuration to remove the difference. However, it seems to me like we could just improve this in general in LibreOffice. Instead of tracking key presses or eye tracking, maybe we could just make it not count time when the document window doesn’t have focus. The window is likely to get a lose-focus event whenever the screensaver comes on so maybe that would be enough to fix Axel’s use case of not counting time when he is away from the computer. For reference, in the LO code the editing time is updated whenever the document is saved in SfxObjectShell::UpdateTime_Impl. See also bug#88131 -- You are receiving this mail because: You are the assignee for the bug.
