Apache OpenOffice (AOO) Bugzilla – Issue 22961
AutoComplete unable to differentiate between Capital Letters and Small Letters.
Last modified: 2013-08-07 14:44:35 UTC
If AutoComplete first included the word 'COMPLETION' into its list, the next time when one type 'complet' OOo will suggset 'completION' and vice versa. This is extremely ackward and greatly limiting this function's usability.
reassigned to bh
*** Issue 22961 has been confirmed by votes. ***
*** Issue 35219 has been marked as a duplicate of this issue. ***
Created attachment 28914 [details] proposed patch
The above patch tries to address the issue, where a dictionary word COMPLETION; if typed as "complet" will show as complet'ion'.
Jayant, If I understand your code correctly (maybe not..) you're checking the case of all of the partially typed word, right? That will fail in the case of "Completion" (like at the start of a sentence). You could check the last _letter_ of the partially typed word (see my suggestion B in issue 35219), or add a third test to see if the word is "sentence case" (first letter uppercase, rest lower).
ezza, yes the code looks at the partially typed word. I agree to your suggestion but then the algorithm would be too complex (my assumption). Assume that I add to dictionary, a case-complex word like "OpenSuSe" etc and then try to do an autocomplete. The current patch is just one level of "improvement", which tries to respect the case of the word typed till now. In my local sources, I did experiment with modifying the remaining word to Upper or lower case (toggle) using "KEY_PAGEUP | KEY_SHIFT". If I submit that as a patch will that help ?
Jayant, I thought of those complex words like "OpenSuSe" also (after submit.. :). OK, try the following logic, I think this covers most cases: (lets call the partially typed word "pword" ) IF pword is all lower case OR is first letter uppercase and rest lowercase THEN lowercase the additon ELSE IF pword is all uppercase THEN uppercase the addition ELSE <use the addition as it appears in the dictionary without modification> END IF The last case covers those strange words with odd case. I agree there is no perfect solution, and people will just have to live with that. The only other alternative I could think of is comparing what you've typed to see if it is a case match against the dictionary - if it's the same, then don't change the rest of the word, otherwise alter it to what it looks like you're typing. I don't think there is advantage in adding keyboard modifiers to the addition, that's making things too complicated (and then you have more documentation/help files to maintain).
*** Issue 32826 has been marked as a duplicate of this issue. ***
*** Issue 60934 has been marked as a duplicate of this issue. ***
So changing type to patch, changing target (optimistically), and reporting vs. 2.0.2 where the problem persists.
Assigning to bh doesn't make sense. It is a patch and it fixes the problem. The problem is pretty simple...
Reassigned to SBA.
SBA-OS: Please proceed.
The patch needs a little improvement to be UNICODE save. Then it should do the trick.
While improving the patch for UNICODE, please make one other minor modification - make bStr the partially typed word minus the first letter. This way it will transparently handle Sentence Case Words. Thanks :)
*** Issue 69709 has been marked as a duplicate of this issue. ***
Sorry, I forgot to reassign. The conversion to ByteString and the check for lower/upper case in ASCII will fail for all languages that don't use these characters (Russian, Asian languages, ...)
chengwee, can you please proceed the OS comment that the patch need to improve for Unicode too. Thanks
Hi utomo99 I am not a developer, just a plain joe who uses OOo since SO5. Please re-assign your request to a developer, thanks.
Jayant, can you please proceed the OS comment: The patch needs a little improvement to be UNICODE save. Then it should do the trick. Thanks ------------------------------------------------- Sorry for my previous comments which is wrong.
As no activity is visible here: should we close the issue?
I am a bit dismayed by this thread of half-hearted attempts at fixing this particular issue. All this time, and all these re-assigments of duties, missed targets for resolving, etc. I have been waiting since 2.0.0 or earlier for this to be resolved. To me, it is the one issue that if fixed will solidify my use of OO instead of MW Word. It just does not seem like that hard of a problem to solve. If someone can point me to the section of code where the fix needs to be made, I will at least code the fix for myself.
The attched patch should point you to the code. According to OS it goes into the right direction but needs some fixes for complete UniCode compliance.
@jayant_madavi: are you still working on this one? @mikeeberhart: do you think that enough information was provided to work on an improved patch?
Additional hints: instead of using the upper/lowerAscii functions in class ByteString you should use the CharClass class in the unotools module. It is constructed with a com::sun::star::lang::Locale and has upper/lower functions working also for non-ascii characters. I think that the Locale should be taken from the language attribute at the current cursor position.
In case nobody is working on the patch I will soon change the type to "ENHANCEMENT". Would be nice to hear if something is going on.
Done as proposed
following release status meeting -> target 3.x
*** Issue 115278 has been marked as a duplicate of this issue. ***
Hi all, I'm the author of http://www.openoffice.org/issues/show_bug.cgi?id=115278 which has been marked as a duplicate of this bug. Word completion needs the option of "Ignore words in ALL CAPS" which would greatly increase its usability. Since "Ignore ALL CAPS" already exists in spell check, how difficult would it be to implement here? I also note that this bug/feature request has been pending for 7 years with a milestone of 3.x. We are now 7 years down the road at version 3.2. Any estimate on when this might be added? Thanks.
The suggested patch was applied as revision 1334982. I enhanced it to handle non-ASCII text in rev 1334984.
With rev 1335043 it was further enhanced to handle the calendar provided autocompletion suggestions.
Does This Handle Sentence Case Words Like These, Like You Type At The Beginning Of Every Sentence Or When You Are Typing Somebodies Name Or A Place Name Like Australia? (I don't think it does, but my C is rusty). See my comment 16 - if you test against the partially typed word excluding the first letter, it will transparently handle "Sentence Case" correctly. eg if you are typing "Completion", it would test against "ompl" rather than "Compl". Alternatively you can just test against the last letter typed which will also work. Thanks..
getting rid of value "enhancement" for field "severity". For enhancement the field "issue type" shall be used.
Verified it on Aoo_Trunk_20120616.1800.1350879 and it does not reproduce, so close it as fixed.