Code: Select all
rem ************************************************
Sub Check
on error goto ending:
doc = thiscomponent
doc.lockControllers()
undos = doc.UndoManager
undos.enterUndoContext("Format numbered paragraphs")
rajibando_find_and_remplace(doc.Text)
ending:
if Err then
msgbox("Error #" & Err & ": " & Error + chr(13) + "At line: " + Erl + chr(13), 16 ,"Error")
end if
undos.leaveUndoContext()
doc.unlockControllers()
on error goto 0
End Sub
rem *****************************************
Code: Select all
rem **************************************
sub rajibando_find_and_remplace(T)
do
for each para in T
if T.compareRegionEnds(T, para) = 0 then
exit sub
end if
c = T.createTextCursorByRange(para.End)
c.goRight(2, True)
firstchar = mid(c.String, 2, 1)
Print(firstChar)
if not isnumeric(firstchar) then
c.String = chr(10) & firstchar
exit for
end if
next para
loop
end sub
rem *****************************************
I now wish to read about each individual API, e.g., what are their scopes? what do they do? etc.
I referred to the Overview (Java UNO Runtime Reference) but couldn't locate any of the APIs in this macro with there.
Obviously, because these are components of StarBasic macro API, if I am not mistaken. Now how do I access the StarBasic APIs?: I've read the Wikipedia's OpenOffice Basic entry. And from there to a few links, like http://wiki.services.openoffice.org/wik ... pers_Guide, http://wiki.services.openoffice.org/wik ... ASIC_Guide, http://www.pitonyak.org/oo.php and a couple of more.
A huge reading list, but will take some time.
Any tip?