Hi William,

On 10.09.2010 17:14, William Colen wrote:

> Thanks, Thomas and Marcin,
> 
> What if I add to the context menu a "Ignore once and report" entry? I could
> generate the report, and after that somehow call the standard "Ignore once".
> 
> I don't know it if is possible to implement that:
> 1. I should add "Ignore once and report" to the context menu only if there
> is a grammar error. Are there any property that could point that?

This is possible. The concept is called context menu interception. See
http://wiki.services.openoffice.org/wiki/Framework/Tutorial/Context_Menu_Interception
The dialog 'id' you want to intercept is named
"private:resource/GrammarContextMenu".

The amount of code required isn't exactly small though. (Some similar
C++ code for example is about 1000 lines, i.e. 25k including comments) :-(

> 2. How to programmatically call "Ignore once"?

Unfortunately I was just told that this is impossible. It is not allowed
to make other calls to the Excute function of the context menu while the
current code itself is within that Execute. :-(


Thomas



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lingucomponent.openoffice.org
For additional commands, e-mail: dev-h...@lingucomponent.openoffice.org

Reply via email to