Paolo Mantovani wrote: > In effect, in a 'normal' use case I would accomplish the thing exactly as you > described. > Anyway I'm currently "translating" dispatch commands to API calls. > As you know the S&R dialog in Calc allows the user to replace occourrences > one > by one. > Translating this action in API calls not having replaceFirst/Next methods is > quite difficult (in my understanding), because of the number of different > scenarios that I need to manage. > I'm thinking for example to a replacement using regexp (regexp are not > implemented in StarBasic)
It doesn't make any sense to record a S&R action that does not automatically replace all occurences or no occurence and asks the user for every single case. A macro that e.g. only replaces the 3rd and the 5th occurence can't be applied to other documents in a useful way. So what you need is "Replace All" and "Start Replacing and ask me each time". AFAIK the latter is possible only by dispatching because it's bound to a dialog while the S&R API of the "core" document explicitly is designed to avoid dialog interruptions. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]