Benutzerspezifische Werkzeuge
Sie sind hier: Startseite Forum Nice Office Access (NOA) Getting the currently selected text

 • Getting the currently selected text

Antworten: 3   Ansichten: 81
Eine Ebene höher

 • Getting the currently selected text

Eingeschickt von Yadis at 2010-01-27 10:48:22
Hello, me again =)
I got NOA working so far inside my plugin, but now I stumbled across a few problems again.

1)
Is it possible to retrieve the currently selected text?
What I basically want to do is programmatically extract the selected text so I can use it and then format the text in the OO document. As far as I've understood that, I would like to have an ITextRange for that.
But even just getting the current selection as a String would help, as I could just do a search for the returned String and then format.

2)
Is there a way to retrieve the character background colour? I can access and change the character colour, but not the background colour.

3)
This one is a bit more advanced.
Is it possible to remove/change the right click menu inside an OO document? For example I want to select a text range, and in the right-click menu have an entry to set the character background colour to a specific colour (hence question 1 and 2).

If the above questions can't be solved with NOA, a hint on how to solve them with UNO would also be very much appreciated.

Thanks again.
Yadis Mitglied
Beiträge: 8

Powered by Plone, the Open Source Content Management System

Diese Website erfüllt die folgenden Standards: