P.S.:
I forgot to say:
The Selection-Array consists of two elements more than selections are in
the document.
The "real" selections are found through index 1 to n-1.
Paolo Mantovani wrote:
> Hi all,
>
> sorry for the dumb question, but I'm not able to figure this out..
>
> I've a macro that modify the selected text (in writer)
> example:
>
> txtrange = ThisComponent.CurrentSelection(0)
> txtrange.setString("ciao")
>
> At this point the selection is lost, but I can easily restore it in this way:
>
> ThisComponent.CurrentController.select(txtrange)
>
> The problem is with multiple selections:
> Perhaps I'm missing something, but I couldn't find any way to perform a
> multiple selection via API.
>
> Or perhaps does it exists another way to modify the selected text without to
> lost the user selection?
>
>
> Thank you for any help
> Paolo M
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]