Re: [api-dev] Get Selected Text in the actual TextDocument

2008-10-04 Thread Fernand Vanrie
Joel Cordeiro wrote: Hi, i already solved it. Now i have another doubt. I would like to replace the selected text of the document with another text. How can i do that? I saw some examples about replace all the ocurrence of a string with another string, but what i want is just replace the selecte

Re: [api-dev] Get Selected Text in the actual TextDocument

2008-10-04 Thread Cor Nouws
Joel Cordeiro wrote (4-10-2008 1:51) Hi, i already solved it. Now i have another doubt. I would like to replace the selected text of the document with another text. How can i do that? I saw some examples about replace all the ocurrence of a string with another string, but what i want is just rep

Re: [api-dev] Get Selected Text in the actual TextDocument

2008-10-03 Thread Joel Cordeiro
Hi, i already solved it. Now i have another doubt. I would like to replace the selected text of the document with another text. How can i do that? I saw some examples about replace all the ocurrence of a string with another string, but what i want is just replace the selected string in the documen

Re: [api-dev] Get Selected Text in the actual TextDocument

2008-09-30 Thread Ariel Constenla-Haile
Hi Joel, Joel Cordeiro escribió: Hi, does anyone could help me about how to get the selected text in the actual TextDocument (Writer)? How does we cast the returned object in the method getCurrentSelection() ? Or there is another way? basically, you have to check if the object returned by ge

Re: [api-dev] Get Selected Text in the actual TextDocument

2008-09-30 Thread Fernand Vanrie
Joel Cordeiro wrote: in basic oDocument = ThisComponent if oDocument.getCurrentSelection.SupportsService("com.sun.star.text.TextRanges") then oSelections = oDocument.getCurrentSelection sSelection = oSelections.getByIndex(0).getString() elseif oDocument.getCurrentSelection.SupportsS

Re: [api-dev] Get Selected Text in the actual TextDocument

2008-09-30 Thread Rony G. Flatscher
Joel Cordeiro wrote: > does anyone could help me about how to get the selected text in the actual > TextDocument (Writer)? How does we cast the returned object in the method > getCurrentSelection() ? Or there is another way? > If possible, a simple example would be really nice.. > You could look

[api-dev] Get Selected Text in the actual TextDocument

2008-09-30 Thread Joel Cordeiro
Hi, does anyone could help me about how to get the selected text in the actual TextDocument (Writer)? How does we cast the returned object in the method getCurrentSelection() ? Or there is another way? If possible, a simple example would be really nice.. Regards, Joel Filipe Antunes Cordeiro [EM