created an attachment (id=170619)
report design

description:
  set report direction to rtl, grid border was messed while previewing report in pdf.

step to reproduce:

1. use the report attached
2. preview it in pdf

expect result:
the border display as report design.

actual result:
the border was totally messed.
created an attachment (id=170724)
patch

the main problem was that rowarea#reordercellsforrtl() manipulated cell as distinct elements, however, there can be dummy duplicate cells.
i also moved the logic to add/update( abstractarea ) obtaining original x position not from the cell element itself but from the tablelayoutinfo.

another problem was that in presence of colspan, column id used to be "flipped" although there is no need to do so as tablelayoutinfo is no longer storing mirrored x positions.

in addition, i hope that tablelayout#getleftcellcontentstyle issue of the next cell not yet being initialized in rtl (marked with "fixme") was fixed. instead, for each cell area tablelayout#resolveborderconflict calculates left border as usual. however, this border stands for the left border of the logically preceding (= visually next) cell and the right border for the current cell.
(in reply to comment #1)

> in addition, i hope that tablelayout#getleftcellcontentstyle issue of the next
> cell not yet being initialized in rtl (marked with "fixme") was fixed. 
> instead, for each cell area tablelayout#resolveborderconflict calculates left 
> border as usual. however, this border stands for the left border of the 
> logically preceding (= visually next) cell and the right border for the 
> current cell.

actually, this happens not really for "each cell area" but only for cells that satisfy the appropriate criteria .. i.e. 
if ( columnid > startcol && ( leftcellcontentstyle != null || cellcontentstyle != null ) )
where 'leftcellcontentstyle' belongs to the logically previous cell (in other words, it's "leadcellcontentstyle").
the patch is applied.
build <2.6.0.v20100607-0630>
closed