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 222628 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]
text flow patch
textflow.txt (text/plain), 2.08 KB, created by
Yehia Abo Sedera
on 2012-10-22 06:46:20 EDT
(
hide
)
Description:
text flow patch
Filename:
MIME Type:
Creator:
Yehia Abo Sedera
Created:
2012-10-22 06:46:20 EDT
Size:
2.08 KB
patch
obsolete
>diff --git a/org.eclipse.draw2d/src/org/eclipse/draw2d/text/TextFlow.java b/org.eclipse.draw2d/src/org/eclipse/draw2d/text/TextFlow.java >index a0415fd..aac9294 100644 >--- a/org.eclipse.draw2d/src/org/eclipse/draw2d/text/TextFlow.java >+++ b/org.eclipse.draw2d/src/org/eclipse/draw2d/text/TextFlow.java >@@ -11,6 +11,7 @@ > package org.eclipse.draw2d.text; > > import java.util.List; >+import java.util.Locale; > > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.Color; >@@ -223,14 +224,32 @@ > return getText().substring(box.offset, box.offset + box.length); > > StringBuffer buffer = new StringBuffer(box.length + 3); >- buffer.append(box.isRightToLeft() ? BidiChars.RLO : BidiChars.LRO); >+ // Added to fix bug Bug 274567 >+ // flag for Arabic numbers >+ boolean isAN = false; >+ String overridingChar = ""; //$NON-NLS-1$ >+ if (Locale.getDefault().toString().toLowerCase().contains("ar_") >+ && box.getBidiLevel() == Character.DIRECTIONALITY_ARABIC_NUMBER) { >+ // set the bidi level to any odd number so numbers are rendered as >+ // hindic shapes >+ box.setBidiLevel(Character.DIRECTIONALITY_ARABIC_NUMBER + 1); >+ isAN = true; >+ } >+ // Store the preceding character to be concatenated with the resulting >+ // string >+ overridingChar += (box.isRightToLeft() ? BidiChars.RLO : BidiChars.LRO); > if (index == 0 && bidiInfo.leadingJoiner) > buffer.append(BidiChars.ZWJ); > buffer.append(getText().substring(box.offset, box.offset + box.length)); > if (index == getFragmentsWithoutBorder().size() - 1 > && bidiInfo.trailingJoiner) > buffer.append(BidiChars.ZWJ); >- return buffer.toString(); >+ if (isAN) { >+ // in Arabic number need to reverse the returned string >+ return buffer.reverse().insert(0, overridingChar).toString(); >+ } >+ >+ return buffer.insert(0, overridingChar).toString(); > } > > /** >@@ -574,6 +593,9 @@ > if (frag.isTruncated()) > draw += ELLIPSIS; > >+ revalidateBidi(this); // to enforce evaluation every time the text >+ // is painted >+ > if (!isEnabled()) { > Color fgColor = g.getForegroundColor(); > g.setForegroundColor(ColorConstants.buttonLightest);
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