[Issue] Spell Check not finding errors in one document

Discuss setup / installation issues - Add a spell checker, Language pack?

[Issue] Spell Check not finding errors in one document

Postby joliraja » Thu Jun 07, 2018 8:41 pm

I am not sure if I should post in this thread because my problem was not that spelling errors were not marked while typing. Running the spell checker did not find errors, either. The problem was not general but was limited to one document. It seems some of the poster had a general problem and some didn't so there may be two different problems. Here is how it went with me. I ran the spell checker on my document and no errors were found. I didn't believe that so I typed in garbage and rand the spell checker and it did not flag it. I opened a new document and found that spell checking did work even as I typed. There seemed to be a quick and dirty fix. Copy the text from the problem document to a new one but spell checking did not work after the paste. I tried copying test from one document with spell check working to another with spell check working and it kept working. I found that if I copied even a small bit of text from the problem document to one where spell check was working it stopped working in the pasted to document. I tried closing OO and renaming the file but that had no effect. I pasted the document int Wordpad, closed OO, then opened it and copied and pasted the document back to OO. Spell checking worked but only before and after the text I pasted in. Then I exported the document as pdf and copied and pasted from Acrobat to a new doc in OO and saw the spelling errors I knew had to be in that document. So the problem seemed to be with one document.

 Edit: Split from [Solved] Spell Check Not Working (words red underlined) 
Last edited by Hagar Delest on Sun Jun 10, 2018 8:11 pm, edited 1 time in total.
Reason: tagged [Issue] (link to a bug report).
OpenOffice 4.1.4 on Windows 7
joliraja
 
Posts: 7
Joined: Thu Jun 07, 2018 7:50 pm

Re: Spell Check not finding errors in one document

Postby RusselB » Fri Jun 08, 2018 2:54 am

If the document in question doesn't contain any sensitive/confidential material, please upload it here. Note there is a 128k maximum file size. If the file is bigger than that, please upload it to a file sharing service (eg: Dropbox, MediaFire) and post a link to the uploaded file here.
This will enable us to work with/analyze the actual document.
OpenOffice 4.1.4 and LibreOffice 5.2.7.2 on Windows 7 Pro & Ultimate
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
RusselB
Volunteer
 
Posts: 4410
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Spell Check not finding errors in one document

Postby Bill » Fri Jun 08, 2018 3:22 am

@joliraja: You didn't mention the language setting for the document text. Text with a language setting of [None} will not be spellchecked. Text with a language setting for which no dictionary is installed will not be spellchecked.
AOO 4.1.5 and LO 6.0.3.2 on Manjaro MATE
Bill
Volunteer
 
Posts: 6724
Joined: Sat Nov 24, 2007 6:48 am

Re: Spell Check not finding errors in one document

Postby RoryOF » Fri Jun 08, 2018 10:40 am

As Bill says, the language set for a document is of importance for spellchecking. The language at the current cursor position is shown in the middle of the Status Bar (bottom bar of OO window). If this is "undefined" (or similar words), try /Tools /Language /For all text, and choose the language of choice from the dropdown. Then try a spellcheck.

If your documents consistently have no language set by default, come back for further advice.
Apache OpenOffice 4.1.5 on Xubuntu 18.04 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 26782
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Spell Check not finding errors in one document

Postby joliraja » Fri Jun 08, 2018 9:55 pm

Here is the file. This isn't the last version but I checked and pasting from it still kills spell checking (not just underlining). The file had been deleted so I had to pull it out of backups and had a lot of trouble doing that. I am convinced that this file is cursed so handle at your own risk. [Edit] Language was set the English when the document was active.
Attachments
CantMeasureOld.odt
(23.64 KiB) Downloaded 27 times
Last edited by joliraja on Fri Jun 08, 2018 10:10 pm, edited 1 time in total.
OpenOffice 4.1.4 on Windows 7
joliraja
 
Posts: 7
Joined: Thu Jun 07, 2018 7:50 pm

Re: Spell Check not finding errors in one document

