Some Visual Basic-like functions and constants currently implemented in LibreOffice Basic are currently not documented in the LibreOffice help. (Including such ubiquitous as DoEvents, etc.) See e.g. following for details (including a list generated from the contents of the source code file): http://en.libreofficeforum.org/node/5245
Seems a reasonable request. All the detail appears to be provided in the linked forum thread. The current version of parser.cxx seems to contain the same list of VBA constants: http://opengrok.libreoffice.org/xref/core/basic/source/comp/parser.cxx ... as does the source code for v3.3.4.1. Status set to NEW. Version set to 3.3.4.1, but issue probably Inherited from OOo.
Also needed: Update of description of the Randomize statement according to http://cgit.freedesktop.org/libreoffice/core/commit/?id=0e5aa443f8f603be6e5ad4ddcec12e5b6fbdff8a&h=libreoffice-4-4 I.e.: Using Randomize without an argument has no effect - in this case the random-number generator will be initialized using system time (in seconds since midnight) at its first use. If wishing to initialize (i.e. seed) the generator using system time at any other point of time, use: Sub ExampleRandomize Dim lSeconds As Long lSeconds = Timer Randomize lSeconds End Sub Randomize affects only the Rnd function of BASIC. It has no effect on random-number generators used by other parts of LibreOffice, such as, e.g., the statistics and RAND() functions of Calc.
(In reply to Johnny_M from comment #2) > [...] > Using Randomize without an argument [...] The "without an argument" should actually be "without a parameter", for consistency reasons.
(In reply to Johnny_M from comment #2) Unfortunately, the following code example above seems to be wrong and needs to be removed: > [...] If wishing to initialize (i.e. seed) the > generator using system time at any other point of time, use: > > Sub ExampleRandomize > Dim lSeconds As Long > lSeconds = Timer > Randomize lSeconds > End Sub > [...] Reasons: (a) That is not exactly what happens when Randomize is called without a parameter, and (b) Randomize expects an integer, while Timer provides a Long and will overflow it (86400 seconds per day).
(In reply to Johnny_M from comment #2) > Also needed: Update of description of the Randomize statement according to > http://cgit.freedesktop.org/libreoffice/core/commit/ > ?id=0e5aa443f8f603be6e5ad4ddcec12e5b6fbdff8a&h=libreoffice-4-4 > That (comment 2 to comment 4), concerning Rnd function and Randomize statement, have been moved to the bug 99809, for independent tracking.
Johnny_M: http://en.libreofficeforum.org does no longer exists. Do you have another place of the list, or have a copy that you can attach here?
(In reply to Regina Henschel from comment #6) > Johnny_M: http://en.libreofficeforum.org does no longer exists. Do you have > another place of the list, or have a copy that you can attach here? Thanks for the heads-up! I've changed the URL to the one of its last crawl by the Wayback Machine (August 27, 2016).
I'm attaching here the pdf and ods files from the forum archives. However I can't get file LibreOffice BASIC Functions including Parameters.pdf from the archives, so if you have it somewhere, please attach it here.
Created attachment 133082 [details] BASIC Functions and Constants from LibreOffice source V3.6.2.2 spreadsheet
Created attachment 133083 [details] Constants
Created attachment 133084 [details] function summary
Created attachment 133095 [details] Functions including parameters (In reply to Olivier Hallot from comment #8) > I'm attaching here the pdf and ods files from the forum archives. > > However I can't get file > > LibreOffice BASIC Functions including Parameters.pdf > > from the archives, so if you have it somewhere, please attach it here. Thanks! I just found it on http://www.imaccanici.org/en.libreofficeforum.org/node/5245.html, which appears to be another archive.
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=9a16735c5ebee4513d02b8f28b2147ec9407c18a tdf#84675 (part) document hidden BASIC func/const
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=fd99f1798a440ccdfb34e910285a7c5c9a9ff08d tdf#84675 (part2) document hidden BASIC func/const
Just comment and call for help: I'll appreciate where in BASIC are the TYP_* constants used, as indicated in the "Constants" document attached. It looks related to fields in text documents. Nevertheless these constants don't seem to be used anywhere or they have been put here for later development. Please advise. Skipping documentation.
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=115035ec9e29cc0db7837a52cd7ee8527526d6b1 tdf#84675 (part2) Document hidden BASIC constants
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=a50d8ddab0d6037ee72424a21a18b9d07d53bdb7 tdf#84675 (part3) Document Basic constants
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=6f947c50faf2969405749fc118659d9d9934eb91 tdf#84675 (part4) document VBA macros support
(In reply to Olivier Hallot from comment #15) > Just comment and call for help: I'll appreciate where in BASIC are the TYP_* > constants used, as indicated in the "Constants" document attached. > > It looks related to fields in text documents. > > Nevertheless these constants don't seem to be used anywhere or they have > been put here for later development. > > Please advise. Skipping documentation. I can't find any information on how to use them in BASIC either. So, adding needsDevAdvice. Thanks for all the updates by the way!
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=bc9c15f996e91256162d8585adf970123f6dd559&h=libreoffice-5-4 tdf#84675 (part2) Document hidden BASIC constants
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=71d9804e62dfb6435b99f7e1020db0ce8fdb7e87&h=libreoffice-5-4 tdf#84675 (part3) Document Basic constants
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=8c185e311871e4eae877975dedf06444e547f0ec&h=libreoffice-5-4 tdf#84675 (part4) document VBA macros support
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=eb145d19480d245228dc6b1032a925adbff8ea78 tdf#84675 Help VBA functions AscW, ChrW, InStrRev
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=1268046a80406823e8a43e95738f1869e371821b&h=libreoffice-5-4 tdf#84675 Help VBA functions AscW, ChrW, InStrRev
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=0351604e8d6b4e3d797bdf742ff81377eee46b96 tdf#84675 Add help page for StrReverse VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=fbd52ae78b3405a6338554877046134df334ff8d&h=libreoffice-5-4 tdf#84675 Add help page for StrReverse VBA
(In reply to Olivier Hallot from comment #15) > Just comment and call for help: I'll appreciate where in BASIC are the TYP_* > constants used, as indicated in the "Constants" document attached. > > It looks related to fields in text documents. > > Nevertheless these constants don't seem to be used anywhere or they have > been put here for later development. > > Please advise. Skipping documentation. @tagezi: I'm sorry for taking the liberty of asking you here. You seem to be familiar with LO's BASIC. Do you happen to know where in BASIC the TYP_* constants can be used? (E.g., TYP_AUTHORFLD, TYP_CHAPTERFLD, etc. They are defined beginning with here: http://opengrok.libreoffice.org/xref/core/basic/source/runtime/stdobj.cxx#625 ) I can't find any information on how to use them in BASIC either.
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=34c220bf13976b2ecaa8af9e0333b74b06d47bfe tdf#84675 Add help page for DDB function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=0283e29b71806416024f2ced843ce927e99be7b3&h=libreoffice-5-4 tdf#84675 Add help page for DDB function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=969c5806ff0d958e8dc19d1abe98a1493842e4ca tdf#84675 Add help page for FV function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=ff87da57d195fd80f4c5cb51925f3b4db75ef020&h=libreoffice-5-4 tdf#84675 Add help page for FV function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=382289ba413f625b8cb41bb6702ad4c7b0e74ab0&h=libreoffice-5-4 tdf#84675 Add help page for IPmt function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=538aa4791d07f40112953b5625a7dbba96d53105 tdf#84675 Add help page for IPmt function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=9d965444a9b787726e67c6eb5bbcb8ca9a5de8d2&h=libreoffice-5-4 tdf#84675 Add VBA functions to tree file
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=c5180610e70541db0c684fa29100c66355b8bfc2 tdf#84675 Add VBA functions to tree file
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=23d9c94939bb42e08f5e21579748e00dde514073 tdf#84675 Add help page for IRR function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=8837573f15693f8de45618fc1b3342d87de88ae6&h=libreoffice-5-4 tdf#84675 Add help page for IRR function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=a7dd65f811df7ef82c575a1c3c0be074cb880924&h=libreoffice-5-4 tdf#84675 Add help page for MIRR function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=139a1c699caadd5365e335a432ffd5fdad8d73de tdf#84675 Add help page for MIRR function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/help/commit/?id=91095e4d234dfb17218c76f096d0c107cf16cec8&h=libreoffice-5-4 tdf#84675 Add help page for NPer function of VBA
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=1a2f0ac70b638ac316e081ba2b72309829f00fcc tdf#84675 Add help page for NPer function of VBA
Polite ping: is this bug fixed? if so, please close it as RESOLVED FIXED
The bug has dependencies.
Is this fixed? All dependencies seem to be fixed.
Some contents still to write.... See bottom of the page below, notably about Date & time, Input, Math and object functions. https://helponline.libreoffice.org/6.0/en-US/text/sbasic/shared/special_vba_func.html?&DbPAR=BASIC&System=WIN
Hi Olivier, Could it be turned into an easyHack or you prefer to work yourself on this?
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=3de74ecadfd9a7529e1b0b05352e42a829d3e279 tdf#84675 VBA functions documentation
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/help/commit/?id=4ead3bffc557527e7a146c538773aa4ca6cf84d0&h=libreoffice-6-0 tdf#84675 VBA functions documentation
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=8d6f11fb06d76847256dd9baff120a0e7ea5139c tdf#84675 Add vb* VBA constants documentation
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/help/commit/?id=c9620f4bf875b3cd86c7ea233d4678fde90e52d5&h=libreoffice-6-0 tdf#84675 Add vb* VBA constants documentation
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=862397faa8ea0e8b23d13fc1e929ebc8f2c15b3f tdf#84675 undocumented BASIC - tree files update
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/help/commit/?id=14afd749e1925881fbbd7361f88600ed3621dcbf&h=libreoffice-6-0 tdf#84675 undocumented BASIC - tree files update
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=9891e96d1d95c1921cba16c6339c15cf3613da0d tdf#84675 Undocumented VBA function: MonthName
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/help/commit/?id=c2c6256141838e757674882647cd91e8ee8026c6&h=libreoffice-6-0 tdf#84675 Undocumented VBA function: MonthName
A polite ping to Olivier Hallot: is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Thanks
(In reply to Xisco Faulí from comment #55) > A polite ping to Olivier Hallot: is this bug fixed? if so, could you > please close it as RESOLVED FIXED ? Thanks Ping ?
(In reply to Olivier Hallot from comment #15) > Just comment and call for help: I'll appreciate where in BASIC are the TYP_* > constants used, as indicated in the "Constants" document attached. > > It looks related to fields in text documents. > > Nevertheless these constants don't seem to be used anywhere or they have > been put here for later development. > > Please advise. Skipping documentation. These constants correspond to 'SwFieldTypesEnum' enum in sw/inc/fldbas.hxx, and can be used in uno:InsertField / uno:InsertDBField commands as the value of their Type argument.
(In reply to Mike Kaganski from comment #57) Note: IMO it's best to keep these undocumented, because the use of Type numeric parameter of the command is kind of deprecated (using an implementation detail) - type name should be used instead.