Issue 22961 - AutoComplete unable to differentiate between Capital Letters and Small Letters.
Summary: AutoComplete unable to differentiate between Capital Letters and Small Letters.
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.2
Hardware: Other Other OS
: P3 Normal with 13 votes (vote)
Target Milestone: ---
Assignee: einstienindia
QA Contact: issues@sw
URL:
Keywords: oooqa, usability
: 32826 35219 60934 69709 115278 (view as issue list)
Depends on:
Blocks: 2838
  Show dependency tree
 
Reported: 2003-11-28 06:56 UTC by chengwee
Modified: 2013-08-07 14:44 UTC (History)
14 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
proposed patch (549 bytes, text/plain)
2005-08-19 05:04 UTC, einstienindia
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description chengwee 2003-11-28 06:56:10 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.
Comment 1 mci 2003-12-15 11:26:04 UTC
reassigned to bh
Comment 2 stuartprescott 2005-01-12 02:56:48 UTC
*** Issue 22961 has been confirmed by votes. ***
Comment 3 lohmaier 2005-06-23 05:21:13 UTC
*** Issue 35219 has been marked as a duplicate of this issue. ***
Comment 4 einstienindia 2005-08-19 05:04:39 UTC
Created attachment 28914 [details]
proposed patch
Comment 5 einstienindia 2005-08-19 05:08:35 UTC
The above patch tries to address the issue, where a dictionary word COMPLETION; 
if typed as "complet" will show as complet'ion'.
Comment 6 ezza 2005-08-19 05:28:50 UTC
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).
Comment 7 einstienindia 2005-08-19 05:47:22 UTC
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 ? 
Comment 8 ezza 2005-08-19 06:32:23 UTC
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).
Comment 9 stp 2005-08-30 16:40:45 UTC
*** Issue 32826 has been marked as a duplicate of this issue. ***
Comment 10 lars 2006-01-21 15:51:13 UTC
*** Issue 60934 has been marked as a duplicate of this issue. ***
Comment 11 mmeeks 2006-03-31 10:14:57 UTC
So changing type to patch, changing target (optimistically), and reporting vs.
2.0.2 where the problem persists.
Comment 12 pavel 2006-05-04 06:43:07 UTC
Assigning to bh doesn't make sense. It is a patch and it fixes the problem. The
problem is pretty simple...
Comment 13 michael.ruess 2006-05-04 07:38:35 UTC
Reassigned to SBA.
Comment 14 stefan.baltzer 2006-05-10 16:46:56 UTC
SBA-OS: Please proceed.
Comment 15 Oliver Specht 2006-05-11 08:07:55 UTC
The patch needs a little improvement to be UNICODE save. Then it should do the
trick.

Comment 16 ezza 2006-05-11 14:55:13 UTC
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 :)
Comment 17 ace_dent 2006-09-21 07:22:36 UTC
*** Issue 69709 has been marked as a duplicate of this issue. ***
Comment 18 Oliver Specht 2006-10-23 08:33:55 UTC
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, ...)
Comment 19 utomo99 2006-11-19 09:19:26 UTC
chengwee, can you please proceed the OS comment that the patch need to improve
for Unicode too. 
Thanks
Comment 20 chengwee 2006-11-20 10:28:44 UTC
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.
Comment 21 utomo99 2006-11-20 10:57:15 UTC
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. 
Comment 22 Mathias_Bauer 2007-01-16 13:49:04 UTC
As no activity is visible here: should we close the issue?
Comment 23 mikeeberhart 2007-01-16 21:18:30 UTC
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.
Comment 24 Mathias_Bauer 2007-02-01 10:08:15 UTC
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.
Comment 25 Mathias_Bauer 2007-05-14 19:16:25 UTC
@jayant_madavi: are you still working on this one?
@mikeeberhart: do you think that enough information was provided to work on an
improved patch?
Comment 26 Mathias_Bauer 2007-05-15 14:18:11 UTC
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.
Comment 27 Mathias_Bauer 2007-06-06 11:35:36 UTC
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.
Comment 28 Mathias_Bauer 2007-06-27 11:40:00 UTC
Done as proposed
Comment 29 Mathias_Bauer 2007-12-04 12:36:57 UTC
following release status meeting -> target 3.x
Comment 30 eric.savary 2010-10-28 04:23:23 UTC
*** Issue 115278 has been marked as a duplicate of this issue. ***
Comment 31 drankinatty 2010-10-28 05:36:24 UTC
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.
Comment 32 hdu@apache.org 2012-05-07 12:52:14 UTC
The suggested patch was applied as revision 1334982.
I enhanced it to handle non-ASCII text in rev 1334984.
Comment 33 hdu@apache.org 2012-05-07 14:45:22 UTC
With rev 1335043 it was further enhanced to handle the calendar provided autocompletion suggestions.
Comment 34 ezza 2012-05-08 00:48:03 UTC
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..
Comment 35 Oliver-Rainer Wittmann 2012-06-13 12:22:39 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.
Comment 36 binguo 2012-06-18 09:44:08 UTC
Verified it on Aoo_Trunk_20120616.1800.1350879 and it does not reproduce, so close it as fixed.