Bug 116718 - Autocorrect--Capitalize first letter of every sentence--missing .) or ." as end of sentence
Summary: Autocorrect--Capitalize first letter of every sentence--missing .) or ." as ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 49187 (view as bug list)
Depends on:
Blocks: AutoCorrect-Complete CaseFolding
  Show dependency treegraph
 
Reported: 2018-03-31 04:22 UTC by James Falksen
Modified: 2023-06-19 00:22 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sentence case won't capitalize second sentence. (9.92 KB, application/vnd.oasis.opendocument.text)
2021-09-05 23:35 UTC, Michael Warner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Falksen 2018-03-31 04:22:15 UTC
I keep being told that sentence punctuation belongs inside quotes or parentheses. But when doing this, LibreOffice does not recognize this ending of the sentence and so the next sentence is not capitalized.
Comment 1 James Falksen 2018-03-31 04:32:34 UTC
Type

   I am finished (done.) word next

w does not get capitalized.

I have gotten notice of a new version, so I will upgrade and test again.
Comment 2 V Stuart Foote 2018-03-31 06:13:05 UTC
The STR reproduce, so seems an issue in edit engine autocorrect modify or typing not catching the ".)" as a sentence ending.

But easy workaround to correct by taking the sentence selections through Format -> Text -> UPPERCASE, and then through Fromat -> Text -> Sentence case. 

The ICU library transliterations correctly handle the sentence break that the edit engine misses.

=-testing-=
current master/6.1.0 on Windows 10 Pro 64-bit en-US
Version: 6.1.0.0.alpha0+ (x64)
Build ID: 83204c1fbf2cb85f3a22a922411ed8291cfb3fe8
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-03-29_01:08:27
Locale: en-US (en_US); Calc: CL
Comment 3 QA Administrators 2019-04-01 03:24:58 UTC Comment hidden (obsolete)
Comment 4 V Stuart Foote 2019-04-01 12:20:45 UTC
Still an issue with the 6.2.2 release on Windows.

And, not sure if the ICU lib _is_ treating the '."', or the '.)' as a valid sentence boundary mark. Using STR of bug 49033 with no selection ignores them in calculating temp string for the Sentence case transliteration. My Comment 2 here was not valid workaround.
Comment 5 Michael Warner 2021-09-05 23:33:58 UTC
In my testing, a sentence break is not recognized when the next sentence begins with a lower-case character. For example, in the attached file, if you apply sentence case to the second sentence (whether there is a selection active or not), it won't capitalize the first character. 

I have traced through the code path into BreakIterator_Unicode::endOfSentence in breakiterator_unicode.cxx, and found that the start position returned by 
sentence.mpValue->mpBreakIterator->following(nStartPos); is wrong. My supposition is that the true error lies in loadICUBreakIterator, but I haven't been able to follow that logic well enough to find it.
Comment 6 Michael Warner 2021-09-05 23:35:10 UTC
Created attachment 174799 [details]
Sentence case won't capitalize second sentence.
Comment 7 Michael Warner 2021-09-05 23:46:58 UTC
Also, I have noticed that the help page does not describe several of the Format commands for changing the case of text. 

https://help.libreoffice.org/7.1/en-US/text/swriter/guide/text_capital.html?DbPAR=WRITER
Comment 8 Michael Warner 2021-09-05 23:50:38 UTC
Looks like what I described in Comment 5 is already filed in Bug 49187, which is technically slightly different from this one as described, but they probably have the same root cause.
Comment 9 V Stuart Foote 2021-09-06 01:13:07 UTC
*** Bug 49187 has been marked as a duplicate of this bug. ***
Comment 10 V Stuart Foote 2021-09-06 01:13:53 UTC
duping bug 49187 ot here as this is getting a hard look...