Bug 104197 - Spell Checker in Calc defaults to US even though locale is en-gb
Summary: Spell Checker in Calc defaults to US even though locale is en-gb
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: All All
: low normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-27 11:07 UTC by patrickabiggs
Modified: 2017-05-11 09:38 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description patrickabiggs 2016-11-27 11:07:54 UTC
Calc did not pick up En-gb dictionary from system locale.
Instead defaulted to US spelling.
Tried to change Tools...Spelling... Text Language to English UK.  Keeps changing it back to English US.

Looked at Tools...Options...Language Settings and User Interface was English US.
This should have picked up from locale and changed to English UK. Anyway changed it to English UK. Forced restart of LibreOffice. No problem.

Went back to the spreadsheet and centre was not highlighted.
Went to Spelling again and it revered to English US.
Changed it to English GB but it keeps reverting to English US.

I am not sure if there are two issues here ...
1) Why didn't Calc pick up my locale properly in the first place?
2) Why does Spelling keep changing Language back to English US?

Started a new spreadsheet and language defaulted to none.
Forced automatic spell check and now spelling language appears to have settled on UK.
So eventually this is working but there is definitely something wrong with the locale code in Calc.
Comment 1 Buovjaga 2016-12-01 18:44:16 UTC
(In reply to patrickabiggs from comment #0)
> Calc did not pick up En-gb dictionary from system locale.

So you installed a dictionary extension? Can you point us to the link to it?
Comment 2 Justin L 2017-05-06 19:01:35 UTC
Under Tools - Language settings - Languages there is a "default languages for documents" section in which the document language is defined. I assume that is where English US is defined.

I can confirm that changing the "Text language" in Tools - Spelling to another language is goofy.  With my default language set to English UK, I am able to switch to various English Canada/Australia OK, but not to English USA.  (The opposite happens when I have English USA as the default language for documents - then it acts as OP describes.)
Comment 3 Justin L 2017-05-10 19:04:42 UTC
The most proper place to "set" the language for a specific document is the default style - font tab.

I'm not familiar with Calc/spelling code, but from what I can see, spell checking works on a per sentence basis, picking up the language from the character/paragraph/cell properties.  In Calc, this would general mean that each cell is checked independently, and most likely the language is defined in the default style.

When you "change" the language in the spelling dialog, it changes it for that one word, and then (assuming it is no longer considered to be a spelling error) moves to the next sentence where it again switches to the "default style" language for that sentence.

Writer acts similarly. Switching the dictionary language using the spell checker jumps over that word and moves to the next error. The difference is that in Writer, the character language property for the misspelled word is actually changed.  That doesn't seem to happen in Calc.

So to deal specifically with OP's complaints.
1.) LO has a separate property to set the default language (likely defaulting to your OS system locale, and unaffected by changes made to LibreOffice's locale setting.) I would not consider this a bug - just something the user needs to learn.
2.) Hopefully my description above explains why this happened. Although I agree that in the Calc context, this doesn't fit as well, I wouldn't consider it to be a bug either.

The only bug I see here is that Calc doesn't permanently change the language properties of the "misspelled" word when the spelling dialog changes it - I would consider that to be pretty minor in Calc.
Comment 4 Justin L 2017-05-11 09:28:47 UTC
created a clean report for the failure of the spell-checker to modify the character's language properties (regression in LO4.2) as bug 107765.

I'm suggesting that we close this particular bug report as WontFix.  It is similar to bug 97188 (Cannot set spell-check language in Calc; therefore, spell-check does not work at all).
Comment 5 Buovjaga 2017-05-11 09:38:32 UTC
Thanks, Justin. Closing.