https://bugs.documentfoundation.org/show_bug.cgi?id=145752
Bug ID: 145752
Summary: CompatibilityMode Basic function documentation is
incomplete
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Documentation
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
CompatibilityMode documentation [1] lacks the information about its return
value, and about its boolean argument being optional.
It only sets new compatibility mode when the optional argument is present; it
always returns the mode that is active after its execution (i.e., if called
with argument, it returns the new mode; if called without argument, it returns
active mode without modifying it). The source code is at [2].
Also, there are examples making use of this function: e.g., [3]. They do not
reset the compatibility mode back after changing it for a task; that is bad
practice, and *may* create a false impression in readers that the mode that is
set by the function is local to current method scope - while the new mode will
be active to all the code run after leaving current method, potentially
creating unwanted changes in logic. Those samples should be corrected to
properly record the original state, and restore it after completing the
necessary operations.
[1]
https://help.libreoffice.org/7.2/en-US/text/sbasic/shared/compatibilitymode.html
[2]
https://opengrok.libreoffice.org/xref/core/basic/source/runtime/methods1.cxx?r=81a7d46d&mo=77319&fi=2960#2960
[3] https://help.libreoffice.org/7.2/en-US/text/sbasic/shared/01020300.html
--
You are receiving this mail because:
You are the assignee for the bug.