Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 225536 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/birt/report/engine/layout/pdf/PDFRowLM.java (-1 / +15 lines)
Lines 24-29 Link Here
24
import org.eclipse.birt.report.engine.layout.area.impl.AreaFactory;
24
import org.eclipse.birt.report.engine.layout.area.impl.AreaFactory;
25
import org.eclipse.birt.report.engine.layout.area.impl.CellArea;
25
import org.eclipse.birt.report.engine.layout.area.impl.CellArea;
26
import org.eclipse.birt.report.engine.layout.area.impl.RowArea;
26
import org.eclipse.birt.report.engine.layout.area.impl.RowArea;
27
import org.eclipse.birt.report.model.api.ReportDesignHandle;
27
28
28
public class PDFRowLM extends PDFInlineStackingLM
29
public class PDFRowLM extends PDFInlineStackingLM
29
		implements
30
		implements
Lines 193-199 Link Here
193
	{
194
	{
194
		CellArea cArea = (CellArea) area;
195
		CellArea cArea = (CellArea) area;
195
		root.addChild( area );
196
		root.addChild( area );
196
		cArea.setPosition( tbl.getXPos( cArea.getColumnID( ) ), 0 );
197
198
		// bidi_hcg start
199
		int columnID = cArea.getColumnID( );
200
		int colSpan = cArea.getColSpan( );
201
		if ( colSpan > 1 )
202
		{
203
			ReportDesignHandle design = context.report.getDesign( )
204
					.getReportDesign( );
205
			if ( design.isDirectionRTL( ) )
206
				columnID += colSpan - 1;
207
		}
208
		// bidi_hcg end
209
210
		cArea.setPosition( tbl.getXPos( columnID ), 0 );
197
	}
211
	}
198
212
199
	protected boolean clearCache( )
213
	protected boolean clearCache( )
(-)src/org/eclipse/birt/report/engine/layout/pdf/PDFTableLM.java (-1 / +17 lines)
Lines 29-34 Link Here
29
import org.eclipse.birt.report.engine.content.ITableContent;
29
import org.eclipse.birt.report.engine.content.ITableContent;
30
import org.eclipse.birt.report.engine.css.engine.StyleConstants;
30
import org.eclipse.birt.report.engine.css.engine.StyleConstants;
31
import org.eclipse.birt.report.engine.css.engine.value.FloatValue;
31
import org.eclipse.birt.report.engine.css.engine.value.FloatValue;
32
import org.eclipse.birt.report.engine.css.engine.value.birt.BIRTConstants;
32
import org.eclipse.birt.report.engine.extension.IReportItemExecutor;
33
import org.eclipse.birt.report.engine.extension.IReportItemExecutor;
33
import org.eclipse.birt.report.engine.internal.executor.dom.DOMReportItemExecutor;
34
import org.eclipse.birt.report.engine.internal.executor.dom.DOMReportItemExecutor;
34
import org.eclipse.birt.report.engine.ir.CellDesign;
35
import org.eclipse.birt.report.engine.ir.CellDesign;
Lines 1051-1059 Link Here
1051
			this.columnNumber = colWidth.length;
1052
			this.columnNumber = colWidth.length;
1052
			this.xPositions = new int[columnNumber];
1053
			this.xPositions = new int[columnNumber];
1053
			this.tableWidth = 0;
1054
			this.tableWidth = 0;
1055
1056
			// bidi_hcg start
1057
			boolean rtl = tableContent.getReportContent( ).getDesign( )
1058
					.getReportDesign( ).isDirectionRTL( ); 
1059
			// bidi_hcg end
1060
1054
			for ( int i = 0; i < columnNumber; i++ )
1061
			for ( int i = 0; i < columnNumber; i++ )
1055
			{
1062
			{
1056
				xPositions[i] = tableWidth;
1063
				// bidi_hcg start
1064
				if ( rtl )
1065
				{
1066
					xPositions[i] = parent.getCurrentMaxContentWidth( ) - tableWidth
1067
 						- colWidth[i];
1068
				}
1069
				// bidi_hcg end
1070
				else // ltr
1071
					xPositions[i] = tableWidth;
1072
1057
				tableWidth += colWidth[i];
1073
				tableWidth += colWidth[i];
1058
			}
1074
			}
