Bug 105355 - Automatic Spell Checking highlights correctly spelled AutoInput word starting with capital letter
Summary: Automatic Spell Checking highlights correctly spelled AutoInput word starting...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Spell-Checking
  Show dependency treegraph
 
Reported: 2017-01-15 22:33 UTC by Gilward Kukel
Modified: 2022-12-21 17:56 UTC (History)
3 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 Gilward Kukel 2017-01-15 22:33:21 UTC
Description:
Automatic Spell Checking highlights correctly spelled AutoInput word starting with capital letter when input with lowercase first letter

Steps to Reproduce:
1. set document language to English or German (Tools > Options > Language Settings > Languages). Maybe other languages work too.
2. enable Tools > Automatic Spell Checking and Tools > AutoInput
3. in A1, enter Mars. There is no red line from the spell checker under the word. 
4. in A2, type a lowercase m and press enter. AutoInput puts "Mars" into the cell.


Actual Results:  
There is a red line from the spell checker under "Mars" in A2.


Expected Results:
There should be no red line because the spelling is correct.


Reproducible: Always

User Profile Reset: yes

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Comment 1 Buovjaga 2017-01-23 16:56:34 UTC
I tried with Finnish and I could not reproduce. Spell checking in Calc works otherwise.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.4.2.0+
Build ID: 5.2.4-2
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Comment 2 Gilward Kukel 2017-01-25 19:17:47 UTC
try it with "FIFA"
Comment 3 Justin L 2017-05-11 07:39:30 UTC
confirmed with LO 5.4alpha1 and Ubuntu 16.04 x64.

-set Default style Font language to English (UK)
-typed "Mars" in cell A1 and no misspelling (of course).
-typed m<tab> in cell A2. Autofilled as "Mars," but with a misspelling underline.
[P.S. English US doesn't consider "mars" a misspelling, so make sure you don't test with US English.]

Bibisect suggests this has always been true - already seen in "last36onmaster".
Comment 4 QA Administrators 2018-05-12 02:28:43 UTC Comment hidden (obsolete, spam)
Comment 5 Justin L 2019-08-02 06:17:22 UTC
(In reply to Justin L from comment #3)
> confirmed with LO 5.4alpha1 and Ubuntu 16.04 x64.
still confirmed as a bug in LO 6.3.
Comment 6 Justin L 2020-07-17 15:26:18 UTC
repro 7.1+
Comment 7 Justin L 2020-07-18 10:26:38 UTC
The code for this seems to be in sc/source/ui/app/inputhdl.cxx's ScInputHandler::EnterHandler where mpEditEngine->CompleteOnlineSpelling() checks spelling before bAutoComplete performs case-matching after that.

This is a very complicated function however. Reviewing some of the history, these commits looked important/useful.

commit 891fd9e8a64d14d8c2b1593493ae04ccdfc2b1b7
Author: Rüdiger Timm on Tue Jul 3 14:53:54 2007 +0000
    2007/06/08 13:11:20 nn 1.68.54.1: #i47125# with AutoInput, do final AutoCorrect at end of text

commit d8bb8c4fb850b9de762567ed7d337972467470d6
Author: Kohei Yoshida on Thu Sep 16 10:22:36 2010 +0200
    calc-autoinput-case-insensitive-matching.diff: no case matching on autoinput


But MOST CONCERNING is that cellsh4.cxx calls ExecuteMove which again leads to EnterHandler running with the wrong, lower-cased string!!

In fact, every time you move from one cell to the next (15 times if you move left 15 times), you do all of that processing - NOT FOR THE CELL YOU ARE ON - but for the last entry you typed.  a COMPLETE waste of CPU resources.

Obviously there are fundamental problems here. A calc guy needs to look into this.
Comment 8 Justin L 2022-05-17 10:34:05 UTC
repro 7.4+
For bibisecting, I downloaded an english .oxt spell check "dictionary" extension.
Comment 9 Justin L 2022-05-17 11:21:56 UTC
another "feature" is that if you do have the uncapitalized version of the word, it will LOSE the misspelled status.

For example

canada    #this gets un-marked as misspelled - at least temporarily

Canada    #these two get marked as misspelled
ca<tab>   (-> Canada)