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 94390 Details for
Bug 225140
[Bidi] Support global orientation of report design
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 against the trunk
bidi_model&engine_api_20080401.diff (text/plain), 48.01 KB, created by
Lina Kemmel
on 2008-04-01 12:25:53 EDT
(
hide
)
Description:
Patch against the trunk
Filename:
MIME Type:
Creator:
Lina Kemmel
Created:
2008-04-01 12:25:53 EDT
Size:
48.01 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.birt.report.engine >Index: src/org/eclipse/birt/report/engine/layout/pdf/PDFReportLayoutEngine.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/PDFReportLayoutEngine.java,v >retrieving revision 1.22 >diff -u -r1.22 PDFReportLayoutEngine.java >--- src/org/eclipse/birt/report/engine/layout/pdf/PDFReportLayoutEngine.java 17 Mar 2008 08:32:45 -0000 1.22 >+++ src/org/eclipse/birt/report/engine/layout/pdf/PDFReportLayoutEngine.java 1 Apr 2008 13:39:34 -0000 >@@ -16,6 +16,7 @@ > > import org.eclipse.birt.core.format.NumberFormatter; > import org.eclipse.birt.report.engine.api.IPDFRenderOption; >+import org.eclipse.birt.report.engine.api.IRenderOption; > import org.eclipse.birt.report.engine.content.Dimension; > import org.eclipse.birt.report.engine.content.IAutoTextContent; > import org.eclipse.birt.report.engine.content.IContent; >@@ -28,7 +29,6 @@ > import org.eclipse.birt.report.engine.layout.ILayoutPageHandler; > import org.eclipse.birt.report.engine.layout.IReportLayoutEngine; > import org.eclipse.birt.report.engine.layout.PDFConstants; >-import org.eclipse.birt.report.engine.layout.area.IArea; > import org.eclipse.birt.report.engine.layout.area.impl.AbstractArea; > import org.eclipse.birt.report.engine.layout.area.impl.AreaFactory; > import org.eclipse.birt.report.engine.layout.pdf.text.Chunk; >@@ -245,6 +245,15 @@ > context.setBidiProcessing(false); > } > } >+ /* >+ /* >+ * bidi_hcg: Only disable Bidi processing when the rtl flag is null, >+ * i.e. Bidi support is disabled. >+ */ >+ if ( options.get( IRenderOption.RTL_FLAG ) == null ) >+ { >+ context.setBidiProcessing( false ); >+ } > } > > public void setOption(String name, Object value) >Index: src/org/eclipse/birt/report/engine/parser/EngineIRVisitor.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/parser/EngineIRVisitor.java,v >retrieving revision 1.161 >diff -u -r1.161 EngineIRVisitor.java >--- src/org/eclipse/birt/report/engine/parser/EngineIRVisitor.java 1 Apr 2008 08:15:57 -0000 1.161 >+++ src/org/eclipse/birt/report/engine/parser/EngineIRVisitor.java 1 Apr 2008 13:39:35 -0000 >@@ -2514,7 +2514,8 @@ > } > if ( value == null ) > { >- value = StylePropertyMapping.getDefaultValue( name ); >+ // bidi_hcg added arg >+ value = StylePropertyMapping.getDefaultValue( name, this.handle ); > } > > inheritableReportStyle.setCssText( index, value == null >@@ -2523,7 +2524,8 @@ > } > else > { >- value = StylePropertyMapping.getDefaultValue( name ); >+ // bidi_hcg added arg >+ value = StylePropertyMapping.getDefaultValue( name, this.handle ); > nonInheritableReportStyle.setCssText( index, value == null > ? null > : value.toString( ) ); >Index: src/org/eclipse/birt/report/engine/parser/StylePropertyMapping.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/parser/StylePropertyMapping.java,v >retrieving revision 1.1 >diff -u -r1.1 StylePropertyMapping.java >--- src/org/eclipse/birt/report/engine/parser/StylePropertyMapping.java 1 Feb 2007 10:22:38 -0000 1.1 >+++ src/org/eclipse/birt/report/engine/parser/StylePropertyMapping.java 1 Apr 2008 13:39:35 -0000 >@@ -15,6 +15,8 @@ > import java.util.Set; > > import org.eclipse.birt.report.engine.css.engine.StyleConstants; >+import org.eclipse.birt.report.engine.util.BidiAlignmentResolver; >+import org.eclipse.birt.report.model.api.ReportDesignHandle; > import org.eclipse.birt.report.model.api.elements.ReportDesignConstants; > import org.eclipse.birt.report.model.api.metadata.IElementDefn; > import org.eclipse.birt.report.model.api.metadata.IElementPropertyDefn; >@@ -137,6 +139,26 @@ > return null; > } > >+ /** >+ * @param name >+ * @param handle >+ * @return >+ * @author bidi_hcg >+ */ >+ public static Object getDefaultValue( String name, ReportDesignHandle handle ) >+ { >+ Object value = getDefaultValue( name ); >+ >+ if ( value == null && handle != null ) >+ { >+ if ( IStyleModel.TEXT_ALIGN_PROP.equals( name ) ) >+ value = BidiAlignmentResolver.getDefaultAlignment( handle >+ .getBidiOrientation( ) ); >+ // TODO: Handle default for the text direction property as well. >+ } >+ return value; >+ } >+ > public static Object getDefaultValue( int index ) > { > return getDefaultValue( nameMapping.get( new Integer( index ) ).toString( ) ); >Index: src/org/eclipse/birt/report/engine/api/IRenderOption.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/IRenderOption.java,v >retrieving revision 1.9 >diff -u -r1.9 IRenderOption.java >--- src/org/eclipse/birt/report/engine/api/IRenderOption.java 4 Mar 2008 09:33:59 -0000 1.9 >+++ src/org/eclipse/birt/report/engine/api/IRenderOption.java 1 Apr 2008 13:39:33 -0000 >@@ -34,6 +34,13 @@ > > public static final String LOCALE = "locale"; //$NON-NLS-1$ > >+ /** >+ * bidi_hcg: >+ * Should we output report as RTL. The value is a Boolean Object, the >+ * default is <code>Boolean.FALSE</code>. >+ */ >+ public static final String RTL_FLAG = "RTLFlag"; //$NON-NLS-1$ >+ > public static final String SUPPORTED_IMAGE_FORMATS = "supportedImageFormats"; > > public static final String BASE_URL = "baseUrl"; >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.2 >diff -u -r1.2 BIRTValueConstants.java >--- src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTValueConstants.java 22 Nov 2005 09:59:57 -0000 1.2 >+++ src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTValueConstants.java 1 Apr 2008 13:39:34 -0000 >@@ -22,4 +22,12 @@ > Value ALL_VALUE = new StringValue(CSSPrimitiveValue.CSS_IDENT, BIRTConstants.BIRT_ALL_VALUE); > Value SOFT_VALUE = new StringValue(CSSPrimitiveValue.CSS_IDENT, > BIRTConstants.BIRT_SOFT_VALUE); >+ >+ /** >+ * 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); > } >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.5 >diff -u -r1.5 BIRTConstants.java >--- src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTConstants.java 9 Nov 2007 08:39:15 -0000 1.5 >+++ src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTConstants.java 1 Apr 2008 13:39:34 -0000 >@@ -45,4 +45,7 @@ > String BIRT_FALSE_VALUE = "false"; > String BIRT_ALL_VALUE = "all"; > String BIRT_SOFT_VALUE = "soft"; >+ >+ String BIRT_LTR_VALUE = "Left To Right"; // bidi_hcg >+ String BIRT_RTL_VALUE = "Right To Left"; // bidi_hcg > } >Index: src/org/eclipse/birt/report/engine/api/impl/EngineTask.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/EngineTask.java,v >retrieving revision 1.91 >diff -u -r1.91 EngineTask.java >--- src/org/eclipse/birt/report/engine/api/impl/EngineTask.java 28 Mar 2008 07:18:46 -0000 1.91 >+++ src/org/eclipse/birt/report/engine/api/impl/EngineTask.java 1 Apr 2008 13:39:33 -0000 >@@ -1235,14 +1235,22 @@ > IPDFRenderOption.PDF_FONT_SUBSTITUTION, > pdfFontSubstitution ); > } >- Object pdfBidiProcessing = renderOptions >- .getOption( IPDFRenderOption.PDF_BIDI_PROCESSING ); >- if ( pdfBidiProcessing != null ) >- { >- layoutEngine.setOption( >- IPDFRenderOption.PDF_BIDI_PROCESSING, >- pdfBidiProcessing ); >- } >+ /* >+ * bidi_hcg: >+ */ >+ layoutEngine.setOption( IRenderOption.RTL_FLAG, renderOptions >+ .getOption( IRenderOption.RTL_FLAG ) ); >+ >+ /* >+ * pdfBidiProcessing is handled by >+ * org.eclipse.birt.report.engine.layout.pdf.PDFReportLayoutEngine >+ * #setupLayoutOptions >+ * >+ * Object pdfBidiProcessing = renderOptions .getOption( >+ * IPDFRenderOption.PDF_BIDI_PROCESSING ); if ( pdfBidiProcessing != >+ * null ) { layoutEngine.setOption( >+ * IPDFRenderOption.PDF_BIDI_PROCESSING, pdfBidiProcessing ); } >+ */ > } > layoutEngine.setOption( TASK_TYPE, new Integer(taskType)); > return layoutEngine; >Index: src/org/eclipse/birt/report/engine/content/impl/ForeignContent.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/content/impl/ForeignContent.java,v >retrieving revision 1.14 >diff -u -r1.14 ForeignContent.java >--- src/org/eclipse/birt/report/engine/content/impl/ForeignContent.java 1 Feb 2008 10:00:50 -0000 1.14 >+++ src/org/eclipse/birt/report/engine/content/impl/ForeignContent.java 1 Apr 2008 13:39:33 -0000 >@@ -127,6 +127,7 @@ > String text = content == null ? "" : content.toString( ).trim( ); > if ( text.length( ) > 6 ) > { >+ // XXX bidi_hcg: can this can be <html ...> with attributes? > if ( "<html>".equalsIgnoreCase( text.substring( 0, 6 ) ) ) > { > return IForeignContent.HTML_TYPE; >Index: src/org/eclipse/birt/report/engine/css/engine/BIRTPropertyManagerFactory.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/css/engine/BIRTPropertyManagerFactory.java,v >retrieving revision 1.10 >diff -u -r1.10 BIRTPropertyManagerFactory.java >--- src/org/eclipse/birt/report/engine/css/engine/BIRTPropertyManagerFactory.java 9 Nov 2007 08:39:14 -0000 1.10 >+++ src/org/eclipse/birt/report/engine/css/engine/BIRTPropertyManagerFactory.java 1 Apr 2008 13:39:34 -0000 >@@ -61,9 +61,11 @@ > { > vms = new ValueManager[PerfectHash.TOTAL_KEYWORDS]; > >+ // bidi_hcg: Leave this property blank to respect bidirectionality. > vms[StyleConstants.STYLE_TEXT_ALIGN] = new TextAlignManager( > CSSConstants.CSS_TEXT_ALIGN_PROPERTY, >- CSSValueConstants.LEFT_VALUE ); >+ CSSValueConstants.NULL_STRING_VALUE ); >+ //.LEFT_VALUE ); > vms[StyleConstants.STYLE_TEXT_INDENT] = new LengthManager( > CSSConstants.CSS_TEXT_INDENT_PROPERTY, true, > CSSValueConstants.NUMBER_0 ); >Index: src/org/eclipse/birt/report/engine/util/BidiAlignmentResolver.java >=================================================================== >RCS file: src/org/eclipse/birt/report/engine/util/BidiAlignmentResolver.java >diff -N src/org/eclipse/birt/report/engine/util/BidiAlignmentResolver.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/birt/report/engine/util/BidiAlignmentResolver.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,68 @@ >+/*********************************************************************** >+ * Copyright (c) 2008 IBM Corporation. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ ***********************************************************************/ >+ >+package org.eclipse.birt.report.engine.util; >+ >+import org.eclipse.birt.report.engine.css.engine.value.css.CSSConstants; >+import org.eclipse.birt.report.model.api.ReportDesignHandle; >+import org.eclipse.birt.report.model.api.elements.DesignChoiceConstants; >+ >+/** >+ * @author bidi_hcg >+ * >+ */ >+public class BidiAlignmentResolver >+{ >+ public static String resolveAlignment( ReportDesignHandle model ) >+ { >+ if ( model != null ) >+ { >+ return getDefaultAlignment( model.getBidiOrientation( ) ); >+ } >+ return CSSConstants.CSS_LEFT_VALUE; >+ } >+ >+ public static String getDefaultAlignment( boolean rtl ) >+ { >+ if ( rtl ) >+ return CSSConstants.CSS_RIGHT_VALUE; >+ >+ return CSSConstants.CSS_LEFT_VALUE; >+ } >+ >+ public static String getDefaultAlignment( String orientation ) >+ { >+ return getDefaultAlignment( DesignChoiceConstants.BIDI_ORIENTATION_RTL >+ .equals( orientation ) ); >+ } >+ >+ public static String resolveAlignment( String alignment, boolean mirrored ) >+ { >+ if ( alignment == null ) >+ { >+ return CSSConstants.CSS_LEFT_VALUE; >+ } >+ if ( !mirrored ) >+ { >+ return alignment; >+ } >+ if ( CSSConstants.CSS_RIGHT_VALUE.equals( alignment ) ) >+ { >+ return CSSConstants.CSS_LEFT_VALUE; >+ } >+ if ( CSSConstants.CSS_LEFT_VALUE.equals( alignment ) ) >+ { >+ return CSSConstants.CSS_RIGHT_VALUE; >+ } >+ return alignment; >+ } >+ >+} >#P org.eclipse.birt.report.model >Index: src/org/eclipse/birt/report/model/api/metadata/IPropertyDefn.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/metadata/IPropertyDefn.java,v >retrieving revision 1.6 >diff -u -r1.6 IPropertyDefn.java >--- src/org/eclipse/birt/report/model/api/metadata/IPropertyDefn.java 3 Dec 2007 03:00:05 -0000 1.6 >+++ src/org/eclipse/birt/report/model/api/metadata/IPropertyDefn.java 1 Apr 2008 13:39:38 -0000 >@@ -55,6 +55,13 @@ > public static final int ODA_PROPERTY = 4; > > /** >+ * bidi_hcg: >+ * Type code for a property defined by a Bidi extension. >+ */ >+ >+ public static final int BIDI_PROPERTY = 5; >+ >+ /** > * Indicates whether this property is a list. It is useful only when the > * property type is a structure type. > * >@@ -163,6 +170,7 @@ > * <li>USER_PROPERTY</li> > * <li>STRUCT_PROPERTY</li> > * <li>EXTENSION_PROPERTY</li> >+ * <li>BIDI_PROPERTY</li> > * </ul> > * > * @return the type of this definition >Index: src/org/eclipse/birt/report/model/metadata/metadata.xsd >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/metadata/metadata.xsd,v >retrieving revision 1.14 >diff -u -r1.14 metadata.xsd >--- src/org/eclipse/birt/report/model/metadata/metadata.xsd 3 Dec 2007 03:00:04 -0000 1.14 >+++ src/org/eclipse/birt/report/model/metadata/metadata.xsd 1 Apr 2008 13:39:42 -0000 >@@ -281,6 +281,13 @@ > <xs:documentation>Valid only when defining the style element. Indicates that the property defines the style and should be propagated to any element that has a style. A property not marked as a style property is one that defines the style itself (such as the name) and does not propagate to an element.</xs:documentation> > </xs:annotation> > </xs:attribute> >+ <!-- bidi_hcg start --> >+ <xs:attribute name="isBidiProperty" type="xs:boolean" use="optional" default="false"> >+ <xs:annotation> >+ <xs:documentation>Indicates that the property is a bidirectional property and should be propagated when Bidi support is enabled.</xs:documentation> >+ </xs:annotation> >+ </xs:attribute> >+ <!-- bidi_hcg end --> > <xs:attribute name="detailType" type="xs:string" use="optional"/> > <xs:attribute name="valueRequired" type="xs:boolean" use="optional" default="false"/> > <xs:attribute name="isList" type="xs:boolean" use="optional" default="false"/> >Index: src/org/eclipse/birt/report/model/metadata/ElementDefn.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/metadata/ElementDefn.java,v >retrieving revision 1.40 >diff -u -r1.40 ElementDefn.java >--- src/org/eclipse/birt/report/model/metadata/ElementDefn.java 19 Dec 2007 05:31:48 -0000 1.40 >+++ src/org/eclipse/birt/report/model/metadata/ElementDefn.java 1 Apr 2008 13:39:41 -0000 >@@ -1669,6 +1669,13 @@ > if ( ( (PropertyDefn) propDefn ).isElementType( ) ) > return false; > >+ // bidi_hcg start >+ if ( propDefn.getValueType( ) == IPropertyDefn.BIDI_PROPERTY ) >+ // TODO: If Bidi is disabled, return false. >+ // For now, return true always. >+ return true; >+ // bidi_hcg end >+ > String visibility = getPropertyVisibility( propDefn.getName( ) ); > if ( HIDDEN_IN_PROPERTY_SHEET.equals( visibility ) ) > return false; >Index: src/org/eclipse/birt/report/model/metadata/MetaDataHandler.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/metadata/MetaDataHandler.java,v >retrieving revision 1.36 >diff -u -r1.36 MetaDataHandler.java >--- src/org/eclipse/birt/report/model/metadata/MetaDataHandler.java 3 Dec 2007 03:00:04 -0000 1.36 >+++ src/org/eclipse/birt/report/model/metadata/MetaDataHandler.java 1 Apr 2008 13:39:42 -0000 >@@ -104,6 +104,7 @@ > private static final String RUNTIME_SETTABLE_ATTRIB = "runtimeSettable"; //$NON-NLS-1$ > private static final String CONTEXT_ATTRIB = "context"; //$NON-NLS-1$ > private static final String MODULES_ATTRIB = "modules"; //$NON-NLS-1$ >+ private static final String IS_BIDI_PROPERTY_ATTRIB = "isBidiProperty"; //$NON-NLS-1$ // bidi_hcg > > private static final String THIS_KEYWORD = "this"; //$NON-NLS-1$ > >@@ -939,7 +940,12 @@ > detailName = null; > } > >- propDefn = new SystemPropertyDefn( ); >+ // bidi_hcg start >+ if ( getBooleanAttrib( attrs, IS_BIDI_PROPERTY_ATTRIB, false ) ) >+ propDefn = new BidiPropertyDefn( ); >+ else >+ // bidi_hcg end >+ propDefn = new SystemPropertyDefn( ); > > propDefn.setName( name ); > propDefn.setDisplayNameID( displayNameID ); >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.284 >diff -u -r1.284 Messages.properties >--- src/org/eclipse/birt/report/model/i18n/Messages.properties 25 Mar 2008 07:04:20 -0000 1.284 >+++ src/org/eclipse/birt/report/model/i18n/Messages.properties 1 Apr 2008 13:39:41 -0000 >@@ -632,7 +632,31 @@ > Choices.scalarParamType.simple=Simple > Choices.scalarParamType.multi-value=Multi Value > Choices.scalarParamType.ad-hoc=Ad-hoc >+ >+#bidi_hcg start >+#77. bidiLayoutOrientation >+Choices.bidiLayoutOrientation.rtl=Right To Left >+Choices.bidiLayoutOrientation.ltr=Left To Right > >+#78. Bidi text direction >+Choices.bidiTextDirection.rtl=Right To Left >+Choices.bidiTextDirection.ltr=Left To Right >+ >+#79. Data Set Bidi format >+Choices.dataSetBidiFormatOrientation.rtl=Right To Left >+Choices.dataSetBidiFormatOrientation.ltr=Left To Right >+Choices.dataSetBidiFormatOrientation.contextualrtl=Contextual Right To Left >+Choices.dataSetBidiFormatOrientation.contextualltr=Contextual Left To Right >+Choices.dataSetBidiFormatOrderingScheme.logical=Logical >+Choices.dataSetBidiFormatOrderingScheme.visual=Visual >+Choices.dataSetBidiFormatSymSwap.true =True >+Choices.dataSetBidiFormatSymSwap.false =False >+Choices.dataSetBidiFormatTextShaping.shaped=Shaped >+Choices.dataSetBidiFormatTextShaping.nominal=Nominal >+Choices.dataSetBidiFormatNumericShaping.national=National >+Choices.dataSetBidiFormatNumericShaping.nominal=Nominal >+Choices.dataSetBidiFormatNumericShaping.contextual=Contextual >+#bidi_hcg end > ########################################################### > # Classes > >@@ -1771,6 +1795,19 @@ > Class.BirtComp.anyOf.toolTip=whether value is in the following arguments > Class.BirtComp.anyOf.val=value > >+#bidi_hcg start >+#32 BidiUtils >+Class.BidiUtils=BidiUtils >+Class.BidiUtils.toolTip=Provides Bidi support >+Class.BidiUtils.performBidiTransformForataSetData=performBidiTransformForDataSetData >+Class.BidiUtils.performBidiTransformForDataSetData.toolTip=Performs Bidi transformation for DataSet data >+Class.BidiUtils.performBidiTransformForDataSetData.str=str >+Class.BidiUtils.bidiTransform=performBidiTransform >+Class.BidiUtils.bidiTransform.toolTip=Performs Bidi transformation from input Bidi format to Output Bidi format >+Class.BidiUtils.bidiTransform.str=str >+Class.BidiUtils.bidiTransform.inBidiFormatStr=inBidiFormat >+Class.BidiUtils.bidiTransform.outBidiFormatStr=outBidiFormat >+#bidi_hcg end > > ########################################################### > # Structures >@@ -2265,6 +2302,8 @@ > Element.ReportDesign.cheatSheet=Cheat sheet > Element.ReportDesign.thumbnail=Thumbnail > Element.ReportDesign.layoutPreference=Layout preference >+#bidi_hcg >+Element.ReportDesign.bidiLayoutOrientation=Bidi Layout Orientation > Element.ReportDesign.beforeFactory.toolTip=Called at the start of the Factory after the initialize( ) method and before opening the report document (if any) > Element.ReportDesign.afterFactory.toolTip=Called at the end of the Factory after closing the report document (if any). This is the last method called in the Factory > Element.ReportDesign.beforeOpenDoc.toolTip=Called just before opening the report document in the Factory >@@ -2478,6 +2517,8 @@ > Element.Style.showIfBlank=Show if blank > Element.Style.text=Text > Element.Style.text.align=Text alignment >+#bidi_hcg >+Element.Style.text.direction=Bidi text direction > Element.Style.text.indent=Text indent > Element.Style.text.transform=Text transform > Element.Style.verticalAlign=Vertical alignment >@@ -2932,6 +2973,23 @@ > Element.OdaDataSet.designerState=Designer state > Element.OdaDataSet.parameters=Data set parameters > Element.OdaDataSet.designerValues=Designer values >+#bidi_hcg start >+Element.OdaDataSet.bidiFormatStr=Bidi Format String >+Element.OdaDataSet.bidiFormatMetadataStr=Bidi Format Metadata String >+Element.OdaDataSet.bidiFormatContentStr=Bidi Format Content String >+Element.OdaDataSet.bidiFormatMetadata=Bidi Format Metadata >+Element.OdaDataSet.bidiFormatMetadata.orderingScheme=Ordering Scheme >+Element.OdaDataSet.bidiFormatMetadata.orientation=Text Direction >+Element.OdaDataSet.bidiFormatMetadata.symSwap=Symmetric Swapping >+Element.OdaDataSet.bidiFormatMetadata.textShaping=Text Shaping >+Element.OdaDataSet.bidiFormatMetadata.numericShaping=Numeric Shaping >+Element.OdaDataSet.bidiFormatContent=Bidi Format Content >+Element.OdaDataSet.bidiFormatContent.orderingScheme=Ordering Scheme >+Element.OdaDataSet.bidiFormatContent.orientation=Text Direction >+Element.OdaDataSet.bidiFormatContent.symSwap=Symmetric Swapping >+Element.OdaDataSet.bidiFormatContent.textShaping=Text Shaping >+Element.OdaDataSet.bidiFormatContent.numericShaping=Numeric Shaping >+#bidi_hcg end > > #37 DesignElement ( Prefix Element.DesignElement ) > Element.DesignElement.customXml=Custom XML >@@ -3511,6 +3569,8 @@ > Error.DesignParserException.INCONSISTENT_TEMPLATE_ELEMENT_TYPE=The template element {0} is inconsistent with the default element of the referred template parameter definition {1}. > Error.DesignParserException.MISSING_TEMPLATE_PARAMETER_DEFAULT=The element {0} must define a default element explicitly. > Error.DesignParserException.WRONG_SIMPLE_LIST_TYPE=No such an element property is simple list type. >+#bidi_hcg >+Error.DesignParserException.INVALID_DATASETBIDIFORMAT_ID=Bidi format {1} in the {0} is invalid. > > #DesignFileException > Error.DesignFileException.SYNTAX_ERROR=Syntax error found, and see error details. >Index: src/org/eclipse/birt/report/model/api/DesignElementHandle.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/DesignElementHandle.java,v >retrieving revision 1.99 >diff -u -r1.99 DesignElementHandle.java >--- src/org/eclipse/birt/report/model/api/DesignElementHandle.java 3 Mar 2008 07:22:19 -0000 1.99 >+++ src/org/eclipse/birt/report/model/api/DesignElementHandle.java 1 Apr 2008 13:39:37 -0000 >@@ -2883,4 +2883,29 @@ > getElement( ) ); > cmd.setEncryption( propName, encryptionID ); > } >+ >+ /** >+ * Examines whether the resolved direction of this design element is Right to Left or not. >+ * >+ * @return >+ * true if the direction is RTL, false otherwise >+ * >+ * @author bidi_hcg >+ * >+ */ >+ >+ public boolean isDirectionRTL( ) >+ { >+ /* >+ * TODO: Once text direction support is added, we will first check the >+ * direction style of this particular design element. If not set for >+ * this element and - inherently - for upper level elements (the >+ * direction style is inheritable), the direction will be decided based >+ * on another property - orientation - of the top-level container. For >+ * the time being, we only look at this top-level container. >+ */ >+ ModuleHandle root = getRoot( ); >+ return root != null && root.isDirectionRTL( ); >+ } >+ > } >\ No newline at end of file >Index: src/org/eclipse/birt/report/model/api/ReportDesignHandle.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ReportDesignHandle.java,v >retrieving revision 1.50 >diff -u -r1.50 ReportDesignHandle.java >--- src/org/eclipse/birt/report/model/api/ReportDesignHandle.java 21 Jan 2008 08:45:02 -0000 1.50 >+++ src/org/eclipse/birt/report/model/api/ReportDesignHandle.java 1 Apr 2008 13:39:38 -0000 >@@ -22,6 +22,7 @@ > import org.eclipse.birt.report.model.api.command.ContentException; > import org.eclipse.birt.report.model.api.command.NameException; > import org.eclipse.birt.report.model.api.css.CssStyleSheetHandle; >+import org.eclipse.birt.report.model.api.elements.DesignChoiceConstants; > import org.eclipse.birt.report.model.api.elements.structures.TOC; > import org.eclipse.birt.report.model.core.ContainerContext; > import org.eclipse.birt.report.model.core.DesignElement; >@@ -31,6 +32,7 @@ > import org.eclipse.birt.report.model.elements.ReportDesign; > import org.eclipse.birt.report.model.elements.interfaces.IReportDesignModel; > import org.eclipse.birt.report.model.elements.interfaces.IReportItemModel; >+import org.eclipse.birt.report.model.metadata.ElementPropertyDefn; > import org.eclipse.birt.report.model.util.LevelContentIterator; > import org.eclipse.birt.report.model.util.ModelUtil; > >@@ -898,4 +900,48 @@ > module, getElement( ) ); > adapter.reloadCss( sheetHandle ); > } >+ >+ /** >+ * Gets Bidi orientation value >+ * >+ * @return the Bidi orientation value >+ * >+ * @author bidi_hcg >+ */ >+ public String getBidiOrientation( ) >+ { >+ ElementPropertyDefn propDefn = (ElementPropertyDefn) getPropertyDefn( >+ IReportDesignModel.BIDI_ORIENTATION_PROP ); >+ >+ return (String) module.getLocalProperty( module, propDefn ); >+ } >+ >+ /** >+ * Sets Bidi orientation value >+ * >+ * @param bidiOrientation >+ * orientation value to be set >+ * >+ * @author bidi_hcg >+ */ >+ public void setBidiOrientation( String bidiOrientation ) throws SemanticException >+ { >+ ElementPropertyDefn propDefn = (ElementPropertyDefn) getPropertyDefn( >+ IReportDesignModel.BIDI_ORIENTATION_PROP ); >+ module.setProperty( propDefn, bidiOrientation ); >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.birt.report.model.api.DesignElementHandle#isDirectionRTL() >+ * >+ * @author bidi_hcg >+ */ >+ public boolean isDirectionRTL( ) >+ { >+ return DesignChoiceConstants.BIDI_ORIENTATION_RTL >+ .equals( getBidiOrientation( ) ); >+ } >+ > } >Index: src/org/eclipse/birt/report/model/api/PropertyHandle.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/PropertyHandle.java,v >retrieving revision 1.45 >diff -u -r1.45 PropertyHandle.java >--- src/org/eclipse/birt/report/model/api/PropertyHandle.java 20 Mar 2008 07:14:00 -0000 1.45 >+++ src/org/eclipse/birt/report/model/api/PropertyHandle.java 1 Apr 2008 13:39:37 -0000 >@@ -263,6 +263,7 @@ > case IPropertyDefn.SYSTEM_PROPERTY : > case IPropertyDefn.EXTENSION_PROPERTY : > case IPropertyDefn.ODA_PROPERTY : >+ case IPropertyDefn.BIDI_PROPERTY : // bidi_hcg > IElementDefn elementDefn = getElementHandle( ).getDefn( ); > if ( elementDefn.isPropertyReadOnly( propDefn.getName( ) ) ) > isReadOnly = true; >@@ -294,6 +295,7 @@ > case IPropertyDefn.SYSTEM_PROPERTY : > case IPropertyDefn.EXTENSION_PROPERTY : > case IPropertyDefn.ODA_PROPERTY : >+ case IPropertyDefn.BIDI_PROPERTY : // bidi_hcg > IElementDefn elementDefn = getElementHandle( ).getDefn( ); > if ( !elementDefn.isPropertyVisible( propDefn.getName( ) ) ) > isVisible = false; >Index: src/org/eclipse/birt/report/model/elements/interfaces/IReportDesignModel.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/interfaces/IReportDesignModel.java,v >retrieving revision 1.18 >diff -u -r1.18 IReportDesignModel.java >--- src/org/eclipse/birt/report/model/elements/interfaces/IReportDesignModel.java 15 Mar 2007 02:45:58 -0000 1.18 >+++ src/org/eclipse/birt/report/model/elements/interfaces/IReportDesignModel.java 1 Apr 2008 13:39:40 -0000 >@@ -126,4 +126,9 @@ > > public static final int SLOT_COUNT = 10; > >+ /** >+ * bidi_hcg: Bidi orientation property >+ */ >+ public static final String BIDI_ORIENTATION_PROP = "bidiLayoutOrientation"; //$NON-NLS-1$ >+ > } >Index: src/org/eclipse/birt/report/model/writer/ModuleWriter.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/ModuleWriter.java,v >retrieving revision 1.147 >diff -u -r1.147 ModuleWriter.java >--- src/org/eclipse/birt/report/model/writer/ModuleWriter.java 19 Mar 2008 07:18:53 -0000 1.147 >+++ src/org/eclipse/birt/report/model/writer/ModuleWriter.java 1 Apr 2008 13:39:43 -0000 >@@ -40,7 +40,6 @@ > import org.eclipse.birt.report.model.api.metadata.IChoice; > import org.eclipse.birt.report.model.api.metadata.IChoiceSet; > import org.eclipse.birt.report.model.api.metadata.IElementDefn; >-import org.eclipse.birt.report.model.api.metadata.IPropertyDefn; > import org.eclipse.birt.report.model.api.metadata.IPropertyType; > import org.eclipse.birt.report.model.api.metadata.IStructureDefn; > import org.eclipse.birt.report.model.api.metadata.UserChoice; >Index: src/org/eclipse/birt/report/model/writer/DesignWriter.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/DesignWriter.java,v >retrieving revision 1.52 >diff -u -r1.52 DesignWriter.java >--- src/org/eclipse/birt/report/model/writer/DesignWriter.java 31 Aug 2007 05:44:03 -0000 1.52 >+++ src/org/eclipse/birt/report/model/writer/DesignWriter.java 1 Apr 2008 13:39:42 -0000 >@@ -94,6 +94,9 @@ > property( obj, IDesignElementModel.EVENT_HANDLER_CLASS_PROP ); > property( obj, IReportDesignModel.LAYOUT_PREFERENCE_PROP ); > >+ // bidi_hcg: Bidi orientation property >+ property( obj, IReportDesignModel.BIDI_ORIENTATION_PROP ); >+ > // include libraries and scripts > > writeStructureList( obj, IModuleModel.LIBRARIES_PROP ); >@@ -177,4 +180,5 @@ > { > return design; > } >+ > } >\ No newline at end of file >Index: src/org/eclipse/birt/report/model/elements/rom.def >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/rom.def,v >retrieving revision 1.347 >diff -u -r1.347 rom.def >--- src/org/eclipse/birt/report/model/elements/rom.def 31 Mar 2008 08:32:51 -0000 1.347 >+++ src/org/eclipse/birt/report/model/elements/rom.def 1 Apr 2008 13:39:40 -0000 >@@ -131,6 +131,12 @@ > <ChoiceType name="margin"> > <Choice displayNameID="Choices.margine.auto" name="auto"/> > </ChoiceType> >+ <!-- bidi_hcg start --> >+ <ChoiceType name="bidiTextDirection"> >+ <Choice displayNameID="Choices.bidiTextDirection.ltr" name="Left To Right" displayName="Left To Right"/> >+ <Choice displayNameID="Choices.bidiTextDirection.rtl" name="Right To Left" displayName="Right To Left"/> >+ </ChoiceType> >+ <!-- bidi_hcg end --> > <ChoiceType name="textUnderline"> > <Choice displayNameID="Choices.textUnderline.none" name="none"/> > <Choice displayNameID="Choices.textUnderline.underline" name="underline"/> >@@ -558,6 +564,31 @@ > <Choice displayNameID="Choices.reportLayoutPreference.fixedLayout" name="fixed layout"/> > <Choice displayNameID="Choices.reportLayoutPreference.autoLayout" name="auto layout"/> > </ChoiceType> >+ <!-- bidi_hcg start --> >+ <ChoiceType name="bidiLayoutOrientation"> >+ <Choice displayNameID="Choices.bidiLayoutOrientation.rtl" name="Right To Left"/> >+ <Choice displayNameID="Choices.bidiLayoutOrientation.ltr" name="Left To Right"/> >+ </ChoiceType> >+ <ChoiceType name="dataSetBidiFormatOrientation"> >+ <Choice displayNameID="Choices.dataSetBidiFormatOrientation.rtl" name="Right To Left"/> >+ <Choice displayNameID="Choices.dataSetBidiFormatOrientation.ltr" name="Left To Right"/> >+ <Choice displayNameID="Choices.dataSetBidiFormatOrientation.contextualrtl" name="Contextual Right o Left"/> >+ <Choice displayNameID="Choices.dataSetBidiFormatOrientation.contextualltr" name=" Contextual Left To Right"/> >+ </ChoiceType> >+ <ChoiceType name="dataSetBidiFormatOrderingScheme"> >+ <Choice displayNameID="Choices.dataSetBidiFormatOrderingScheme.logical" name="Logical"/> >+ <Choice displayNameID="Choices.dataSetBidiFormatOrderingScheme.visual" name="Visual"/> >+ </ChoiceType> >+ <ChoiceType name="dataSetBidiFormatTextShaping"> >+ <Choice displayNameID="Choices.dataSetBidiFormatTextShaping.shaped" name="Shaped"/> >+ <Choice displayNameID="Choices.dataSetBidiFormatTextShaping.nominal" name="Nominal"/> >+ </ChoiceType> >+ <ChoiceType name="dataSetBidiFormatNumericShaping"> >+ <Choice displayNameID="Choices.dataSetBidiFormatNumericShaping.national" name="National"/> >+ <Choice displayNameID="Choices.dataSetBidiFormatNumericShaping.nominal" name="Nominal"/> >+ <Choice displayNameID="Choices.dataSetBidiFormatNumericShaping.contextual" name="Contextual"/> >+ </ChoiceType> >+ <!-- bidi_hcg end --> > <ChoiceType name="dateTimeLevelType"> > <Choice displayNameID="Choices.dateTimeLevelType.year" name="year"/> > <Choice displayNameID="Choices.dateTimeLevelType.quarter" name="quarter"/> >@@ -1265,6 +1296,15 @@ > <Argument name="seconds" tagID="Class.DateTimeSpan.subTime.seconds" type="number"/> > </Method> > </Class> >+ <!-- bidi_hcg start --> >+ <Class displayNameID="Class.BidiUtils" name="BidiUtils" toolTipID="Class.BidiUtils.toolTip"> >+ <Method displayNameID="Class.BidiUtils.bidiTransform" isStatic="true" name="bidiTransform" returnType="String" toolTipID="Class.BidiUtils.bidiTransform.toolTip"> >+ <Argument name="str" tagID="Class.BidiUtils.bidiTransform.str" type="String"/> >+ <Argument name="inBidiFormatStr" tagID="Class.BidiUtils.bidiTransform.inBidiFormatStr" type="String"/> >+ <Argument name="outBidiFormatStr" tagID="Class.BidiUtils.bidiTransform.outBidiFormatStr" type="String"/> >+ </Method> >+ </Class> >+ <!-- bidi_hcg end --> > <Class displayNameID="Class.Finance" name="Finance" toolTipID="Class.Finance.toolTip"> > <Method displayNameID="Class.Finance.sln" isStatic="true" name="sln" returnType="number" toolTipID="Class.Finance.sln.toolTip"> > <Argument name="initialCost" tagID="Class.Finance.sln.initialCost" type="number"/> >@@ -1908,6 +1948,11 @@ > <Property detailType="reportLayoutPreference" displayNameID="Element.ReportDesign.layoutPreference" name="layoutPreference" runtimeSettable="false" since="2.2" type="choice"> > <Default>auto layout</Default> > </Property> >+ <!-- bidi_hcg start --> >+ <Property isBidiProperty="true" detailType="bidiLayoutOrientation" displayNameID="Element.ReportDesign.bidiLayoutOrientation" name="bidiLayoutOrientation" runtimeSettable="true" since="2.3" type="choice"> >+ <Default>Left To Right</Default> >+ </Property> >+ <!-- bidi_hcg end --> > <Property canInherit="false" detailType="IncludedCssStyleSheet" displayNameID="Element.ReportDesign.cssStyleSheets" isList="true" name="cssStyleSheets" runtimeSettable="false" since="2.2" type="structure"/> > <Method context="startup" displayNameID="Element.ReportDesign.initialize" name="initialize" since="1.0" toolTipID="Element.ReportDesign.initialize.toolTip"> > <Argument name="reportContext" tagID="Element.ReportDesign.initialize.reportContext" type="org.eclipse.birt.report.engine.api.script.IReportContext"/> >@@ -2144,6 +2189,34 @@ > <Property detailType="ExtendedProperty" displayNameID="Element.OdaDataSet.privateDriverProperties" isList="true" name="privateDriverProperties" since="1.0" type="structure"/> > <Property detailType="OdaDesignerState" displayNameID="Element.OdaDataSet.designerState" name="designerState" since="2.1" type="structure"/> > <Property displayNameID="Element.OdaDataSet.designerValues" name="designerValues" since="2.1.1" type="xml"/> >+ <!-- bidi_hcg start --> >+ <Property isBidiProperty="true" displayNameID="Element.OdaDataSet.bidiFormatMetadataStr" name="dataSetMetadataBiDiFormatStr" since="2.3" type="string"/> >+ <Property isBidiProperty="true" displayNameID="Element.OdaDataSet.bidiFormatContentStr" name="dataSetContentBiDiFormatStr" since="2.3" type="string"/> >+ >+ <PropertyGroup displayNameID="Element.OdaDataSet.bidiFormatMetadata"> >+ <Property isBidiProperty="true" detailType="dataSetBidiFormatOrderingScheme" displayNameID="Element.OdaDataSet.bidiFormatMetadata.orderingScheme" name="bidiFormatMetadataOrderingScheme" runtimeSettable="false" since="2.3" type="choice"/> >+ <Property isBidiProperty="true" detailType="dataSetBidiFormatOrientation" displayNameID="Element.OdaDataSet.bidiFormatMetadata.orientation" name="bidiFormatMetadataOrientation" runtimeSettable="false" since="2.3" type="choice"/> >+ <Property isBidiProperty="true" displayNameID="Element.OdaDataSet.bidiFormatMetadata.symSwap" name="bidiFormatMetadataSymSwap" runtimeSettable="false" since="2.3" type="boolean"/> >+ <Property isBidiProperty="true" detailType="dataSetBidiFormatTextShaping" displayNameID="Element.OdaDataSet.bidiFormatMetadata.textShaping" name="bidiFormatMetadataTextShaping" runtimeSettable="false" since="2.3" type="choice"/> >+ <Property isBidiProperty="true" detailType="dataSetBidiFormatNumericShaping" displayNameID="Element.OdaDataSet.bidiFormatMetadata.numericShaping" name="bidiFormatMetadataNumericShaping" runtimeSettable="false" since="2.3" type="choice"/> >+ </PropertyGroup> >+ >+ <PropertyVisibility name="dataSetMetadataBiDiFormatStr" visibility="hide"/> >+ <PropertyVisibility name="bidiFormatMetadataOrderingScheme" visibility="readonly"/> >+ <PropertyVisibility name="bidiFormatMetadataOrientation" visibility="readonly"/> >+ <PropertyVisibility name="bidiFormatMetadataSymSwap" visibility="readonly"/> >+ <PropertyVisibility name="bidiFormatMetadataTextShaping" visibility="readonly"/> >+ <PropertyVisibility name="bidiFormatMetadataNumericShaping" visibility="readonly"/> >+ >+ <PropertyGroup displayNameID="Element.OdaDataSet.bidiFormatContent"> >+ <Property isBidiProperty="true" detailType="dataSetBidiFormatOrderingScheme" displayNameID="Element.OdaDataSet.bidiFormatContent.orderingScheme" name="bidiFormatContentOrderingScheme" runtimeSettable="false" since="2.3" type="choice"/> >+ <Property isBidiProperty="true" detailType="dataSetBidiFormatOrientation" displayNameID="Element.OdaDataSet.bidiFormatContent.orientation" name="bidiFormatContentOrientation" runtimeSettable="false" since="2.3" type="choice"/> >+ <Property isBidiProperty="true" displayNameID="Element.OdaDataSet.bidiFormatContent.symSwap" name="bidiFormatContentSymSwap" runtimeSettable="false" since="2.3" type="boolean"/> >+ <Property isBidiProperty="true" detailType="dataSetBidiFormatTextShaping" displayNameID="Element.OdaDataSet.bidiFormatContent.textShaping" name="bidiFormatContentTextShaping" runtimeSettable="false" since="2.3" type="choice"/> >+ <Property isBidiProperty="true" detailType="dataSetBidiFormatNumericShaping" displayNameID="Element.OdaDataSet.bidiFormatContent.numericShaping" name="bidiFormatContentNumericShaping" runtimeSettable="false" since="2.3" type="choice"/> >+ </PropertyGroup> >+ <PropertyVisibility name="dataSetContentBiDiFormatStr" visibility="hide"/> >+ <!-- bidi_hcg end --> > <PropertyVisibility name="extensionID" visibility="hide"/> > <PropertyVisibility name="resultSetName" visibility="hide"/> > <PropertyVisibility name="privateDriverProperties" visibility="hide"/> >@@ -2296,6 +2369,9 @@ > <Property detailType="textAlign" displayNameID="Element.Style.text.align" isStyleProperty="true" name="textAlign" since="1.0" type="choice"> > <!--Default>left</Default--> > </Property> >+ <!-- bidi_hcg --> >+ <Property isBidiProperty="true" detailType="bidiTextDirection" displayNameID="Element.Style.text.direction" isStyleProperty="true" name="bidiTextDirection" since="2.3" type="choice"> >+ </Property> > <Property displayNameID="Element.Style.text.indent" isStyleProperty="true" name="textIndent" since="1.0" type="dimension"> > <Default>0em</Default> > <DefaultUnit>em</DefaultUnit> >@@ -2601,6 +2677,9 @@ > <StyleProperty name="backgroundAttachment"/> > <StyleProperty name="backgroundPositionX"/> > <StyleProperty name="backgroundPositionY"/> >+ <!-- bidi_hcg start --> >+ <StyleProperty name="bidiTextDirection"/> >+ <!-- bidi_hcg end --> > <StyleProperty name="borderTopWidth"/> > <StyleProperty name="borderTopStyle"/> > <StyleProperty name="borderTopColor"/> >@@ -2677,6 +2756,9 @@ > <StyleProperty name="backgroundAttachment"/> > <StyleProperty name="backgroundPositionX"/> > <StyleProperty name="backgroundPositionY"/> >+ <!-- bidi_hcg start --> >+ <StyleProperty name="bidiTextDirection"/> >+ <!-- bidi_hcg end --> > <StyleProperty name="borderTopWidth"/> > <StyleProperty name="borderTopStyle"/> > <StyleProperty name="borderTopColor"/> >@@ -2772,6 +2854,9 @@ > <StyleProperty name="backgroundAttachment"/> > <StyleProperty name="backgroundPositionX"/> > <StyleProperty name="backgroundPositionY"/> >+ <!-- bidi_hcg start --> >+ <StyleProperty name="bidiTextDirection"/> >+ <!-- bidi_hcg end --> > <StyleProperty name="borderTopWidth"/> > <StyleProperty name="borderTopStyle"/> > <StyleProperty name="borderTopColor"/> >@@ -2852,6 +2937,9 @@ > <StyleProperty name="backgroundPositionY"/> > <StyleProperty name="backgroundRepeat"/> > <StyleProperty name="backgroundColor"/> >+ <!-- bidi_hcg start --> >+ <StyleProperty name="bidiTextDirection"/> >+ <!-- bidi_hcg end --> > <StyleProperty name="borderTopWidth"/> > <StyleProperty name="borderTopStyle"/> > <StyleProperty name="borderTopColor"/> >@@ -3154,6 +3242,9 @@ > <StyleProperty name="backgroundPositionX"/> > <StyleProperty name="backgroundPositionY"/> > <StyleProperty name="backgroundRepeat"/> >+ <!-- bidi_hcg start --> >+ <StyleProperty name="bidiTextDirection"/> >+ <!-- bidi_hcg end --> > <StyleProperty name="letterSpacing"/> > <StyleProperty name="lineHeight"/> > <StyleProperty name="textAlign"/> >@@ -3447,6 +3538,9 @@ > <StyleProperty name="backgroundPositionY"/> > <StyleProperty name="backgroundRepeat"/> > <StyleProperty name="backgroundColor"/> >+ <!-- bidi_hcg start --> >+ <StyleProperty name="bidiTextDirection"/> >+ <!-- bidi_hcg end --> > <StyleProperty name="borderTopWidth"/> > <StyleProperty name="borderTopStyle"/> > <StyleProperty name="borderTopColor"/> >Index: src/org/eclipse/birt/report/model/api/elements/DesignChoiceConstants.java >=================================================================== >RCS file: /cvsroot/birt/source/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/elements/DesignChoiceConstants.java,v >retrieving revision 1.55 >diff -u -r1.55 DesignChoiceConstants.java >--- src/org/eclipse/birt/report/model/api/elements/DesignChoiceConstants.java 15 Oct 2007 09:21:58 -0000 1.55 >+++ src/org/eclipse/birt/report/model/api/elements/DesignChoiceConstants.java 1 Apr 2008 13:39:38 -0000 >@@ -896,5 +896,19 @@ > public static final String SCALAR_PARAM_TYPE_SIMPLE = "simple"; //$NON-NLS-1$ > public static final String SCALAR_PARAM_TYPE_MULTI_VALUE = "multi-value"; //$NON-NLS-1$ > public static final String SCALAR_PARAM_TYPE_AD_HOC = "ad-hoc"; //$NON-NLS-1$ >+ >+ // bidi_hcg start >+ /** >+ * Report Bidi Orientation >+ */ >+ public static final String CHOICE_BIDI_ORIENTATION = "bidiLayoutOrientation"; //$NON-NLS-1$ >+ public static final String BIDI_ORIENTATION_RTL = "Right To Left"; //$NON-NLS-1$ >+ public static final String BIDI_ORIENTATION_LTR = "Left To Right"; //$NON-NLS-1$ >+ >+ /** >+ * Bidi text direction >+ */ >+ public static final String CHOICE_BIDI_DIRECTION = "bidiTextDirection"; //$NON-NLS-1$ >+ // bidi_hcg end > > }; >Index: src/org/eclipse/birt/report/model/metadata/BidiPropertyDefn.java >=================================================================== >RCS file: src/org/eclipse/birt/report/model/metadata/BidiPropertyDefn.java >diff -N src/org/eclipse/birt/report/model/metadata/BidiPropertyDefn.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/birt/report/model/metadata/BidiPropertyDefn.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,93 @@ >+/*********************************************************************** >+ * Copyright (c) 2004 Actuate Corporation. >+ * Copyright (c) 2008 IBM Corporation. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Actuate Corporation - initial API and implementation >+ * IBM Corporation >+ ***********************************************************************/ >+ >+package org.eclipse.birt.report.model.metadata; >+ >+import org.eclipse.birt.report.model.api.metadata.IPropertyDefn; >+import org.eclipse.birt.report.model.core.Module; >+import org.eclipse.birt.report.model.elements.interfaces.IReportDesignModel; >+ >+/** >+ * @author bidi_hcg >+ * >+ */ >+public class BidiPropertyDefn extends SystemPropertyDefn >+{ >+ /** >+ * >+ */ >+ public BidiPropertyDefn( ) >+ { >+ super( ); >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.birt.report.model.metadata.ElementPropertyDefn#isVisible() >+ */ >+ public boolean isVisible( ) >+ { >+ // TODO: return false if Bidi is disabled >+ return true; >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.birt.report.model.metadata.SystemPropertyDefn#getValueType() >+ */ >+ public int getValueType( ) >+ { >+ return IPropertyDefn.BIDI_PROPERTY; >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.birt.report.model.metadata.PropertyDefn#getXmlValue(org.eclipse.birt.report.model.core.Module, >+ * java.lang.Object) >+ */ >+ public String getXmlValue( Module module, Object value ) >+ { >+ String rv = super.getXmlValue( module, value ); >+ >+ if ( rv == null >+ && IReportDesignModel.BIDI_ORIENTATION_PROP.equals( name ) ) >+ return (String) defaultValue; >+ >+ return rv; >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.birt.report.model.metadata.PropertyDefn#isValueRequired() >+ */ >+ public boolean isValueRequired( ) >+ { >+ // TODO: return false if Bidi is disabled >+ return IReportDesignModel.BIDI_ORIENTATION_PROP.equals( name ); >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.birt.report.model.metadata.PropertyDefn#isSystemProperty() >+ */ >+ public boolean isSystemProperty( ) >+ { >+ return true; >+ } >+ >+}
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
Actions:
View
|
Diff
Attachments on
bug 225140
:
94390
|
95380
|
96055
|
96624