| Summary: | [Bidi] Support global orientation of report output | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Lina Kemmel <Lina.Kemmel> | ||||||||||||||||||||||
| Component: | BIRT | Assignee: | Liang Yu <yliang> | ||||||||||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||||||||||||||
| Severity: | normal | ||||||||||||||||||||||||
| Priority: | P3 | CC: | clin, fira, foxm, jouyang, khouly, mfadl, rlu, salexb, wenfeng.fwd, whe, wyan | ||||||||||||||||||||||
| Version: | 2.3.0 | Keywords: | plan | ||||||||||||||||||||||
| Target Milestone: | 2.3.0 RC1 | Flags: | wenfeng.fwd:
iplog+
wenfeng.fwd: pmc_approved+ wenfeng.fwd: pmc_approved+ |
||||||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||||||||
| OS: | Windows All | ||||||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||||||
| Bug Depends on: | |||||||||||||||||||||||||
| Bug Blocks: | 223345, 228244 | ||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||
|
Description
Lina Kemmel
Created attachment 95596 [details]
Patch for Viewer
Created attachment 95598 [details]
Patch for HTML emitter
I am unable to verify further patches after CVS update, because of some problem probably related to the preview Viewer servlet mapping. Will try to figure out if this is a known problem and how it can be solved. Created attachment 96157 [details]
Patch for WPML emitter
Created attachment 96159 [details]
Patch for WPML emitter
Created attachment 96282 [details]
Patch for Excel emitter
Created attachment 96299 [details]
Patch for PDF, PPT and POSTSCRIPT emitters
Aims to provide right-to-left table layout through physical mirroring of table element X positions. Also, handles border resolution for RTL tables.
Note that Bidi text reordering changes are out of scope and will be handled in a separate bug later.
Created attachment 96652 [details] Patch for Viewer revised Compared to attachment 95596 [details], includes a change for the example Viewer to rely on design orientation as opposed to the IDE orientation when rendering report. Apologies, this change applies to report output in general, not just example Viewer. The IP review is complete, and this submission is now approved. Please refer to https://dev.eclipse.org/ipzilla/show_bug.cgi?id=2260 As it seems the PDF part of the code base was noticeably refactored, we will need to migrate related changes to the new code base and resubmit attachment 96299 [details].
There wouldn't be significant changes - just relocation of codes.
Has this attachment been reviewed?
add bidi support for excel and word Fixed. Created attachment 99946 [details]
Patch to consolidate naming of Bidi constants and fix PPT presentation
Respect CSS naming convention for direction constants ("ltr"/"rtl"); remove all occurrences of the old values ("Right To Left"/"Left To Right").
Also, eliminate flipping of text being output to PPT.
Patched BIDI messages file change into report.model plug-in. Apply the patch for the engine part. There is a modification in order not to flip text in PPT emitter, I refactor the code as following: 1. Revert the modificatin for ITextArea.getText(boolean) to ITextArea.getText() and also remove the logic in the method related with "dontFlip" 2. Add method ITextArea.getLogicalOrderText() to get unflipped text. 3. Override the method drawTextAt( ITextArea text, int x, int y, int width, int height, TextStyle textStyle ) in PPTRender so that unflipped text will be write to ppt graphic. After refactoring, there is no hard code in PageDeviceRender for ppt. Thank you very much. This looks much nicer. Actually, I initially meant to do the following: 1. Modify TextArea.getText() implementation to always return logical text. 2. Move #flip() to the superclass renderer. 3. Override #flip() of the PPT renderer to return the text as-is. 3. Call both TextArea.getText() and then #flip() from drawTextAt. (That was not done since for some reason I decided that adding a flag will be more consistent with the previous implementation.) Created attachment 101888 [details]
Patch fix for engine
The patch includes the following changes:
- for PDF emitter:
1. Replicated Bidi changes from org/eclipse/birt/report/engine/layout/pdf/cache to org/eclipse/birt/report/engine/layout/pdf/emitter. (Currently the latter seems to be in use. Not sure if we can remove them from the former.)
2. Reworked border resolution for right-to-left table.
3. Defined a new method org.eclipse.birt.report.engine.content.
IContent#isRTL(), which examines the global orientation of report content.
4. Added its implementation in subclasses.
- for parser:
1. Set textAlign default to null in right-to-left direction as well, in StylePropertyMapping.
- for the HTML emitter:
1. Simplify direction property building (assuming no validation is necessary at this point).
Created attachment 103603 [details]
Patch for regression in default text-align in RTL report
Following regression testing results, I attach a small patch to revert the default 'text-align' for RTL reports. Elements supposed to default to 'center' should be still worked.
Comment on attachment 95598 [details]
Patch for HTML emitter
per Ganymede IP log
Comment on attachment 96159 [details]
Patch for WPML emitter
per Ganymede IP log
Comment on attachment 96282 [details]
Patch for Excel emitter
per Ganymede IP log
Comment on attachment 96299 [details]
Patch for PDF, PPT and POSTSCRIPT emitters
per Ganymede IP log
Comment on attachment 96652 [details]
Patch for Viewer revised
per Ganymede IP log
Comment on attachment 99946 [details]
Patch to consolidate naming of Bidi constants and fix PPT presentation
per Ganymede IP log
Comment on attachment 101888 [details]
Patch fix for engine
per Ganymede IP log
Comment on attachment 103603 [details]
Patch for regression in default text-align in RTL report
per Ganymede IP log
Closing |