Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 96299 Details for
Bug 225536
[Bidi] Support global orientation of report output
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for PDF, PPT and POSTSCRIPT emitters
pdf_080416.diff (text/plain), 7.32 KB, created by
Lina Kemmel
on 2008-04-16 14:26:03 EDT
(
hide
)
Description:
Patch for PDF, PPT and POSTSCRIPT emitters
Filename:
MIME Type:
Creator:
Lina Kemmel
Created:
2008-04-16 14:26:03 EDT
Size:
7.32 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.birt.report.engine >Index: src/org/eclipse/birt/report/engine/layout/pdf/PDFRowLM.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/PDFRowLM.java,v >retrieving revision 1.15 >diff -u -r1.15 PDFRowLM.java >--- src/org/eclipse/birt/report/engine/layout/pdf/PDFRowLM.java 28 Aug 2007 03:40:29 -0000 1.15 >+++ src/org/eclipse/birt/report/engine/layout/pdf/PDFRowLM.java 16 Apr 2008 18:17:45 -0000 >@@ -24,6 +24,7 @@ > import org.eclipse.birt.report.engine.layout.area.impl.AreaFactory; > import org.eclipse.birt.report.engine.layout.area.impl.CellArea; > import org.eclipse.birt.report.engine.layout.area.impl.RowArea; >+import org.eclipse.birt.report.model.api.ReportDesignHandle; > > public class PDFRowLM extends PDFInlineStackingLM > implements >@@ -193,7 +194,20 @@ > { > CellArea cArea = (CellArea) area; > root.addChild( area ); >- cArea.setPosition( tbl.getXPos( cArea.getColumnID( ) ), 0 ); >+ >+ // bidi_hcg start >+ int columnID = cArea.getColumnID( ); >+ int colSpan = cArea.getColSpan( ); >+ if ( colSpan > 1 ) >+ { >+ ReportDesignHandle design = context.report.getDesign( ) >+ .getReportDesign( ); >+ if ( design.isDirectionRTL( ) ) >+ columnID += colSpan - 1; >+ } >+ // bidi_hcg end >+ >+ cArea.setPosition( tbl.getXPos( columnID ), 0 ); > } > > protected boolean clearCache( ) >Index: src/org/eclipse/birt/report/engine/layout/pdf/PDFTableLM.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/PDFTableLM.java,v >retrieving revision 1.39 >diff -u -r1.39 PDFTableLM.java >--- src/org/eclipse/birt/report/engine/layout/pdf/PDFTableLM.java 14 Apr 2008 08:05:25 -0000 1.39 >+++ src/org/eclipse/birt/report/engine/layout/pdf/PDFTableLM.java 16 Apr 2008 18:17:46 -0000 >@@ -29,6 +29,7 @@ > import org.eclipse.birt.report.engine.content.ITableContent; > import org.eclipse.birt.report.engine.css.engine.StyleConstants; > import org.eclipse.birt.report.engine.css.engine.value.FloatValue; >+import org.eclipse.birt.report.engine.css.engine.value.birt.BIRTConstants; > import org.eclipse.birt.report.engine.extension.IReportItemExecutor; > import org.eclipse.birt.report.engine.internal.executor.dom.DOMReportItemExecutor; > import org.eclipse.birt.report.engine.ir.CellDesign; >@@ -1051,9 +1052,24 @@ > this.columnNumber = colWidth.length; > this.xPositions = new int[columnNumber]; > this.tableWidth = 0; >+ >+ // bidi_hcg start >+ boolean rtl = tableContent.getReportContent( ).getDesign( ) >+ .getReportDesign( ).isDirectionRTL( ); >+ // bidi_hcg end >+ > for ( int i = 0; i < columnNumber; i++ ) > { >- xPositions[i] = tableWidth; >+ // bidi_hcg start >+ if ( rtl ) >+ { >+ xPositions[i] = parent.getCurrentMaxContentWidth( ) - tableWidth >+ - colWidth[i]; >+ } >+ // bidi_hcg end >+ else // ltr >+ xPositions[i] = tableWidth; >+ > tableWidth += colWidth[i]; > } > >Index: src/org/eclipse/birt/report/engine/layout/pdf/cache/TableAreaLayout.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/cache/TableAreaLayout.java,v >retrieving revision 1.23 >diff -u -r1.23 TableAreaLayout.java >--- src/org/eclipse/birt/report/engine/layout/pdf/cache/TableAreaLayout.java 31 Oct 2007 03:37:11 -0000 1.23 >+++ src/org/eclipse/birt/report/engine/layout/pdf/cache/TableAreaLayout.java 16 Apr 2008 18:17:46 -0000 >@@ -31,7 +31,6 @@ > import org.eclipse.birt.report.engine.layout.area.impl.ContainerArea; > import org.eclipse.birt.report.engine.layout.area.impl.RowArea; > import org.eclipse.birt.report.engine.layout.area.impl.TableArea; >-import org.eclipse.birt.report.engine.layout.area.impl.TextArea; > import org.eclipse.birt.report.engine.layout.pdf.BorderConflictResolver; > import org.eclipse.birt.report.engine.layout.pdf.PDFTableLM.TableLayoutInfo; > import org.eclipse.birt.report.engine.layout.pdf.util.PropertyUtil; >@@ -212,6 +211,11 @@ > IStyle leftCellContentStyle = null; > IStyle topCellStyle = null; > >+ // bidi_hcg start >+ boolean rtl = tableContent.getReportContent( ).getDesign( ) >+ .getReportDesign( ).isDirectionRTL( ); >+ // bidi_hcg end >+ > Row lastRow = null; > if(rows.size( )>0 ) > { >@@ -247,12 +251,24 @@ > // resolve left border > if ( columnID == startCol ) > { >- bcr.resolveTableLeftBorder( tableStyle, rowStyle, columnStyle, >- cellContentStyle, cellAreaStyle ); >+ // bidi_hcg start >+ if ( rtl ) >+ { >+ bcr.resolveTableRightBorder( tableStyle, rowStyle, >+ columnStyle, cellContentStyle, cellAreaStyle ); >+ bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, >+ leftCellContentStyle, cellContentStyle, >+ cellAreaStyle ); >+ } >+ else >+ // bidi_hcg end >+ bcr.resolveTableLeftBorder( tableStyle, rowStyle, columnStyle, >+ cellContentStyle, cellAreaStyle ); > } > else > { >- bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, >+ if ( !rtl || columnID + colSpan - 1 != endCol ) // bidi_hcg >+ bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, > leftCellContentStyle, cellContentStyle, cellAreaStyle ); > } > >@@ -260,8 +276,14 @@ > > if ( columnID + colSpan - 1 == endCol ) > { >- bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle, >- cellContentStyle, cellAreaStyle ); >+ // bidi_hcg start >+ if ( rtl ) >+ bcr.resolveTableLeftBorder( tableStyle, rowStyle, >+ columnStyle, cellContentStyle, cellAreaStyle ); >+ else >+ // bidi_hcg end >+ bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle, >+ cellContentStyle, cellAreaStyle ); > } > > } >@@ -281,19 +303,38 @@ > if ( columnID == startCol ) > { > // first column >- bcr.resolveTableLeftBorder( tableStyle, rowStyle, columnStyle, >+ >+ // bidi_hcg start >+ if ( rtl ) >+ { >+ bcr.resolveTableRightBorder( tableStyle, rowStyle, >+ columnStyle, cellContentStyle, cellAreaStyle ); >+ bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, >+ leftCellContentStyle, cellContentStyle, >+ cellAreaStyle ); >+ } >+ else >+ // bidi_hcg end >+ bcr.resolveTableLeftBorder( tableStyle, rowStyle, columnStyle, > cellContentStyle, cellAreaStyle ); > } > else > { > // TODO fix row span conflict >- bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, >- leftCellContentStyle, cellContentStyle, cellAreaStyle ); >+ if ( !rtl || columnID + colSpan - 1 != endCol ) // bidi_hcg >+ bcr.resolveCellLeftBorder( preColumnStyle, columnStyle, >+ leftCellContentStyle, cellContentStyle, cellAreaStyle ); > } > // resolve right border > if ( columnID + colSpan-1 == endCol ) > { >- bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle, >+ // bidi_hcg start >+ if ( rtl ) >+ bcr.resolveTableLeftBorder( tableStyle, rowStyle, >+ columnStyle, cellContentStyle, cellAreaStyle ); >+ else >+ // bidi_hcg end >+ bcr.resolveTableRightBorder( tableStyle, rowStyle, columnStyle, > cellContentStyle, cellAreaStyle ); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bjorn.freeman-benson
:
iplog+
Lina.Kemmel
:
review?
Actions:
View
|
Diff
Attachments on
bug 225536
:
95596
|
95598
|
96157
|
96159
|
96282
| 96299 |
96652
|
99946
|
101888
|
103603