Bug 150725

Summary: Cycle case (SHIFT+F3) changes case of text (in the same sentence) that was previously selected and cycle cased
Product: LibreOffice Reporter: eBatch <bazzaman>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: rafael.palma.lima, vsfoote
Priority: medium    
Version: unspecified   
Hardware: All   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:

Description eBatch 2022-08-31 16:04:33 UTC
Description:
Was running LO 7.2.7.2 (under Windows 10 x64) and came across this issue in Writer and so installed LO 7.3.5.2 on a spare machine and problem still exists.

Consider the following text:

    abc def ghi jkl mno

Select def and cycle case to (say) DEF

Then select jkl (and so implicitly deselect DEF) and cycle case to JKL. At some point in the cycling of jkl DEF reverts to def (even though DEF is not selected).

The issue appears not to occur if the two elements of selected text are in different sentences (even within the same paragraph). 

However the issue persists if the first and second use of cycle case (in the same sentence) are separated by some other activity (e.g. more typing, even in a different paragraph).

Given the above, would not surprise me if there are a number of other oddities lurking therein. Maybe the whole cycle case code needs a thorough review.

In proving this I also saw that there's also (still) the issue of the first letter of the sentence getting capitalised on the fly as part of this (I believe this is covered in bug 116315 #11).

Steps to Reproduce:
See Description

Actual Results:
See Description

Expected Results:
See Description


Reproducible: Always


User Profile Reset: No



Additional Info:
See Description
Comment 1 Rafael Lima 2022-08-31 19:05:17 UTC
I could reproduce this with

Version: 7.3.5.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.5-0ubuntu0.22.04.1
Calc: threaded

However in the latest daily build the issue is NOT reproducible.

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 9ba1e1486bf3fcccf98da93d3963b3d4036705a9
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded

I could not find a patch fixing this issue, but somehow it seems fixed on master.
Comment 2 V Stuart Foote 2022-08-31 19:34:35 UTC
Can not confirm on 7.4 either. 

Version: 7.4.1.1 (x64) / LibreOffice Community
Build ID: 0a046a10cbf1679eea5538bd3ab63156caa3a036
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

but it is present in

Version: 7.3.6.1 (x64) / LibreOffice Community
Build ID: 92b673af3a5e8f7cf4716be88dfaca424612f244
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Think that was a hold over for the Sentence case selection vs. no-selection.
taken care of by

https://git.libreoffice.org/core/commit/de5aa409353c839483df21d47254fd2a508ab7d9

*** This bug has been marked as a duplicate of bug 144851 ***