Postby RoryOF » Fri Jun 08, 2018 10:08 pm

Status bar shows "Unknown" language selected. Use /Tools /Language /For All text to select your target language - either English(US) or English(UK) and then use /Tools /Spelling and Grammar to do a spellcheck (there are a few errors).
Apache OpenOffice 4.1.5 on Xubuntu 18.04 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 26782
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Spell Check not finding errors in one document

Postby joliraja » Fri Jun 08, 2018 10:31 pm

Language was already set to English but when I set it to Dutch and then back to English spell checking started working.
OpenOffice 4.1.4 on Windows 7
joliraja
 
Posts: 7
Joined: Thu Jun 07, 2018 7:50 pm

Re: Spell Check not finding errors in one document

Postby RoryOF » Fri Jun 08, 2018 10:34 pm

When I opened your file, the language was set to "unknown".
Apache OpenOffice 4.1.5 on Xubuntu 18.04 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 26782
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Spell Check not finding errors in one document

Postby joliraja » Sat Jun 09, 2018 12:10 am

When I open the file it says unknown in the status bar but when I go to tools/options/language, the languages are all set to English. If I set the Western doc language to something else and then back to English, spell checking starts working. It also starts working if I set the language to English in tools/language.
OpenOffice 4.1.4 on Windows 7
joliraja
 
Posts: 7
Joined: Thu Jun 07, 2018 7:50 pm

Re: Spell Check not finding errors in one document

Postby joliraja » Sat Jun 09, 2018 5:19 am

I missed something in your post. You said the language was "set" to unknown. I don't believe there is a way to set it to unknown. That means the language field is mangled. You can set the language to none, but then it shows "none" in the status bar. When I change the language field and back as before, the language remains none. I suspect that you are confusing unknown and none. There is a problem with that file that I did not cause. I didn't power down without closing the document or anything like that. You should pass that file on for somebody to look at.
OpenOffice 4.1.4 on Windows 7
joliraja
 
Posts: 7
Joined: Thu Jun 07, 2018 7:50 pm

Re: Spell Check not finding errors in one document

Postby Hagar Delest » Sat Jun 09, 2018 6:57 pm

There is something weird in the content.xml file of the document:
Code: Select all   Expand viewCollapse view
<office:automatic-styles>
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.139in" fo:line-height="100%" fo:text-align="center" style:justify-single-word="false" style:text-autospace="none"/><style:text-properties style:font-name="Calibri" fo:font-size="11pt" fo:language="en" fo:country="none" style:font-name-asian="Calibri" style:font-size-asian="11pt" style:font-name-complex="Calibri" style:font-size-complex="11pt"/>
</style:style>
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.139in" fo:line-height="100%" style:text-autospace="none"/><style:text-properties style:font-name="Calibri" fo:font-size="11pt" fo:language="en" fo:country="none" style:font-name-asian="Calibri" style:font-size-asian="11pt" style:font-name-complex="Calibri" style:font-size-complex="11pt"/>
</style:style>
</office:automatic-styles>

In both places, there is: fo:language="en" fo:country="none"
When I change "none" to "US", then it works.
Don't know how the country locale could go wrong.
AOO 4.1.5 on Xubuntu 18.04 and on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28110
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Spell Check not finding errors in one document

Postby joliraja » Sat Jun 09, 2018 7:24 pm

You know, however that field got corrupted, this experience has revealed a problem "Unknown" language is an error condition and it isn't being treated as such. It is displayed like a normal setting on the status bar. It should at least be red. There is an inconsistency in how unknown status is handled. When the file is opened, it is treated like a normal state. When the language is changed in tools/Options, it is corrected to the new default language. Which way is it supposed to be? I think the user should get a message box when the file is opened since something is wrong with the file. Unless there is some good reason for not doing so, I believe the correction should occur on opening the file and the unknown state should not exist.
OpenOffice 4.1.4 on Windows 7
joliraja
 
Posts: 7
Joined: Thu Jun 07, 2018 7:50 pm

