Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 118431 - BIDI: Clickable area is wrong for Link (comctl32.dll < 6.0), split by bidi reordering.
Summary: BIDI: Clickable area is wrong for Link (comctl32.dll < 6.0), split by bidi re...
Status: RESOLVED DUPLICATE of bug 102584
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-29 10:28 EST by Semion Chichelnitsky CLA
Modified: 2005-11-29 11:58 EST (History)
2 users (show)

See Also:


Attachments
Link and bidi markers. (5.82 KB, image/gif)
2005-11-29 10:32 EST, Semion Chichelnitsky CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Semion Chichelnitsky CLA 2005-11-29 10:28:44 EST
Contents of clickable area of Link (when version of comctl32.dll < 6) can be split by reordering. Using bidi markers can help to solve this problem:
...
int parseMnemonics (char[] buffer, int start, int end, StringBuffer result) {
	int mnemonic = -1, index = start;
	if (OS.COMCTL32_MAJOR < 6) {                  //bidi start
	   if ((getStyle() & SWT.RIGHT_TO_LEFT)!= 0)
		   result.append('\u202b');  //RLE
	   else
		   result.append('\u202a');  //LRE
	}                                             //bidi end 
	while (index < end) {
		if (buffer [index] == '&') {
			if (index + 1 < end && buffer [index + 1] == '&') {
				result.append (buffer [index]);
				index++;
			} else {
				mnemonic = result.length();
			}
		} else {
			result.append (buffer [index]);
		}
		index++;
	}
	if (OS.COMCTL32_MAJOR < 6)
	   result.append('\u202c');  //PDF             //bidi
	return mnemonic;
}
...
Comment 1 Semion Chichelnitsky CLA 2005-11-29 10:32:18 EST
Created attachment 30774 [details]
Link and bidi markers.
Comment 2 Felipe Heidrich CLA 2005-11-29 11:21:30 EST
Semion, this problem is not the same as Bug 102584 ?
Comment 3 Semion Chichelnitsky CLA 2005-11-29 11:31:15 EST
Yes, it is the same bug - my name is in CC there, and in spite of this I didn't notice it...  
Comment 4 Billy Biggs CLA 2005-11-29 11:58:47 EST

*** This bug has been marked as a duplicate of 102584 ***