Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 185957

Summary: Bidi3.3: Adding new attribute for changing report layout orientation
Product: z_Archived Reporter: Ahmed Farrag <afarrag>
Component: BIRTAssignee: Wenbin He <whe>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: clin, foxm, khouly, kitlo, Lina.Kemmel, mfadl, qwang, steven.wasleski, wenfeng.fwd, whe
Version: 2.2.0Keywords: plan
Target Milestone: 2.3.1   
Hardware: PC   
OS: All   
Whiteboard:

Description Ahmed Farrag CLA 2007-05-08 10:52:16 EDT
A new attribute should be added (while designing the report layout) to allow users to change the orientation of the report(RTL or LTR).

N.B:
This should be aplicable for the Report as a whole and for a single layout component (e.g. tables, charts,...)
Comment 1 Wenfeng Li CLA 2007-05-08 18:22:16 EDT
When a report or report item is set to RTL, do we expect the report is layout RTL even when the report viewing end user is in a LTR locale?
Comment 2 Ahmed Farrag CLA 2007-05-14 04:00:33 EDT
(In reply to comment #1)
> When a report or report item is set to RTL, do we expect the report is layout
> RTL even when the report viewing end user is in a LTR locale?
> 

Apologies for the late reply. The answer to your question is yes, in analogy to "HTML" pages that can be viewed in RTL (when "dir" attribute is set to RTL) even if end users are running their OS on LTR locale.
Comment 3 Wenfeng Li CLA 2008-06-09 19:34:16 EDT
Has this been added as part of the new RTL feature in 2.3.x?
Comment 4 Lina Kemmel CLA 2008-07-21 08:13:20 EDT
This is now supported to a considerable extent. The new RTL feature provides:
(1) orientation of the whole report,
(2) text direction (a.k.a "reading order") of report element.

However, the requested feature also implies:
(3) orientation at report element level, equivalent to the HTML "dir" attribute 
    / CSS "direction" property. Actually, this is a superset of (2), and 
    includes both direction of text and direction of graphics.

I think in order to add the missing functionality, we can either:
(a) Associate "Bidi layout orientation" property with a design element instead 
    of report design as at present, and make it inheritable. Rename it to just 
    'direction'
(b) Introduce a new style property that will express report element orientation
(c) Change semantics of the existing "Bidi text direction" property to work like
    'dir'/'direction' in HTML/CSS. Also, rename it to just 'direction'.

I think (c) is preferable. Not (a) because ReportDesign ROM element doesn't accept styles, and introducing some pseudo-style property would probably be somewhat tricky. It's also not (b) because having 2 Bidi styles, one of which is a subset of the other sounds a bit redundant (although there are precedents, e.g. in win32 API).
Comment 5 Wenfeng Li CLA 2008-07-21 13:19:16 EDT
+1 for (c), but we will need to defer the change to 2.5.0 since we can not change the semantic or name of an existing property in a point release.
Comment 6 Lina Kemmel CLA 2008-07-31 12:57:26 EDT
The features developed already provide the most critical RTL functionality.

Implication of the missing feature is mostly a table with a mismatching orientation (i.e. with columns ordered from right to left inside an LTR document or columns ordered from left to right in an RTL document).

I think deferring this enhancement to 2.5.0 will not have too serious impact on users.
Comment 7 Lina Kemmel CLA 2008-08-03 14:51:10 EDT
However, following user feedbacks, I suggest to add one associated change to 2.3.1. That is linking text alignment with text direction, but not with the global orientation as at present. The change will leave the semantics and name of the property intact, and it requires pretty minor code modifications.
And, as it turned out, by doing it we will provide behavior that matches user expectations. 
Comment 8 Wenfeng Li CLA 2008-08-03 23:16:11 EDT
(In reply to comment #7)
> However, following user feedbacks, I suggest to add one associated change to
> 2.3.1. That is linking text alignment with text direction, but not with the
> global orientation as at present. The change will leave the semantics and name
> of the property intact, and it requires pretty minor code modifications.
> And, as it turned out, by doing it we will provide behavior that matches user
> expectations. 

+1 for this enh.
Comment 9 Lina Kemmel CLA 2008-08-11 13:51:35 EDT
(In reply to comment #8)
Thank you, Wenfeng. I will submit proposed changes for text alignment shortly, after their unit test is complete.
Comment 10 Lina Kemmel CLA 2008-08-17 13:32:48 EDT
I filed bug 244375 (Report engine) and bug 244376 (Report designer) to track the alignment changes.
Comment 11 Wenbin He CLA 2008-08-26 21:05:32 EDT
Original requirement has been supported in the latest BIRT 2.3.1.
Comment 12 Ahmed Farrag CLA 2009-07-09 03:55:13 EDT
bug fixed, closing....