Dispatcher Documentation

Hi Folks,

Although I am experienced with Excel macros, I am working through my first LibreOffice macro for Calc. It is simple – Format an area named range according to some column key named range.

I recorded my procedure, and I am stepping through it. I am on the line where the Format Painter wants to pick up the formatting of the key cells, and the macro recorder "rem"d out the dispatcher call to uno:FormatPaintBrush. I need to know where to find the documentation that explains “uno:FormatPaintBrush”. I am aware of https://wiki.DocumentFoundation.org/Development/DispatchCommands, but this tells me nothing but a comprehensive list of uno:* commands for the dispatcher. I need to know what goes in the array of properties for a call to uno:FormatPaintBrush. Do I populate it with the properties whose values I want or do I provide an empty array and the dispatcher will return a comprehensive list for me to interrogate? How would I know the names of the properties? How would I know how big the array must be?

Alternatively, this can probably be done with a direct object manipulation that calls the dispatcher, something like …cells(r,c).format… If you have any insight for how that works, I’;d be grateful.

There is a huge array of manuals with varying degrees of accuracy and completeness, but I still don’t quite understand the structure of anything well enough to predict where I’d be likely to find what I need.

Thanks for the help,

Chris.

Hello,

Using dispatch commands is a weak method of creating macros. They are limited with what can be done. Documentation is scattered (some in source) and finding parameters for arrays is time consuming.

It is better to take a different route. The best single document for macros is Open Office Macros Explained by Andrew Pitonyak. The PDF can be gotten here → OOME

As for information regarding Dispatcher, please view the following links and the links contained within:

Record a macro

I need documentation of oDispatcher.executeDispatch