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 95144 Details for
Bug 225540
Add BIDI support to BIRT charts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
New one based on previous patch
patchRTL.txt (text/plain), 6.70 KB, created by
Yulin Wang
on 2008-04-07 23:08:51 EDT
(
hide
)
Description:
New one based on previous patch
Filename:
MIME Type:
Creator:
Yulin Wang
Created:
2008-04-07 23:08:51 EDT
Size:
6.70 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.birt.chart.engine >Index: src/org/eclipse/birt/chart/render/BaseRenderer.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/BaseRenderer.java,v >retrieving revision 1.105 >diff -u -r1.105 BaseRenderer.java >--- src/org/eclipse/birt/chart/render/BaseRenderer.java 20 Feb 2008 10:17:43 -0000 1.105 >+++ src/org/eclipse/birt/chart/render/BaseRenderer.java 8 Apr 2008 02:56:34 -0000 >@@ -1521,6 +1521,12 @@ > tre.setBlockAlignment( ta ); > tre.setLabel( lgTitle ); > tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); >+ //bidi_acgc added start >+ if ( rtc.isRightToLeft( ) ) >+ { >+ tre.setRtlCaption( ); >+ } >+ //bidi_acgc added end > ipr.drawText( tre ); > } > } >@@ -1743,6 +1749,12 @@ > { > tre.setLabel( la ); > tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); >+ //bidi_acgc added start >+ if ( rtc.isRightToLeft( ) ) >+ { >+ tre.setRtlCaption( ); >+ } >+ //bidi_acgc added end > ipr.drawText( tre ); > } > >@@ -1762,6 +1774,12 @@ > + 1, dValueWidth - 2, dExtraHeight - 1 ) ); > tre.setLabel( tmpLa ); > tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); >+ //bidi_acgc added start >+ if ( rtc.isRightToLeft( ) ) >+ { >+ tre.setRtlCaption( ); >+ } >+ //bidi_acgc added end > ipr.drawText( tre ); > } > >@@ -2136,11 +2154,22 @@ > final LabelBlock lb = (LabelBlock) b; > final TextRenderEvent tre = (TextRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource, > TextRenderEvent.class ); >- >+ //bidi_acgc added start >+ if ( rtc.isRightToLeft( ) ) >+ { >+ tre.setRtlCaption( ); >+ } >+ //bidi_acgc added end > // need backup original non-externalized value. > final String sRestoreValue = tre.updateFrom( lb, dScale, rtc ); > if ( lb.getLabel( ).isVisible( ) ) > { >+ //bidi_acgc added start >+ if ( rtc.isRightToLeft( ) ) >+ { >+ tre.setRtlCaption( ); >+ } >+ //bidi_acgc added end > ipr.drawText( tre ); > } > lb.getLabel( ).getCaption( ).setValue( sRestoreValue ); >Index: src/org/eclipse/birt/chart/render/AxesRenderHelper.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/AxesRenderHelper.java,v >retrieving revision 1.24 >diff -u -r1.24 AxesRenderHelper.java >--- src/org/eclipse/birt/chart/render/AxesRenderHelper.java 14 Mar 2008 09:54:49 -0000 1.24 >+++ src/org/eclipse/birt/chart/render/AxesRenderHelper.java 8 Apr 2008 02:56:33 -0000 >@@ -809,6 +809,12 @@ > tre.setTextPosition( iLabelLocation ); > } > } >+ //bidi_acgc added start >+ if ( this.renderer.rtc.isRightToLeft( ) ) >+ { >+ tre.setRtlCaption( ); >+ } >+ //bidi_acgc added end > ipr.drawText( tre ); > } > } >@@ -1017,6 +1023,12 @@ > tre.setTextPosition( iLabelLocation ); > } > } >+ //bidi_acgc added start >+ if ( this.renderer.rtc.isRightToLeft( ) ) >+ { >+ tre.setRtlCaption( ); >+ } >+ //bidi_acgc added end > ipr.drawText( tre ); > } > } >@@ -1621,6 +1633,12 @@ > tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); > if ( ax.getTitle( ).isVisible( ) ) > { >+ //bidi_acgc added start >+ if ( this.renderer.rtc.isRightToLeft( ) ) >+ { >+ tre.setRtlCaption( ); >+ } >+ //bidi_acgc added end > ipr.drawText( tre ); > } > } >@@ -2058,6 +2076,12 @@ > .getAlignment( ) ) ); > } > tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); >+ //bidi_acgc added start >+ if ( this.renderer.rtc.isRightToLeft( ) ) >+ { >+ tre.setRtlCaption( ); >+ } >+ //bidi_acgc added end > ipr.drawText( tre ); > } > } >Index: src/org/eclipse/birt/chart/event/TextRenderEvent.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/event/TextRenderEvent.java,v >retrieving revision 1.13 >diff -u -r1.13 TextRenderEvent.java >--- src/org/eclipse/birt/chart/event/TextRenderEvent.java 8 Sep 2006 07:02:59 -0000 1.13 >+++ src/org/eclipse/birt/chart/event/TextRenderEvent.java 8 Apr 2008 02:56:32 -0000 >@@ -21,6 +21,7 @@ > import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl; > import org.eclipse.birt.chart.model.attribute.impl.LocationImpl; > import org.eclipse.birt.chart.model.attribute.impl.TextAlignmentImpl; >+import org.eclipse.birt.chart.model.attribute.Text;// bidi_acgc added > import org.eclipse.birt.chart.model.component.Label; > import org.eclipse.birt.chart.model.component.impl.LabelImpl; > import org.eclipse.birt.chart.model.layout.LabelBlock; >@@ -119,7 +120,24 @@ > { > _boBlock = boBlock; > } >- >+ //bidi_acgc added start >+ /** >+ * Adds the "RLE" and "PDF" unicode control characters to label caption where "RLE" is added to the beginning and "PDF" to the end >+ * to apply right to left reading order >+ */ >+ public final void setRtlCaption() >+ { >+ Label lbl = this.getLabel(); >+ if (lbl != null) >+ { >+ Text txt = lbl.getCaption(); >+ String val = txt.getValue(); >+ if (val.length() > 0) >+ if ('\u202b' != val.charAt(0)) >+ txt.setValue( '\u202b' + val + '\u202c'); >+ } >+ } >+ //bidi_acgc added end > /** > * @return Returns the block bounds of the text. > */ >Index: src/org/eclipse/birt/chart/factory/RunTimeContext.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/factory/RunTimeContext.java,v >retrieving revision 1.26 >diff -u -r1.26 RunTimeContext.java >--- src/org/eclipse/birt/chart/factory/RunTimeContext.java 28 Feb 2008 09:47:33 -0000 1.26 >+++ src/org/eclipse/birt/chart/factory/RunTimeContext.java 8 Apr 2008 02:56:32 -0000 >@@ -25,7 +25,6 @@ > import org.eclipse.birt.chart.script.IChartScriptContext; > import org.eclipse.birt.chart.script.IScriptClassLoader; > import org.eclipse.birt.chart.script.ScriptHandler; >-import org.eclipse.birt.chart.util.ChartUtil; > import org.eclipse.birt.core.i18n.ResourceHandle; > > import com.ibm.icu.util.ULocale; >@@ -374,10 +373,13 @@ > */ > public boolean isRightToLeft( ) > { >- if ( iRightToLeft == -1 ) >+ // Report direction does no longer depend on Locale, and so the code below is commented out. >+ //bidi_acgc deleted start >+ /*if ( iRightToLeft == -1 ) > { > iRightToLeft = ChartUtil.isRightToLeftLocale( lcl ) ? 1 : 0; >- } >+ }*/ >+ //bidi_acgc deleted end > return iRightToLeft == 1; > } >
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 Raw
Flags:
bjorn.freeman-benson
:
iplog+
Actions:
View
Attachments on
bug 225540
:
94788
| 95144 |
95287
|
95756