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 95569 Details for
Bug 225549
Adding Bidi support to XLS emitter
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.
[patch]
BIDI support for xls emitter
Excel2008_04_10.diff (text/plain), 3.92 KB, created by
Mohamed El-Kholy
on 2008-04-10 14:15:41 EDT
(
hide
)
Description:
BIDI support for xls emitter
Filename:
MIME Type:
Creator:
Mohamed El-Kholy
Created:
2008-04-10 14:15:41 EDT
Size:
3.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.birt.report.engine.emitter.prototype.excel >Index: src/org/eclipse/birt/report/engine/emitter/excel/ExcelWriter.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/ExcelWriter.java,v >retrieving revision 1.26 >diff -u -r1.26 ExcelWriter.java >--- src/org/eclipse/birt/report/engine/emitter/excel/ExcelWriter.java 31 Mar 2008 06:42:30 -0000 1.26 >+++ src/org/eclipse/birt/report/engine/emitter/excel/ExcelWriter.java 10 Apr 2008 16:31:07 -0000 >@@ -22,6 +22,9 @@ > public class ExcelWriter > { > >+ private boolean isRTLSheet = false; //bidi_acgc added >+ public static final int rightToLeftisTrue = 1; //bidi_acgc added >+ > private XMLWriterXLS writer = new XMLWriterXLS( ); > > private static HashSet splitChar = new HashSet( ); >@@ -99,6 +102,39 @@ > writer.open( out, encoding ); > } > >+ //bidi_acgc added start >+ //ExcelWriter constructors are overloaded in order to set the isRTLReport parameter. >+ //isRTLReport represents the direction of the excel sheet >+ /** >+ * @author bidi_acgc >+ * @param isRTLSheet: represents the direction of the excel sheet. >+ */ >+ public ExcelWriter( OutputStream out , boolean isRTLSheet) >+ { >+ this.isRTLSheet = isRTLSheet; >+ writer.open( out, "UTF-8" ); >+ } >+ /** >+ * @author bidi_acgc >+ * @param isRTLSheet: represents the direction of the excel sheet. >+ */ >+ public ExcelWriter( OutputStream out , ExcelContext context, boolean isRTLSheet ) >+ { >+ this( out, "UTF-8" , context); >+ this.isRTLSheet = isRTLSheet; >+ } >+ /** >+ * @author bidi_acgc >+ * @param isRTLSheet: represents the direction of the excel sheet. >+ */ >+ public ExcelWriter( OutputStream out, String encoding, ExcelContext context, boolean isRTLSheet ) >+ { >+ this.context = context; >+ this.isRTLSheet = isRTLSheet; >+ writer.open( out, encoding ); >+ } >+ //bidi_acgc added end >+ > // If possible, we can pass a format according the data type > public void writeText( Data d ) > { >@@ -607,6 +643,13 @@ > { > writer.openTag( "Worksheet" ); > writer.attribute( "ss:Name", name ); >+ //bidi_acgc added start >+ // Set the Excel Sheet RightToLeft attribute according to Report >+ //if Report Bidi-Orientation is RTL, then Sheet is RTL. >+ if (isRTLSheet) >+ writer.attribute( "ss:RightToLeft", rightToLeftisTrue ); >+ //else : do nothing i.e. LTR >+ //bidi_acgc added end > } > > public void startSheet( int sheetIndex ) >Index: src/org/eclipse/birt/report/engine/emitter/excel/ExcelEmitter.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/ExcelEmitter.java,v >retrieving revision 1.29 >diff -u -r1.29 ExcelEmitter.java >--- src/org/eclipse/birt/report/engine/emitter/excel/ExcelEmitter.java 7 Apr 2008 06:55:27 -0000 1.29 >+++ src/org/eclipse/birt/report/engine/emitter/excel/ExcelEmitter.java 10 Apr 2008 16:30:55 -0000 >@@ -276,8 +276,18 @@ > { > //Make sure the engine already calculates all data. > engine.complete(); >- >- ExcelWriter writer = new ExcelWriter( out , context); >+ //bidi_acgc added start >+ // Get the Report bidi Orientation property to be used for setting the >+ // excel sheet Orientation. >+ boolean isRTLSheet = false; >+ String reportOrientation = report.getDesign( ).getReportDesign( ) >+ .getBidiOrientation( ); >+ if ( "Right To Left".equalsIgnoreCase( reportOrientation ) ) >+ isRTLSheet = true; >+ ExcelWriter writer = new ExcelWriter( out, context,isRTLSheet ); >+ >+ //ExcelWriter writer = new ExcelWriter( out , context); //bidi_acgc commented >+ //bidi_acgc added end > writer.writeDeclarations( ); > writer.declareStyles( engine.getStyleMap( ) ); > writer.defineNames( engine.getNamesRefer( ) );
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
Flags:
bjorn.freeman-benson
:
iplog+
khouly
:
review?
Actions:
View
|
Diff
Attachments on
bug 225549
: 95569