Bug 150183

Summary: DoEvents is undocumented
Product: LibreOffice Reporter: Mike Kaganski <mikekaganski>
Component: DocumentationAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: olivier.hallot, rafael.palma.lima
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=146109
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 127597    

Description Mike Kaganski 2022-07-28 09:52:32 UTC
DoEvents is one of the built-in functions in Basic, and is implemented in [1]. However, it is missing in our help.

Despite the confused comment in the code, it actually does quite significant work - it processes existing event queue until its end. E.g., using it before executing '.uno:SaveAs' in bug 146109 would allow refreshing the display before the dialog is shown.

VBA also has such a function; its documentation is at [2] (but it's incorrect, since current OSes do not use cooperative multitasking, so the only effect of it is not on OS, but on the program's own event queue).

[1] https://opengrok.libreoffice.org/xref/core/basic/source/runtime/methods1.cxx?r=bc1ab88f&mo=14951&fi=594#594
[2] https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/doevents-function
Comment 1 Rafael Lima 2022-07-28 19:23:43 UTC
Interesting... I did not know DoEvents existed in LO Basic. There's no mention of it in Pitonyak's book, nor in Bernard Marcelly's and neither in OOo3.1 Developer's Guide.