https://bugs.documentfoundation.org/show_bug.cgi?id=125600

Justin L <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #8 from Justin L <[email protected]> ---
This is not Calc specific. Writer does the same thing.

I expect that since our misspelled word starts with a capital letter, the
replacement is also helpfully capitalized (as would normally need to happen).

Ah yes: hunspell.cxx HunspellImpl::suggest
  if (capwords)
    for (auto& j : slst) {
      mkinitcap(j);
    }  
and fails to check if the suggested result matches the "wrong" word and skip
capitalization in that case. Messy.

Generally, the suggested alternatives SHOULD be capitalized, so it is good that
it is doing 'capwords'.

Of course it again gets complicated in case KWh starts a sentence. However,
that will be in a different code path than just getting a list of suggested
replacements... Plus, that is a GRAMMAR concern, not spelling.

This probably is best solved by the Hunspell project.
If a workaround is needed by LO, perhaps SpellCheckerDispatcher::spell_Impl
would be the place to handle it? Our capitalType in this case is
CapType::MIXED.

Hunspell patch at  https://gerrit.libreoffice.org/c/core/+/191755

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to