There’s an important OpenOffice BASIC guide that I failed to mention previously. It’s official, and the main index of the help file for OO BASIC, so I assumed it without mentioning it. It is Programming Guide for BASIC on docs.sun.com.
For someone like me who has some experience with VBA, but no clues about OpenOffice, that little file provided the foundation. All those little things you need to know to get your first function up and running are in there, and then you can build on that using the ample, but sometimes mildly scattered documentation available at api.openoffice.org and elsewhere.