Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 222629 Details for
Bug 274567
[Palette] BIDI3.5:Wrong shaping for digits in Customize Palette dialog and in Logic editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
bidi processor patch
bidiprocessor.txt (text/plain), 1.82 KB, created by
Yehia Abo Sedera
on 2012-10-22 06:46:54 EDT
(
hide
)
Description:
bidi processor patch
Filename:
MIME Type:
Creator:
Yehia Abo Sedera
Created:
2012-10-22 06:46:54 EDT
Size:
1.82 KB
patch
obsolete
>diff --git a/org.eclipse.draw2d/src/org/eclipse/draw2d/text/BidiProcessor.java b/org.eclipse.draw2d/src/org/eclipse/draw2d/text/BidiProcessor.java >index 801bc6f..a6b21ca 100644 >--- a/org.eclipse.draw2d/src/org/eclipse/draw2d/text/BidiProcessor.java >+++ b/org.eclipse.draw2d/src/org/eclipse/draw2d/text/BidiProcessor.java >@@ -14,6 +14,7 @@ > > import java.util.ArrayList; > import java.util.List; >+import java.util.Locale; > > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.TextLayout; >@@ -117,6 +118,7 @@ > BidiEntry prevEntry = null, entry = null; > BidiInfo prevInfo = null, info = null; > int end = 2, start = 0; >+ > for (int i = 0; i < list.size(); i++) { > entry = (BidiEntry) list.get(i); > info = new BidiInfo(); >@@ -199,7 +201,6 @@ > return; > char[] chars = new char[bidiText.length()]; > bidiText.getChars(0, bidiText.length(), chars, 0); >- > if (orientation != SWT.RIGHT_TO_LEFT > && !Bidi.requiresBidi(chars, 0, chars.length - 1)) > return; >@@ -210,8 +211,20 @@ > layout.setOrientation(orientation); > layout.setText(bidiText.toString()); > int j = 0, offset, prevLevel = -1; >+ > for (offset = 0; offset < chars.length; offset++) { > int newLevel = layout.getLevel(offset); >+ // Added to fix bug Bug 274567 >+ if (Locale.getDefault().toString().toLowerCase() >+ .contains("ar_") >+ && Character.isDigit(chars[offset]) >+ && newLevel == Bidi.MIXED >+ && (((orientation == SWT.LEFT_TO_RIGHT)) || (orientation == SWT.RIGHT_TO_LEFT && (Character >+ .getDirectionality(chars[offset]) != Character.DIRECTIONALITY_LEFT_TO_RIGHT && (prevLevel == Bidi.RTL || prevLevel == 6))))) { >+ newLevel = prevLevel == Bidi.RTL ? Character.DIRECTIONALITY_ARABIC_NUMBER >+ : prevLevel; >+ } >+ > if (newLevel != prevLevel) { > if (j + 3 > levels.length) { > int temp[] = levels;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 274567
:
133993
|
192295
|
201482
|
207645
|
207646
|
222628
| 222629