1059
1075
(-)src/org/eclipse/birt/report/engine/layout/pdf/cache/TableAreaLayout.java (-10 / +51 lines)
Lines 31-37 Link Here
31
import org.eclipse.birt.report.engine.layout.area.impl.ContainerArea;
31
import org.eclipse.birt.report.engine.layout.area.impl.ContainerArea;
32
import org.eclipse.birt.report.engine.layout.area.impl.RowArea;
32
import org.eclipse.birt.report.engine.layout.area.impl.RowArea;
33
import org.eclipse.birt.report.engine.layout.area.impl.TableArea;
33
import org.eclipse.birt.report.engine.layout.area.impl.TableArea;
34
import org.eclipse.birt.report.engine.layout.area.impl.TextArea;
35
import org.eclipse.birt.report.engine.layout.pdf.BorderConflictResolver;
34
import org.eclipse.birt.report.engine.layout.pdf.BorderConflictResolver;
36
import org.eclipse.birt.report.engine.layout.pdf.PDFTableLM.TableLayoutInfo;
35
import org.eclipse.birt.report.engine.layout.pdf.PDFTableLM.TableLayoutInfo;
37
import org.eclipse.birt.report.engine.layout.pdf.util.PropertyUtil;
36
import org.eclipse.birt.report.engine.layout.pdf.util.PropertyUtil;
Lines 212-217 Link Here
212
		IStyle leftCellContentStyle = null;
211
		IStyle leftCellContentStyle = null;
213
		IStyle topCellStyle = null;
212
		IStyle topCellStyle = null;
214
213
214
		// bidi_hcg start
215
		boolean rtl = tableContent.getReportContent( ).getDesign( )
216
				.getReportDesign( ).isDirectionRTL( ); 
217
		// bidi_hcg end
218
215
		Row lastRow = null;
219
		Row lastRow = null;
216
		if(rows.size( )>0 )
220
		if(rows.size( )>0 )
217
		{
221
		{
Lines 247-258 Link Here
247
			// resolve left border
251
			// resolve left border
248
			if ( columnID == startCol )
252
			if ( columnID == startCol )
249
			{
253
			{
250
				bcr.resolveTableLeftBorder( tableStyle, rowStyle, columnStyle,
254
				// bidi_hcg start
251
						cellContentStyle, cellAreaStyle );
255
				if ( rtl )
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 );
252
			}
267
			}
253
			else
268
			else
254
			{
269
			{
255
				bcr.resolveCellLeftBorder( preColumnStyle, columnStyle,
270
				if ( !rtl || columnID + colSpan - 1 != endCol ) // bidi_hcg
271
					bcr.resolveCellLeftBorder( preColumnStyle, columnStyle,
256
						leftCellContentStyle, cellContentStyle, cellAreaStyle );
272
						leftCellContentStyle, cellContentStyle, cellAreaStyle );
257
			}
273
			}
258
274
Lines 260-267 Link Here
260
276
261
			if ( columnID + colSpan - 1 == endCol )
277
			if ( columnID + colSpan - 1 == endCol )
262
			{
278
			{
263
				bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle,
279
				// bidi_hcg start
264
						cellContentStyle, cellAreaStyle );
280
				if ( rtl )
281
					bcr.resolveTableLeftBorder( tableStyle, rowStyle,
282
							columnStyle, cellContentStyle, cellAreaStyle );
283
				else
284
				// bidi_hcg end
285
					bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle,
286
							cellContentStyle, cellAreaStyle );
265
			}
287
			}
266
288
267
		}
289
		}
Lines 281-299 Link Here
281
			if ( columnID == startCol )
303
			if ( columnID == startCol )
282
			{
304
			{
283
				// first column
305
				// first column
284
				bcr.resolveTableLeftBorder( tableStyle, rowStyle, columnStyle,
306
307
				// bidi_hcg start
308
				if ( rtl )
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,
285
						cellContentStyle, cellAreaStyle );
319
						cellContentStyle, cellAreaStyle );
286
			}
320
			}
287
			else
321
			else
288
			{
322
			{
289
				// TODO fix row span conflict
323
				// TODO fix row span conflict
290
				bcr.resolveCellLeftBorder( preColumnStyle, columnStyle,
324
				if ( !rtl || columnID + colSpan - 1 != endCol ) // bidi_hcg
291
						leftCellContentStyle, cellContentStyle, cellAreaStyle );
325
					bcr.resolveCellLeftBorder( preColumnStyle, columnStyle,
326
							leftCellContentStyle, cellContentStyle, cellAreaStyle );
292
			}
327
			}
293
			// resolve right border
328
			// resolve right border
294
			if ( columnID + colSpan-1 == endCol )
329
			if ( columnID + colSpan-1 == endCol )
295
			{
330
			{
296
				bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle,
331
				// bidi_hcg start
332
				if ( rtl )
333
					bcr.resolveTableLeftBorder( tableStyle, rowStyle,
334
							columnStyle, cellContentStyle, cellAreaStyle );
335
				else
336
				// bidi_hcg end
337
					bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle,
297
						cellContentStyle, cellAreaStyle );
338
						cellContentStyle, cellAreaStyle );
298
			}
339
			}
299
		}
340
		}

Return to bug 225536