Hi
The only solution currently available would be to process the text of
the document all by yourself using the respective API and maybe the
XBreakiterator as well.
Yes, that is what i'll probably will have to do
Unfortunately each application is likely to have different API to
access the text. Though all of them probably have the XText interface
implemented it is not really the one to use.
One would probably like to access a paragraph or sentence.
The Writer has an XSentenceCursor, XParagrpaphCursor and a
ParagraphEnumeration for this. But I'm not sure about the other
applications.
i planned to use Cursors, with some gotoNextWord(True) magic
Using the character properties to have colored waves is possible.
But setting them will modify the document which is most likely unwanted,
and you will have the problem of undoing the change when everything is
corrected.
exactly
And considering that each character can have different
attributes and may already have the ones you living up to this task
seems to be troubelsome.
yes
And the redlines for spellchecking are not even attributes.
would it be possible to use
com.sun.star.xml.UserDefinedAttributeSupplier
i think so
then trick would to plug this on the built-in waving code
As mentiones before the Writer keeps a list of all words still flagged
as incorrect. And when the drawing layer paints a word it looks for it
in the wrong-list and if it is found there it draws those red waves
directly as well. Thus there is no distinction between different
occurences of the same word.
would it be possible to check the attribute ? not sure in fact
And removing the red waves is basically removing the word from the
wrong-list and redrawing that text part.
I think the best would be to implement a new uno component able to waves
a textrange/cursor ? passed as argument
would it be difficult ? where is it coded in sources ?
Instantiating com.sun.star.linguistic2.Thesaurus directly via a
multi service factory will give you only one of the registered
services. AFAIR it will be the one last registered.
understood, thanks :)
Laurent
--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org
Indesko >> http://www.indesko.com
Nuxeo CPS >> http://www.nuxeo.com - http://www.cps-project.org
Livre "Programmation OpenOffice.org", Eyrolles 2004
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]