Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Grammar checking works for selection but not whole document
Grammar checking works for selection but not whole document
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
TimArends
Agent


Joined: Feb 02, 2009
Posts: 13

PostPosted: Sun Feb 08, 2009 11:14 am    Post subject: Grammar checking works for selection but not whole document

This may be because I have a 193 page document, but when I choose Tools > Add-ons > Check Grammar > Entire Document, it says "No grammar errors found," but when I select a few pages of text first, it finds plenty of possible errors. I like for it to be able to find errors without selecting text first, and I also like the little squiggly green line that shows up for grammar errors in some OSX programs but not Writer.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Feb 08, 2009 11:27 am    Post subject:

If you are getting no errors, then Mac OS X's grammar checking service is telling NeoOffice that there are no errors.

Please understand that we did not write custom grammer checking code and, instead, we merely send the selected text to Mac OS X's built-in grammar checking service and display and errors that it sends back. So, if Mac OS X's grammar checking services says the text is OK, then there is nothing we can do to change that.

As for the green underline, that is not possible to implement as it would require us to funnel every keystroke through NeoOffice's underlying OpenOffice.org grammar checking service. That service, in turn, would cause the entire paragraph to be sent to the Mac OS X spellchecking service with every keystroke and would make NeoOffice grind to a near halt. More details about this are in this forum topic.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Feb 08, 2009 11:32 am    Post subject:

I should also add the Mac OS X spellchecking service currently only supports English and, frankly, is at best a fairly limited grammar checker. While it is good to see that Apple added a grammar checker in Mac OS X 10.5 Leopard, the reality is that their grammar checker has a long ways to go before it matches Microsoft Office's proprietary grammer checker.

Given that, I would definitely not assume that the grammar checker will find all grammar errors.

Patrick
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Sun Feb 08, 2009 3:11 pm    Post subject:

I cannot reproduce this issue.

If I create a test document, with one page of grammatical mistakes (and the rest correct), running Tools > Add-Ons > Check Grammar > Entire Document gives me the same results as selecting the page of mistakes and running Tools > Add-Ons > Check Grammar > Selected Text.

Can you attach the file you're having trouble with to your post, so that we can have a look and possibly determine what's causing the issue for you ?

How to attach files to your post
Back to top
TimArends
Agent


Joined: Feb 02, 2009
Posts: 13

PostPosted: Sun Feb 08, 2009 10:03 pm    Post subject:

Thanks, the file is right here.
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Mon Feb 09, 2009 7:56 am    Post subject:

With your sample document, I can now reproduce the issue.

For example, selcting the text between "Introversion" ( page 18 ) and "It just ain't so" ( page 20 ) and running Tools > Add-Ons > Check Grammar > Selected Text return three possible grammar errors.

However, running Tools > Add-Ons > Check Grammar > Entire Document only returns "No grammar error found".

Edit: I don't know why the grammar checker is behaving this way with your document. Moreover, when checking Spelling and Grammar in TextEdit, I do not get the same errors as in NeoOffice (on the same selection, 3 errors, but only 2 are the same, and the third is different).

Perhaps Ed (who wrote the Mac OS X grammar checker integration for NeoOffice, IIRC) has an idea of what could be causing this?
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Feb 09, 2009 9:29 am    Post subject:

Samwise wrote:
Edit: I don't know why the grammar checker is behaving this way with your document. Moreover, when checking Spelling and Grammar in TextEdit, I do not get the same errors as in NeoOffice (on the same selection, 3 errors, but only 2 are the same, and the third is different).


That is the difficult part to determine. While TextEdit also uses the Mac OS X grammar checking service, what it actually passes to the service is unknown since Apple's TextEdit code is proprietary. My guess is that TextEdit is not passing the entire text in one chunk to the Mac OS X grammar checking service.

Patrick
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Mon Feb 09, 2009 10:55 am    Post subject:

pluby wrote:
since Apple's TextEdit code is proprietary.

FYI, the TextEdit source code is actually one of the example projects in the Developer folder you get when installing Xcode (I think it lives in the AppKit examples).

Not that this will help reverse-engineering the grammar checker behavior, particularly if the behavior is actually part of NSTextView rather than TextEdit itself....

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Feb 09, 2009 12:46 pm    Post subject:

I have found the cause of the failure when you select the Entire Dcouement menu and I think that I have fixed it. If you are a NeoOffice 3.0 Early Access member, can you install the following test patch and tell us if the bug is fixed for you? If you are using NeoOffice 2.2.5, I will post a test patch in the next hour:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.0_Early_Access_2-Patch-0-Test-8-Intel.dmg

PowerPC:
http://joe.neooffice.org/test/NeoOffice-3.0_Early_Access_2-Patch-0-Test-8-PowerPC.dmg

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Feb 09, 2009 1:20 pm    Post subject:

FYI. Here are links to a test patch for NeoOffice 2.2.5. If you have NeoOffice 2.2.5 installed, can you install the following test patch and tell us if the bug is fixed for you?:

Intel:
http://joe.neooffice.org/test/NeoOffice-2.2.5-Patch-6-Test-1-Intel.dmg

PowerPC:
http://joe.neooffice.org/test/NeoOffice-2.2.5-Patch-6-Test-1-PowerPC.dmg

Patrick
Back to top
aussie149
The Merovingian


Joined: Feb 12, 2005
Posts: 607
Location: Australia

PostPosted: Mon Feb 09, 2009 5:29 pm    Post subject: But...

Hi Patrick
This patch is now working for me, I'm pleased to say Smile However, what I am finding is that the window with the corrections appears above the page where I initiated the request for grammar checking. It would certainly be preferable to have what happens with the spellchecker, which is that the display moves in turn to the place where each error occurs. I presume this is an OOo thing? I've added attachments in case I haven't made sense.
Peter
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Feb 09, 2009 6:19 pm    Post subject: Re: But...

aussie149 wrote:
Hi Patrick
This patch is now working for me, I'm pleased to say Smile However, what I am finding is that the window with the corrections appears above the page where I initiated the request for grammar checking. It would certainly be preferable to have what happens with the spellchecker, which is that the display moves in turn to the place where each error occurs. I presume this is an OOo thing? I've added attachments in case I haven't made sense.
Peter


Sorry, but this feature request is not feasible as there is now way to query a text run's position on screen through the OpenOffice.org Basic macro language.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Feb 10, 2009 2:51 pm    Post subject:

FYI. I have included the fix for this bug in NeoOffice 2.2.5 Patch 7. The patch can be downloaded from the following URL:

http://www.neooffice.rog/neojava/pathc.php

I have also included the fix for this bug in NeoOffice 3.0 Early Access 2 Patch 1. The patch can be downloaded from the following URL:

http://www.neooffice.org/neojava/earlyaccesspatch.php

Patrick
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.