[PATCH 2/2] Smarter auto-complete capitalization (#i22961#) and i18n handling

Brad Sowden code at sowden.org
Mon Jun 4 05:03:56 PDT 2012


Hi,

This patch implements the following:

(1) Completes a TODO in the code related to i18n handling of month and 
day names with auto-completion. Previously, when non-ASCII names were 
added to the auto-complete word list these had to be an exact 
case-sensitive match of the word to be auto-completed. This patch allows 
a case-insensitive match for non-ASCII names when deciding what names to 
add to the auto-complete list.

(2) Smarter auto-complete capitalization as described in OpenOffice bug 
22961. If a word is in sentence case then the auto-completed word should 
be in the same case i.e. if the auto-complete list contains the word 
"LIBRE" then "Lib" should auto-complete to "Libre" rather
than "LibRE".

https://issues.apache.org/ooo/show_bug.cgi?id=22961

* The algorithm simply looks at the first character in the word to 
decide whether a word is sentence case.
* I've put a TODO in the code as SwAutoCompleteWord::GetRange() only 
performs an ASCII case-insensitive match (existing limitation).
* Sidenote - Initially I tried using CharClass::titlecase() but 
discovered this doesn't actually work. There appears to be an issue with 
class cclass_Unicode where "trans" is only ever set to 
"Transliteration_casemapping" and there is no mechanism to set it to 
"Transliteration_titlecase".

- make + make dev-install successful
- functionality tested ok
- licence statement on file

Cheers,
Brad



More information about the LibreOffice mailing list