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 99946 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 to consolidate naming of Bidi constants and fix PPT presentation
bug225536_080513.diff (text/plain), 17.44 KB, created by
Lina Kemmel
on 2008-05-13 09:55:53 EDT
(
hide
)
Description:
Patch to consolidate naming of Bidi constants and fix PPT presentation
Filename:
MIME Type:
Creator:
Lina Kemmel
Created:
2008-05-13 09:55:53 EDT
Size:
17.44 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.birt.report.engine.emitter.prototype.excel >Index: src/org/eclipse/birt/report/engine/emitter/excel/ExcelWriter.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/ExcelWriter.java,v >retrieving revision 1.31 >diff -u -r1.31 ExcelWriter.java >--- src/org/eclipse/birt/report/engine/emitter/excel/ExcelWriter.java 9 May 2008 01:43:04 -0000 1.31 >+++ src/org/eclipse/birt/report/engine/emitter/excel/ExcelWriter.java 13 May 2008 12:53:25 -0000 >@@ -15,7 +15,6 @@ > import java.util.logging.Logger; > import org.eclipse.birt.report.engine.content.IHyperlinkAction; > import org.eclipse.birt.report.engine.content.IReportContent; >-import org.eclipse.birt.report.engine.css.engine.value.birt.BIRTConstants; > import org.eclipse.birt.report.engine.css.engine.value.css.CSSConstants; > import org.eclipse.birt.report.engine.emitter.XMLWriter; > import org.eclipse.birt.report.engine.emitter.excel.layout.ExcelContext; >@@ -338,7 +337,7 @@ > > if ( isValid( direction ) ) > { >- if ( BIRTConstants.BIRT_RTL_VALUE.equals( direction ) ) >+ if ( CSSConstants.CSS_RTL_VALUE.equals( direction ) ) > writer.attribute( "ss:ReadingOrder", "RightToLeft" ); > else > writer.attribute( "ss:ReadingOrder", "LeftToRight" ); >#P org.eclipse.birt.report.model >Index: src/org/eclipse/birt/report/model/i18n/Messages.properties >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/i18n/Messages.properties,v >retrieving revision 1.289 >diff -u -r1.289 Messages.properties >--- src/org/eclipse/birt/report/model/i18n/Messages.properties 13 May 2008 06:09:58 -0000 1.289 >+++ src/org/eclipse/birt/report/model/i18n/Messages.properties 13 May 2008 12:53:28 -0000 >@@ -636,8 +636,8 @@ > Choices.scalarParamType.ad-hoc=Ad-hoc > > #77. bidiLayoutOrientation >-Choices.bidiDirection.rtl=Right To Left >-Choices.bidiDirection.ltr=Left To Right >+Choices.bidiDirection.rtl=rtl >+Choices.bidiDirection.ltr=ltr > > ########################################################### > # Classes >#P org.eclipse.birt.report.engine.emitter.html >Index: src/org/eclipse/birt/report/engine/emitter/html/HTMLReportEmitter.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine.emitter.html/src/org/eclipse/birt/report/engine/emitter/html/HTMLReportEmitter.java,v >retrieving revision 1.201 >diff -u -r1.201 HTMLReportEmitter.java >--- src/org/eclipse/birt/report/engine/emitter/html/HTMLReportEmitter.java 12 May 2008 07:07:46 -0000 1.201 >+++ src/org/eclipse/birt/report/engine/emitter/html/HTMLReportEmitter.java 13 May 2008 12:53:30 -0000 >@@ -500,7 +500,7 @@ > style.setProperty( IStyle.STYLE_TEXT_ALIGN, > IStyle.RIGHT_VALUE ); > style.setProperty( IStyle.STYLE_DIRECTION, >- IStyle.RIGHT_TO_LEFT_VALUE ); // bidi_hcg >+ IStyle.RTL_VALUE ); // bidi_hcg > } > } > } >@@ -1513,7 +1513,7 @@ > return true; > } > CSSValue direction = style.getProperty( IStyle.STYLE_DIRECTION ); >- if ( IStyle.RIGHT_TO_LEFT_VALUE.equals(direction) ) >+ if ( IStyle.RTL_VALUE.equals(direction) ) > { > if ( IStyle.LEFT_VALUE.equals( align ) ) > { >Index: src/org/eclipse/birt/report/engine/emitter/html/AttributeBuilder.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine.emitter.html/src/org/eclipse/birt/report/engine/emitter/html/AttributeBuilder.java,v >retrieving revision 1.37 >diff -u -r1.37 AttributeBuilder.java >--- src/org/eclipse/birt/report/engine/emitter/html/AttributeBuilder.java 12 May 2008 07:07:46 -0000 1.37 >+++ src/org/eclipse/birt/report/engine/emitter/html/AttributeBuilder.java 13 May 2008 12:53:29 -0000 >@@ -12,7 +12,7 @@ > package org.eclipse.birt.report.engine.emitter.html; > > import org.eclipse.birt.report.engine.content.IStyle; >-import org.eclipse.birt.report.engine.css.engine.value.birt.BIRTConstants; >+import org.eclipse.birt.report.engine.css.engine.value.css.CSSConstants; > import org.eclipse.birt.report.engine.ir.DimensionType; > import org.w3c.dom.css.CSSValue; > >@@ -697,10 +697,10 @@ > > if ( direction != null ) > { >- if ( BIRTConstants.BIRT_RTL_VALUE.equals( direction ) ) >+ if ( CSSConstants.CSS_RTL_VALUE.equals( direction ) ) > buildProperty( styleBuffer, IStyle.CSS_DIRECTION_PROPERTY, > IStyle.CSS_RTL_VALUE ); >- else if ( BIRTConstants.BIRT_LTR_VALUE.equals( direction ) ) >+ else if ( CSSConstants.CSS_LTR_VALUE.equals( direction ) ) > buildProperty( styleBuffer, IStyle.CSS_DIRECTION_PROPERTY, > IStyle.CSS_LTR_VALUE ); > } >#P org.eclipse.birt.report.engine >Index: src/org/eclipse/birt/report/engine/layout/pdf/PDFLineAreaLM.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/PDFLineAreaLM.java,v >retrieving revision 1.23 >diff -u -r1.23 PDFLineAreaLM.java >--- src/org/eclipse/birt/report/engine/layout/pdf/PDFLineAreaLM.java 27 Mar 2008 08:06:47 -0000 1.23 >+++ src/org/eclipse/birt/report/engine/layout/pdf/PDFLineAreaLM.java 13 May 2008 12:53:32 -0000 >@@ -392,7 +392,8 @@ > AbstractArea area = (AbstractArea) iter.next( ); > if(area instanceof TextArea) > { >- String text = ((TextArea)area).getText( ); >+ // Do not flip the text here for all output formats. >+ String text = ((TextArea)area).getText( false ); > blanks[index] = text.split( " " ).length - 1; > chars[index] = (text.length( )>1 ? (text.length( )-1): 0); > blankNumber += blanks[index]; >@@ -407,7 +408,7 @@ > AbstractArea child = (AbstractArea) it.next( ); > if(child instanceof TextArea) > { >- String text = ((TextArea)child).getText( ); >+ String text = ((TextArea)child).getText( false ); > blanks[index] = text.split( " " ).length - 1; > chars[index] = (text.length( )>1 ? (text.length( )-1): 0); > blankNumber += blanks[index]; >Index: src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTValueConstants.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTValueConstants.java,v >retrieving revision 1.3 >diff -u -r1.3 BIRTValueConstants.java >--- src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTValueConstants.java 12 May 2008 02:59:52 -0000 1.3 >+++ src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTValueConstants.java 13 May 2008 12:53:31 -0000 >@@ -28,9 +28,9 @@ > /** > * bidi_hcg: The 'Left To Right' and 'Right To Left' keywords. > */ >- Value LEFT_TO_RIGHT_VALUE = new StringValue( CSSPrimitiveValue.CSS_IDENT, >- BIRTConstants.BIRT_LTR_VALUE ); >- Value RIGHT_TO_LEFT_VALUE = new StringValue( CSSPrimitiveValue.CSS_IDENT, >- BIRTConstants.BIRT_RTL_VALUE ); >+ //Value LEFT_TO_RIGHT_VALUE = new StringValue( CSSPrimitiveValue.CSS_IDENT, >+ // BIRTConstants.BIRT_LTR_VALUE ); >+ //Value RIGHT_TO_LEFT_VALUE = new StringValue( CSSPrimitiveValue.CSS_IDENT, >+ // BIRTConstants.BIRT_RTL_VALUE ); > } > >Index: src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTConstants.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTConstants.java,v >retrieving revision 1.7 >diff -u -r1.7 BIRTConstants.java >--- src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTConstants.java 12 May 2008 02:59:52 -0000 1.7 >+++ src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTConstants.java 13 May 2008 12:53:31 -0000 >@@ -45,6 +45,6 @@ > String BIRT_FALSE_VALUE = "false"; > String BIRT_ALL_VALUE = "all"; > String BIRT_SOFT_VALUE = "soft"; >- String BIRT_LTR_VALUE = "Left To Right"; >- String BIRT_RTL_VALUE = "Right To Left"; >+ //String BIRT_LTR_VALUE = "Left To Right"; >+ //String BIRT_RTL_VALUE = "Right To Left"; > } >Index: src/org/eclipse/birt/report/engine/layout/pdf/text/ChunkGenerator.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/text/ChunkGenerator.java,v >retrieving revision 1.5 >diff -u -r1.5 ChunkGenerator.java >--- src/org/eclipse/birt/report/engine/layout/pdf/text/ChunkGenerator.java 8 May 2008 06:03:10 -0000 1.5 >+++ src/org/eclipse/birt/report/engine/layout/pdf/text/ChunkGenerator.java 13 May 2008 12:53:32 -0000 >@@ -12,7 +12,7 @@ > package org.eclipse.birt.report.engine.layout.pdf.text; > > import org.eclipse.birt.report.engine.content.ITextContent; >-import org.eclipse.birt.report.engine.css.engine.value.birt.BIRTConstants; >+import org.eclipse.birt.report.engine.css.engine.value.css.CSSConstants; > import org.eclipse.birt.report.engine.layout.pdf.ISplitter; > import org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManager; > import org.eclipse.birt.report.engine.layout.pdf.font.FontSplitter; >@@ -47,7 +47,7 @@ > // bidi_hcg: Create bidiSplitter based on a direction-sensitive > // Chunk. > //FIXME implement the getDirection() method in ComputedStyle. >- if ( BIRTConstants.BIRT_RTL_VALUE.equals( textContent >+ if ( CSSConstants.CSS_RTL_VALUE.equals( textContent > .getComputedStyle( ).getDirection( ) ) ) > { > bidiSplitter = new BidiSplitter( new Chunk( text, 0, >Index: src/org/eclipse/birt/report/engine/layout/area/impl/TextArea.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/area/impl/TextArea.java,v >retrieving revision 1.8 >diff -u -r1.8 TextArea.java >--- src/org/eclipse/birt/report/engine/layout/area/impl/TextArea.java 8 May 2008 06:03:10 -0000 1.8 >+++ src/org/eclipse/birt/report/engine/layout/area/impl/TextArea.java 13 May 2008 12:53:31 -0000 >@@ -163,12 +163,12 @@ > * the original text. > * @return the text in visual order. > */ >- public String getText( ) >+ public String getText( boolean dontFlip ) > { > calculateText( ); > // bidi_hcg: We actually need to determine the parity of embedding > // level(EL). RTL runs have odd EL, LTR runs - even EL. >- if ( ( runLevel & 1 ) == 0 ) >+ if ( dontFlip || ( runLevel & 1 ) == 0 ) > { > return text; > } >Index: src/org/eclipse/birt/report/engine/layout/pdf/emitter/LineLayout.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/emitter/LineLayout.java,v >retrieving revision 1.3 >diff -u -r1.3 LineLayout.java >--- src/org/eclipse/birt/report/engine/layout/pdf/emitter/LineLayout.java 8 May 2008 06:03:09 -0000 1.3 >+++ src/org/eclipse/birt/report/engine/layout/pdf/emitter/LineLayout.java 13 May 2008 12:53:32 -0000 >@@ -19,7 +19,6 @@ > import org.eclipse.birt.report.engine.content.ITextContent; > 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.css.engine.value.css.CSSConstants; > import org.eclipse.birt.report.engine.extension.IReportItemExecutor; > import org.eclipse.birt.report.engine.layout.area.impl.AbstractArea; >@@ -89,7 +88,7 @@ > // Derive the baseLevel from the parent content direction. > if ( parent.content != null ) > { >- if ( BIRTConstants.BIRT_RTL_VALUE.equals( parent.content >+ if ( CSSConstants.CSS_RTL_VALUE.equals( parent.content > .getComputedStyle( ).getDirection( ) ) ) > baseLevel = Bidi.DIRECTION_RIGHT_TO_LEFT; > } >@@ -211,7 +210,8 @@ > AbstractArea area = (AbstractArea) iter.next( ); > if(area instanceof TextArea) > { >- String text = ((TextArea)area).getText( ); >+ // Do not flip the text here for all output formats. >+ String text = ((TextArea)area).getText( false ); > blanks[index] = text.split( " " ).length - 1; > chars[index] = (text.length( )>1 ? (text.length( )-1): 0); > blankNumber += blanks[index]; >@@ -226,7 +226,7 @@ > AbstractArea child = (AbstractArea) it.next( ); > if(child instanceof TextArea) > { >- String text = ((TextArea)child).getText( ); >+ String text = ((TextArea)child).getText( false ); > blanks[index] = text.split( " " ).length - 1; > chars[index] = (text.length( )>1 ? (text.length( )-1): 0); > blankNumber += blanks[index]; >Index: src/org/eclipse/birt/report/engine/layout/emitter/PageDeviceRender.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/emitter/PageDeviceRender.java,v >retrieving revision 1.29 >diff -u -r1.29 PageDeviceRender.java >--- src/org/eclipse/birt/report/engine/layout/emitter/PageDeviceRender.java 12 May 2008 02:20:02 -0000 1.29 >+++ src/org/eclipse/birt/report/engine/layout/emitter/PageDeviceRender.java 13 May 2008 13:04:12 -0000 >@@ -34,7 +34,7 @@ > import org.eclipse.birt.report.engine.content.IStyle; > 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.css.engine.value.css.CSSConstants; > import org.eclipse.birt.report.engine.emitter.IEmitterServices; > import org.eclipse.birt.report.engine.layout.PDFConstants; > import org.eclipse.birt.report.engine.layout.TextStyle; >@@ -701,7 +701,7 @@ > .getProperty( IStyle.STYLE_TEXT_OVERLINE ) ); > boolean underline = IStyle.UNDERLINE_VALUE.equals( style > .getProperty( IStyle.STYLE_TEXT_UNDERLINE ) ); >- boolean rtl = BIRTConstants.BIRT_RTL_VALUE.equals( style >+ boolean rtl = CSSConstants.CSS_RTL_VALUE.equals( style > .getProperty( IStyle.STYLE_DIRECTION ) ); // bidi_hcg > IContent content = text.getContent( ); > if ( content != null && content.getHyperlinkAction( ) != null ) >@@ -737,7 +737,10 @@ > protected void drawTextAt( ITextArea text, int x, int y, int width, > int height, TextStyle textStyle ) > { >- pageGraphic.drawText( text.getText( ), x, y, width, height, textStyle ); >+ // FIXME: probably need to define some class var for "ppt" >+ pageGraphic >+ .drawText( >+ text.getText( "ppt".equals( getOutputFormat( ) ) ), x, y, width, height, textStyle ); //$NON-NLS-1$ > } > > /** >Index: src/org/eclipse/birt/report/engine/layout/area/ITextArea.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/area/ITextArea.java,v >retrieving revision 1.1 >diff -u -r1.1 ITextArea.java >--- src/org/eclipse/birt/report/engine/layout/area/ITextArea.java 17 Jun 2006 12:10:47 -0000 1.1 >+++ src/org/eclipse/birt/report/engine/layout/area/ITextArea.java 13 May 2008 12:53:31 -0000 >@@ -14,6 +14,6 @@ > > public interface ITextArea extends IArea > { >- String getText(); >+ String getText( boolean dontFlip ); > FontInfo getFontInfo(); > } >Index: src/org/eclipse/birt/report/engine/emitter/wpml/WpmlWriter.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/WpmlWriter.java,v >retrieving revision 1.41 >diff -u -r1.41 WpmlWriter.java >--- src/org/eclipse/birt/report/engine/emitter/wpml/WpmlWriter.java 9 May 2008 07:20:27 -0000 1.41 >+++ src/org/eclipse/birt/report/engine/emitter/wpml/WpmlWriter.java 13 May 2008 12:53:35 -0000 >@@ -24,8 +24,6 @@ > import org.eclipse.birt.report.engine.emitter.XMLWriter; > import org.eclipse.birt.report.engine.content.IAutoTextContent; > import org.eclipse.birt.report.engine.css.engine.value.css.CSSConstants; >-import org.eclipse.birt.report.engine.css.engine.value.birt.BIRTConstants; >-import org.eclipse.birt.report.model.api.ReportDesignHandle; > import org.eclipse.birt.report.model.api.core.IModuleModel; > > public class WpmlWriter >@@ -467,7 +465,7 @@ > align = "both"; > } > // Need to swap 'left' and 'right' when orientation is RTL. >- if ( BIRTConstants.BIRT_RTL_VALUE.equalsIgnoreCase( direction ) ) >+ if ( CSSConstants.CSS_RTL_VALUE.equalsIgnoreCase( direction ) ) > { > if ( IStyle.CSS_RIGHT_VALUE.equals( align ) ) > writeAttrTag( "w:jc", IStyle.CSS_LEFT_VALUE ); >@@ -852,7 +850,7 @@ > // Non Bidi text will result in a single LTR Bidi run and won't be > // really affected. > String direction = style.getDirection( ); >- boolean textIsRtl = BIRTConstants.BIRT_RTL_VALUE.equals( direction ); >+ boolean textIsRtl = CSSConstants.CSS_RTL_VALUE.equals( direction ); > int nChunks = reserved ? 1 : 0; > > writer.openTag( "w:pPr" ); >@@ -1460,9 +1458,8 @@ > String direction = style.getDirection( ); // bidi_hcg > if ( style.getTextAlign( ).equals( "left" ) ) > { >- if ( BIRTConstants.BIRT_RTL_VALUE.equals( direction ) ) >- writeAlign( style.getTextAlign( ), direction ); >- return; >+ if ( !CSSConstants.CSS_RTL_VALUE.equals( direction ) ) >+ return; > } > > writer.openTag( "w:pPr");
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