|
Lines 72-77
Link Here
|
| 72 |
this.layoutInfo = layoutInfo; |
72 |
this.layoutInfo = layoutInfo; |
| 73 |
this.startCol = startCol; |
73 |
this.startCol = startCol; |
| 74 |
this.endCol = endCol; |
74 |
this.endCol = endCol; |
|
|
75 |
if ( tableContent != null ) |
| 76 |
bcr.setRTL( tableContent.isRTL( ) ); |
| 75 |
} |
77 |
} |
| 76 |
|
78 |
|
| 77 |
public void initTableLayout(UnresolvedRowHint hint) |
79 |
public void initTableLayout(UnresolvedRowHint hint) |
|
Lines 211-221
Link Here
|
| 211 |
IStyle leftCellContentStyle = null; |
213 |
IStyle leftCellContentStyle = null; |
| 212 |
IStyle topCellStyle = null; |
214 |
IStyle topCellStyle = null; |
| 213 |
|
215 |
|
| 214 |
// bidi_hcg start |
|
|
| 215 |
boolean rtl = tableContent.getReportContent( ).getDesign( ) |
| 216 |
.getReportDesign( ).isDirectionRTL( ); |
| 217 |
// bidi_hcg end |
| 218 |
|
| 219 |
Row lastRow = null; |
216 |
Row lastRow = null; |
| 220 |
if(rows.size( )>0 ) |
217 |
if(rows.size( )>0 ) |
| 221 |
{ |
218 |
{ |
|
Lines 251-289
Link Here
|
| 251 |
// resolve left border |
248 |
// resolve left border |
| 252 |
if ( columnID == startCol ) |
249 |
if ( columnID == startCol ) |
| 253 |
{ |
250 |
{ |
| 254 |
// bidi_hcg start |
251 |
bcr.resolveTableLeftBorder( tableStyle, rowStyle, columnStyle, |
| 255 |
if ( rtl ) |
252 |
cellContentStyle, cellAreaStyle ); |
| 256 |
{ |
|
|
| 257 |
bcr.resolveTableRightBorder( tableStyle, rowStyle, |
| 258 |
columnStyle, cellContentStyle, cellAreaStyle ); |
| 259 |
bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, |
| 260 |
leftCellContentStyle, cellContentStyle, |
| 261 |
cellAreaStyle ); |
| 262 |
} |
| 263 |
else |
| 264 |
// bidi_hcg end |
| 265 |
bcr.resolveTableLeftBorder( tableStyle, rowStyle, columnStyle, |
| 266 |
cellContentStyle, cellAreaStyle ); |
| 267 |
} |
253 |
} |
| 268 |
else |
254 |
else |
| 269 |
{ |
255 |
{ |
| 270 |
if ( !rtl || columnID + colSpan - 1 != endCol ) // bidi_hcg |
256 |
bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, |
| 271 |
bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, |
257 |
leftCellContentStyle, cellContentStyle, cellAreaStyle ); |
| 272 |
leftCellContentStyle, cellContentStyle, cellAreaStyle ); |
|
|
| 273 |
} |
258 |
} |
| 274 |
|
259 |
|
| 275 |
// resovle right border |
260 |
// resovle right border |
| 276 |
|
261 |
|
| 277 |
if ( columnID + colSpan - 1 == endCol ) |
262 |
if ( columnID + colSpan - 1 == endCol ) |
| 278 |
{ |
263 |
{ |
| 279 |
// bidi_hcg start |
264 |
bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle, |
| 280 |
if ( rtl ) |
265 |
cellContentStyle, cellAreaStyle ); |
| 281 |
bcr.resolveTableLeftBorder( tableStyle, rowStyle, |
|
|
| 282 |
columnStyle, cellContentStyle, cellAreaStyle ); |
| 283 |
else |
| 284 |
// bidi_hcg end |
| 285 |
bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle, |
| 286 |
cellContentStyle, cellAreaStyle ); |
| 287 |
} |
266 |
} |
| 288 |
|
267 |
|
| 289 |
} |
268 |
} |
|
Lines 304-341
Link Here
|
| 304 |
{ |
283 |
{ |
| 305 |
// first column |
284 |
// first column |
| 306 |
|
285 |
|
| 307 |
// bidi_hcg start |
286 |
bcr.resolveTableLeftBorder( tableStyle, rowStyle, columnStyle, |
| 308 |
if ( rtl ) |
287 |
cellContentStyle, cellAreaStyle ); |
| 309 |
{ |
|
|
| 310 |
bcr.resolveTableRightBorder( tableStyle, rowStyle, |
| 311 |
columnStyle, cellContentStyle, cellAreaStyle ); |
| 312 |
bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, |
| 313 |
leftCellContentStyle, cellContentStyle, |
| 314 |
cellAreaStyle ); |
| 315 |
} |
| 316 |
else |
| 317 |
// bidi_hcg end |
| 318 |
bcr.resolveTableLeftBorder( tableStyle, rowStyle, columnStyle, |
| 319 |
cellContentStyle, cellAreaStyle ); |
| 320 |
} |
288 |
} |
| 321 |
else |
289 |
else |
| 322 |
{ |
290 |
{ |
| 323 |
// TODO fix row span conflict |
291 |
// TODO fix row span conflict |
| 324 |
if ( !rtl || columnID + colSpan - 1 != endCol ) // bidi_hcg |
292 |
bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, |
| 325 |
bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, |
293 |
leftCellContentStyle, cellContentStyle, cellAreaStyle ); |
| 326 |
leftCellContentStyle, cellContentStyle, cellAreaStyle ); |
|
|
| 327 |
} |
294 |
} |
| 328 |
// resolve right border |
295 |
// resolve right border |
| 329 |
if ( columnID + colSpan-1 == endCol ) |
296 |
if ( columnID + colSpan-1 == endCol ) |
| 330 |
{ |
297 |
{ |
| 331 |
// bidi_hcg start |
298 |
bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle, |
| 332 |
if ( rtl ) |
299 |
cellContentStyle, cellAreaStyle ); |
| 333 |
bcr.resolveTableLeftBorder( tableStyle, rowStyle, |
|
|
| 334 |
columnStyle, cellContentStyle, cellAreaStyle ); |
| 335 |
else |
| 336 |
// bidi_hcg end |
| 337 |
bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle, |
| 338 |
cellContentStyle, cellAreaStyle ); |
| 339 |
} |
300 |
} |
| 340 |
} |
301 |
} |
| 341 |
|
302 |
|
|
Lines 414-422
Link Here
|
| 414 |
} |
375 |
} |
| 415 |
|
376 |
|
| 416 |
CSSValue align = content.getComputedStyle( ).getProperty( IStyle.STYLE_TEXT_ALIGN ); |
377 |
CSSValue align = content.getComputedStyle( ).getProperty( IStyle.STYLE_TEXT_ALIGN ); |
|
|
378 |
boolean isRightAligned = IStyle.RIGHT_VALUE.equals( align ) |
| 379 |
|| IStyle.JUSTIFY_VALUE.equals( align ) && content.isRTL( ); // bidi_hcg |
| 417 |
// single line |
380 |
// single line |
| 418 |
if ( ( IStyle.RIGHT_VALUE.equals( align ) || IStyle.CENTER_VALUE |
381 |
if ( ( isRightAligned || IStyle.CENTER_VALUE.equals( align ) ) ) |
| 419 |
.equals( align ) ) ) |
|
|
| 420 |
{ |
382 |
{ |
| 421 |
|
383 |
|
| 422 |
Iterator iter = cell.getChildren( ); |
384 |
Iterator iter = cell.getChildren( ); |
|
Lines 426-432
Link Here
|
| 426 |
int spacing = cell.getContentWidth( ) - area.getAllocatedWidth( ) ; |
388 |
int spacing = cell.getContentWidth( ) - area.getAllocatedWidth( ) ; |
| 427 |
if(spacing>0) |
389 |
if(spacing>0) |
| 428 |
{ |
390 |
{ |
| 429 |
if ( IStyle.RIGHT_VALUE.equals( align ) ) |
391 |
if ( isRightAligned ) |
| 430 |
{ |
392 |
{ |
| 431 |
area.setAllocatedPosition( spacing + area.getAllocatedX( ), |
393 |
area.setAllocatedPosition( spacing + area.getAllocatedX( ), |
| 432 |
area.getAllocatedY( ) ); |
394 |
area.getAllocatedY( ) ); |