'How can I pass a callback to a Libre office macro

Is it possible to pass a callback procedure to a Libre Office macro written in basic? For example, (a) to write a macro that applies processing specified by the caller to every cell in a range determined by the macro or (b) to compare strings using a passed function to determine whether two characters should be considered equivalent.

Given that in my macros I can call Calc functions by their names with com.sun.star.sheet.FunctionAccess and Uno functions with com.sun.star.frame.DispatchHelper, I thought I might be able to do something similar to call my own macros, and so pass in the name of the macro, but I have been unable to find anything about this. I also tried using sheet.FunctionAccess to call my own macros, but (perhaps unsurprisingly) could not get that to work.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source