Bug 116315 - Cycle Case does not use Sentence case or tOGGLE cASE
Summary: Cycle Case does not use Sentence case or tOGGLE cASE
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.4.5.1 release
Hardware: All All
: medium enhancement
Assignee: Heiko Tietze
URL:
Whiteboard: target:6.1.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: Auto-Correct-Complete
  Show dependency treegraph
 
Reported: 2018-03-09 13:55 UTC by Kruno
Modified: 2018-03-26 12:59 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kruno 2018-03-09 13:55:42 UTC
Description:
In Pootle string for cycling case shows Title Case, UPPERCASE, lowercase but what should be added is 'First word in uppercase' as some languages doesn't use Title Case and thus this feature is not practical for such cases.

Setting version to 6.1 (master) as string happens in Pootle under 'LibreOffice Master'.

Steps to Reproduce:
1. use cycle case

Actual Results:  
No result with only 'First word in uppercase'

Expected Results:
Cycle should have option to do 'First word in uppercase'


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Jacques Guilleron 2018-03-10 14:00:52 UTC
Hi Kruno,

This is a Localised setting. I find it in:
Tools > AutoCorrect > AutoCorrect Options...
Capitalise first letter of every sentence, ticked
Does this help?
Comment 2 Kruno 2018-03-10 18:41:18 UTC
No, it's that's not it - it's not autocorrection.

Write any number of words in all caps, select those words, try SHIFT + F3 to activate cycle case feature. Keep pressing SHIFT + F3.

You get this:

   ALL CAPS
   All Caps
   all caps

but I would expect

   All caps

also as Title Case is not used in some languages and it's logical that Cycle case covers all four possibilities.
Comment 3 Buovjaga 2018-03-11 15:01:51 UTC
UX: any reason to skip these case cases?
Comment 4 V Stuart Foote 2018-03-11 17:50:06 UTC
Seems reasonable. The Cycle case <Shift><F3> control rotates through just 3 ICU Transliteration configurations as initially implemented [1].

Adding a fourth for SentenceCase [2][3] should be possible, and seems appropriate--especially as the uno.ChangeCaseToSentenceCase action is otherwise just available in the Format -> Text menu, but can be added in customize.

The translated Function name "Cycle Case (Title Case, UPPERCASE, lowercase)" wss getting rather long--suggest we remove the parenthetical examples and assign it a tooltip instead?

Caolán, your thoughts on adding an additional Transliteration to the rotation?

=-ref-=
[1] https://opengrok.libreoffice.org/xref/core/unotools/source/i18n/caserotate.cxx

[2] https://opengrok.libreoffice.org/xref/core/svx/sdi/svx.sdi#1050
[3] https://opengrok.libreoffice.org/xref/core/include/i18nutil/transliteration.hxx#62
Comment 5 Caolán McNamara 2018-03-12 14:18:42 UTC
I've no opinion on it.
Comment 6 László Németh 2018-03-12 14:58:33 UTC
It would be really nice to add the sentence capitalization.

(I think, LibreOffice needs also a real title case here or somewhere. This ugly “start case” is only an obsolete poor man's version of the common title cases, see https://en.wikipedia.org/wiki/Letter_case#Headings_and_publication_titles.)
Comment 7 Heiko Tietze 2018-03-19 14:54:47 UTC
No one disagree, so please do it. Qualified easyhack with code pointers in comment 4.
Comment 8 Kruno 2018-03-20 06:37:53 UTC
I guess that only switch statement in caserotate.cxx should be updated?
Comment 9 Heiko Tietze 2018-03-21 09:27:16 UTC
Sentence case is now #2 in the sequence. Didn't add toggle case as there wasn't agreement about it - and the longer the more iterations we have the less useful this command becomes. But could be done easily.

Patch https://gerrit.libreoffice.org/#/c/51696/
Comment 10 Commit Notification 2018-03-26 12:59:52 UTC
heiko tietze committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=84f8e28d092676aad830a9fbae8145a57c6301bc

tdf#116315 - Cycle Case including Sentence case

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.