Description: Resolution of bug 116315 is not totally satisfactory: When cycling (Shift+F3) through "Sentence case" it is the total sentence which is modified even if only one word is selected Steps to Reproduce: Hi, 1. Write a sentence with some words uppercase 2. Select one word 3. Shift+F3 => uppercase for the selected word 4. Shift+F3 => lower for the selected word 5. Shift+F3 => capitalize first letter of the selected word 6. Shift+F3 Actual Results: the whole sentence is capitalized as a sentence Expected Results: only the selected word should be modified according to its place in the sentence. Reproducible: Always User Profile Reset: No Additional Info:
Confirmed on Ubuntu 18.04 - Libreoffice 6.1.0.3 Yves
Code-wise, the sequence is now TITLE_CASE, SENTENCE_CASE (newly inserted at this position), LOWERCASE_UPPERCASE, UPPERCASE_LOWERCASE [1] with the options of [2]. And 'sentence case' was the requested option. If you want to toggle the word you have to press 4x shift+F3. => WFM [1] https://cgit.freedesktop.org/libreoffice/core/tree/unotools/source/i18n/caserotate.cxx?id=84f8e28d092676aad830a9fbae8145a57c6301bc [2] https://opengrok.libreoffice.org/xref/core/include/i18nutil/transliteration.hxx#31
I can't reproduce it in Version: 6.2.0.0.alpha0+ Build ID: 63f8c506637c910ed1efa572f23ff1af7715e7e3 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: threaded instead, what i see is: 1. Write a sentence with some words uppercase 2. Select one word 3. Shift+F3 => uppercase for the selected word 4. Shift+F3 => lower for the selected word and the word before it...
@Laurent, @Heiko, Do you reproduce what I say in comment 3 ?
(In reply to Xisco Faulí from comment #4) > Do you reproduce what I say in comment 3 ? Selection in brackets Start: [He heard quiet steps behind him.] [He Heard Quiet Steps Behind Him.] [He heard quiet steps behind him.] [HE HEARD QUIET STEPS BEHIND HIM.] [he heard quiet steps behind him.] Start: He heard [quiet steps] behind him. He heard [quiet steps] behind him. He heard [QUIET STEPS] behind him. He heard [Quiet Steps] behind him. He heard [quiet steps] behind him. (not perfectly sure about the sequence) So LBP is right, the procedure takes into account whether the selection is part of a sentence or not. Users likely expect: Start: He heard [quiet steps] behind him. He heard [Quiet Steps] behind him. He heard [Quiet steps] behind him. He heard [QUIET STEPS] behind him. He heard [quiet steps] behind him.
I get the same results as in comment 5, but the problem is that that example doesn't properly test the function. Part of the issue is that Shift-F3 starts with the next case after the last one used, even if that was on a different bit of text. Perform the following steps: 1. Write two sentences as follows: This should be title case. John Smith and Joe Blow wrote to fred jones. 2. Select the first sentence and press Shift-F3 once or as many times as needed to have every initial letter capitalised, i.e. "This Should Be Title Case." 3. Select "fred jones" and press Shift-F3 The result is that sentence case is applied to the whole sentence, which now reads as "John smith and joe blow wrote to fred jones." So this has just uncapitalised "Smith", "Joe", and "Blow", and done nothing to "fred jones". 4. Press Shift-F3 three more times and "fred jones" will become "Fred Jones". 5. Now select "joe blow" and press Shift-F3. This changes "Fred Jones" back to "fred jones"! Without stepping through cases on a different bit of text, there is no way to get the correct capitalisation through using Shift-F3. It cannot be done.
My previous comment was perhaps overly complicated. Simply try this: Type the sentence "john smith and joe blow wrote to fred jones. Now, using Shift-F3 as many times you like and selecting whatever parts of the text you'd like, capitalise the first letter if each name, and only those letters. If you can do it, I'd like to know how.
Patch in gerrit: https://gerrit.libreoffice.org/#/c/59894/
(In reply to Xisco Faulí from comment #8) > Patch in gerrit: https://gerrit.libreoffice.org/#/c/59894/ Thios is work in progress. What I can do is to start from zero after 3 seconds, which solves what Philip reports. From the UX POV it would be nice to have a feedback on the cycle either per tooltip or preferably as a text in the status bar. Failed with both and need help. Bigger issue that I'm not able to solve is Laurent's problem (see also comment 6) - and I don't know if we want to change the behavior.
Instead of resetting the cycle after three seconds, what if it was reset when the cursor is moved? If the cursor is moved to another bit of text, or a new selection made in the same bit (which involves moving the cursor), I think starting the cycle again is warranted. Resetting the cycle after three seconds will cause different behaviours for different people depending on how fast they operate. And I don't think that anything ought to be changed outside the selection. Therefore sentence case is only applied if the whole sentence is selected, or if the selection includes the start of the sentence, but even then only to the selection. You could also apply sentence case to the whole sentence if there is no selection, but even this is contrary to similar behaviour. If there is no selection (but the cursor is in a word), bolding, etc. is applied only to the word. So if there is no selection, I think that sentence case should not be applied even in that case.
The timer idea was too simple. Abandoning patch https://gerrit.libreoffice.org/#/c/59894/ as dealing with caret position is beyond my skills.
This is actually bug 49033. It simply started to affect the cycle case function.
*** Bug 120039 has been marked as a duplicate of this bug. ***
(In reply to Mike Kaganski from comment #12) > This is actually bug 49033. It simply started to affect the cycle case > function. Yep. You are right.
*** Bug 120254 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 49033 ***