Files
loongoffice/include
Justin Luth 6b6d9c618e tdf#153684 spellcheck: ignore non-case character when !IsSpellUpperCase
This fixes a 7.5 regression from
commit ab0adac692b67fe7b63dee665607400c6a7e6c01
    Fix everything using XCharacterClassification::getStringType()...

Prior to erack's commit, all of the character-type-flags were grouped
together. So it could be a mix of UPPER, LOWER, and TITLE_CASE.
IsUpper returned true if there was at least one UPPER and no LOWER.
    return      (nFlags & KCharacterType::UPPER)
            && !(nFlags & KCharacterType::LOWER);

Since it was a group of flags, any characters that were non-case
(like a fullstop) did not affect the result of IsUpper.

But when it was changed in 7.5 to
    return aCC.isUpper( rText, nPos, nLen );
now every character needed to be considered to be upper-case,
even if it was a non-case character.

So this patch changes the logic back to the original state
(more or less).
The fly in the ointment are any Unicode characters
that would be considered to be TITLE_CASE.
Previously they were ignored (i.e. they didn't affect the outcome),
but now I consider them to be non-uppercase.
That seems to me to be the intent here anyway,
so probably this implementation "fixes a bug"
when a word consisted of a mixture of UPPER and TITLE_CASE chars.

Change-Id: I7cf1d68bc3eb0a1a468da9e67ab54d1148f097aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187934
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
(cherry picked from commit 53a9cee01759ce54c4ee50468958531a360640f9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187936
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 952412154a4872d0f06a60c44506278924bb9c62)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188006
2025-08-18 17:59:13 +02:00
..
2025-02-10 11:29:00 +01:00
2025-02-10 11:29:00 +01:00
2024-11-10 10:50:15 +01:00
2025-01-08 13:04:28 +01:00
2024-11-08 05:34:20 +01:00
2024-10-01 11:16:00 +02:00
2024-10-16 15:51:52 +02:00
2025-02-10 11:29:00 +01:00
2024-11-19 07:46:25 +01:00