Marcin Miłkowski wrote:

> Hi all,
> 
> I'm trying to understand the new API from the point of view of the 
> grammar checker developer (unfortunately, the docs are written from the 
> opposite point of view).
> 
> So far I got this (I'm using Java, so Java API names follow):
> 
> The checker should implement the XGrammarChecker interface, and define 
> its abilities this way. OK. The checking process would be started with 
> doGrammarChecking() method. OK. But here goes what I don't understand. 
> Suppose I found some errors with my code, and I built the structures 
> that describe errors (as far as I understand, I should use 
> GrammarCheckingResult that contains a collection of 
> SingleGrammarErrors). But what should I do with this structure? In other 
> words, how do I make a wavy green line to appear, or supply data for a 
> grammar checker dialog box / context menu? I haven't found any APIs that 
> allow doing that but maybe they're generic and not for grammar-checking 
> only.

You don't need to do that - OOo will do that for you, based on the
information you return.

> It's not clear to me if doGrammarChecking() would be triggered 
> automatically or not - if not, whether I should build a class that uses 
> XFlatParagraph to iterate the document? Also I cannot see any use for 
> document IDs in the API - what are they for? And what endDocument method 
> should do?

OOo will call doGrammarChecking() in the idle processing. Thomas Lange
currently is implementing this. For the moment you can write a Basic
macro that calls doGrammarChecking() and so start your checking with
this macro.

Ciao,
Mathias


-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to