I am trying to write a Writer macro using LibreOffice Basic. First I tried recording a macro that applies a style to a page. It generated code like this:
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(1) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Template"
args1(0).Value = "First page"
args1(1).Name = "Family"
args1(1).Value = 8
dispatcher.executeDispatch(document, ".uno:StyleApply", "", 0, args1())
My question is: where can I get description of parameters of uno:StyleApply
? I tried searching for documentation, reference, anything but I can't find any information about this function. Please help.
The dispatch commands aren't actually part of the API. As noted at https://wiki.openoffice.org/wiki/The_OpenOffice.org_recorder_and_UNO_dispatch_calls, "The dispatch commands are an internal mechanism of OpenOffice.org. The arguments of each dispatch command are not documented."
Information and resources for LibreOffice macros are available at https://wiki.documentfoundation.org/Macros. I've found info in Andrew Pitonyak's "English Macro Document" (AndrewMacro.odt) to be particularly helpful; it's available at his site noted on the wiki page.
The latest API documentation is available at https://api.libreoffice.org/. One caveat: this API documentation might be confusing since it's more directly applicable to object-oriented languages such as C++ and Java.