Re: Spell Check not finding errors in one document

Postby Bill » Sat Jun 09, 2018 8:58 pm

"Unknown" isn't really an error condition. The setting in your document is basically (en) which is not on the list of languages shown in Tools > Options > Languages >Default languages for documents. Every variant of English in that list is of the form (en-country), so a generic (en) setting with no country would be unknown to Writer.

There is no inconsistency. The language is shown as "Unknown" when the document is opened because the language setting stored in the document isn't on the list of known languages. Writer can't correct that setting because Writer has no way to know which (en-country) should be used instead of (en). That's a setting that the user has to correct.
AOO 4.1.5 and LO 6.0.3.2 on Manjaro MATE
Bill
Volunteer
 
Posts: 6724
Joined: Sat Nov 24, 2007 6:48 am

Re: Spell Check not finding errors in one document

Postby Hagar Delest » Sat Jun 09, 2018 9:39 pm

joliraja wrote:There is an inconsistency in how unknown status is handled.

Then -> [Tutorial] Reporting bugs or suggestions.
AOO 4.1.5 on Xubuntu 18.04 and on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28110
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Spell Check not finding errors in one document

Postby Bill » Sat Jun 09, 2018 11:21 pm

This bug report contains some information about the "unknown" language status:

Issue 104249 - Language information of new languages gets lost
AOO 4.1.5 and LO 6.0.3.2 on Manjaro MATE
Bill
Volunteer
 
Posts: 6724
Joined: Sat Nov 24, 2007 6:48 am

Re: Spell Check not finding errors in one document

Postby joliraja » Sun Jun 10, 2018 2:36 am

That's interesting. He is saying his language info is getting mangled when he updates to a new version. I started that document in 4.0.1 and then updated. I didn't get very far before I updated and I don't know if spell checking was working before that. I am pretty sure there is no way to get a document in the state mine was in through the user interface and only Writer ever acted on those files, it had to be Writer that clobbered the language field. Since this problem seems to be a permanent fixture, they should really handle it better. They could just set such files to the default language since that is exactly what happens when the default language is changed.
OpenOffice 4.1.4 on Windows 7
joliraja
 
Posts: 7
Joined: Thu Jun 07, 2018 7:50 pm

Re: Spell Check not finding errors in one document

Postby Bill » Sun Jun 10, 2018 3:59 am

joliraja wrote:They could just set such files to the default language since that is exactly what happens when the default language is changed.

That will only work if the default language happens to be the correct language. If the default language were French (France), then the document setting would be changed to French (France) which would be an incorrect language setting.
AOO 4.1.5 and LO 6.0.3.2 on Manjaro MATE
Bill
Volunteer
 
Posts: 6724
Joined: Sat Nov 24, 2007 6:48 am

Re: [Issue] Spell Check not finding errors in one document

Postby John_Ha » Tue Jul 10, 2018 4:09 pm

joliraja wrote:That's interesting. He is saying his language info is getting mangled when he updates to a new version

I very much doubt that updating had anything to do with it. The problem lies in the document, not the application.

I am pretty certain the problem is caused by copying text which is already marked "unknown" or "country=none" from somewhere, and then pasting it into a .odt file. AOO therefore does not know what to do with it. Judging from the mangled XML it looks like the copied text has come from - surprise, surprise - an MS Word .docx file

The test is simple: Copy some of the text from the uploaded .odt file and paste it into a new, empty text document. It appears with country="none".

When I set the first paragraph below to UK English, the country="none" does not change. What does happen is a new line appears defining text:style-name="T1", where language = en and country = GB. The first paragraph is then defined with this T1 style.

I therefore do not think it is an AOO issue - AOO is dealing with what the user has asked AOO to do.
Attachments
Clipboard01.gif
AOO 4.1.5, Windows 7 Home 64 bit

See the Writer Manual, the Writer FAQ, the Writer Tutorials and the Writer guide.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 5525
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK


Return to Install, Setup and Troubleshooting

Who is online

Users browsing this forum: No registered users and 4 guests