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 225140 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/birt/report/engine/layout/pdf/PDFReportLayoutEngine.java (-1 / +10 lines)
Lines 16-21 Link Here
16
16
17
import org.eclipse.birt.core.format.NumberFormatter;
17
import org.eclipse.birt.core.format.NumberFormatter;
18
import org.eclipse.birt.report.engine.api.IPDFRenderOption;
18
import org.eclipse.birt.report.engine.api.IPDFRenderOption;
19
import org.eclipse.birt.report.engine.api.IRenderOption;
19
import org.eclipse.birt.report.engine.content.Dimension;
20
import org.eclipse.birt.report.engine.content.Dimension;
20
import org.eclipse.birt.report.engine.content.IAutoTextContent;
21
import org.eclipse.birt.report.engine.content.IAutoTextContent;
21
import org.eclipse.birt.report.engine.content.IContent;
22
import org.eclipse.birt.report.engine.content.IContent;
Lines 28-34 Link Here
28
import org.eclipse.birt.report.engine.layout.ILayoutPageHandler;
29
import org.eclipse.birt.report.engine.layout.ILayoutPageHandler;
29
import org.eclipse.birt.report.engine.layout.IReportLayoutEngine;
30
import org.eclipse.birt.report.engine.layout.IReportLayoutEngine;
30
import org.eclipse.birt.report.engine.layout.PDFConstants;
31
import org.eclipse.birt.report.engine.layout.PDFConstants;
31
import org.eclipse.birt.report.engine.layout.area.IArea;
32
import org.eclipse.birt.report.engine.layout.area.impl.AbstractArea;
32
import org.eclipse.birt.report.engine.layout.area.impl.AbstractArea;
33
import org.eclipse.birt.report.engine.layout.area.impl.AreaFactory;
33
import org.eclipse.birt.report.engine.layout.area.impl.AreaFactory;
34
import org.eclipse.birt.report.engine.layout.pdf.text.Chunk;
34
import org.eclipse.birt.report.engine.layout.pdf.text.Chunk;
Lines 245-250 Link Here
245
				context.setBidiProcessing(false);
245
				context.setBidiProcessing(false);
246
			}
246
			}
247
		}
247
		}
248
		/*
249
		/*
250
		 * bidi_hcg: Only disable Bidi processing when the rtl flag is null,
251
		 * i.e. Bidi support is disabled.
252
		 */
253
		if ( options.get( IRenderOption.RTL_FLAG ) == null )
254
		{
255
			context.setBidiProcessing( false );
256
		}
248
	}
257
	}
249
	
258
	
250
	public void setOption(String name, Object value)
259
	public void setOption(String name, Object value)
(-)src/org/eclipse/birt/report/engine/parser/EngineIRVisitor.java (-2 / +4 lines)
Lines 2514-2520 Link Here
2514
			}
2514
			}
2515
			if ( value == null )
2515
			if ( value == null )
2516
			{
2516
			{
2517
				value = StylePropertyMapping.getDefaultValue( name );
2517
				// bidi_hcg added arg
2518
				value = StylePropertyMapping.getDefaultValue( name, this.handle );
2518
			}
2519
			}
2519
2520
2520
			inheritableReportStyle.setCssText( index, value == null
2521
			inheritableReportStyle.setCssText( index, value == null
Lines 2523-2529 Link Here
2523
		}
2524
		}
2524
		else
2525
		else
2525
		{
2526
		{
2526
			value = StylePropertyMapping.getDefaultValue( name );
2527
			// bidi_hcg added arg
2528
			value = StylePropertyMapping.getDefaultValue( name, this.handle );
2527
			nonInheritableReportStyle.setCssText( index, value == null
2529
			nonInheritableReportStyle.setCssText( index, value == null
2528
					? null
2530
					? null
2529
					: value.toString( ) );
2531
					: value.toString( ) );
(-)src/org/eclipse/birt/report/engine/parser/StylePropertyMapping.java (+22 lines)
Lines 15-20 Link Here
15
import java.util.Set;
15
import java.util.Set;
16
16
17
import org.eclipse.birt.report.engine.css.engine.StyleConstants;
17
import org.eclipse.birt.report.engine.css.engine.StyleConstants;
18
import org.eclipse.birt.report.engine.util.BidiAlignmentResolver;
19
import org.eclipse.birt.report.model.api.ReportDesignHandle;
18
import org.eclipse.birt.report.model.api.elements.ReportDesignConstants;
20
import org.eclipse.birt.report.model.api.elements.ReportDesignConstants;
19
import org.eclipse.birt.report.model.api.metadata.IElementDefn;
21
import org.eclipse.birt.report.model.api.metadata.IElementDefn;
20
import org.eclipse.birt.report.model.api.metadata.IElementPropertyDefn;
22
import org.eclipse.birt.report.model.api.metadata.IElementPropertyDefn;
Lines 137-142 Link Here
137
		return null;
139
		return null;
138
	}
140
	}
139
141
142
	/**
143
	 * @param name
144
	 * @param handle
145
	 * @return
146
	 * @author bidi_hcg
147
	 */
148
	public static Object getDefaultValue( String name, ReportDesignHandle handle )
149
	{
150
		Object value = getDefaultValue( name );
151
152
		if ( value == null && handle != null )
153
		{
154
			if ( IStyleModel.TEXT_ALIGN_PROP.equals( name ) )
155
				value = BidiAlignmentResolver.getDefaultAlignment( handle
156
						.getBidiOrientation( ) );
157
			// TODO: Handle default for the text direction property as well.
158
		}
159
		return value;
160
	}
161
140
	public static Object getDefaultValue( int index )
162
	public static Object getDefaultValue( int index )
141
	{
163
	{
142
		return getDefaultValue( nameMapping.get( new Integer( index ) ).toString( ) );
164
		return getDefaultValue( nameMapping.get( new Integer( index ) ).toString( ) );
(-)src/org/eclipse/birt/report/engine/api/IRenderOption.java (+7 lines)
Lines 34-39 Link Here
34
34
35
	public static final String LOCALE = "locale"; //$NON-NLS-1$
35
	public static final String LOCALE = "locale"; //$NON-NLS-1$
36
36
37
	/**
38
	 * bidi_hcg:
39
	 * Should we output report as RTL. The value is a Boolean Object, the
40
	 * default is <code>Boolean.FALSE</code>.
41
	 */
42
	public static final String RTL_FLAG = "RTLFlag"; //$NON-NLS-1$
43
37
	public static final String SUPPORTED_IMAGE_FORMATS = "supportedImageFormats";
44
	public static final String SUPPORTED_IMAGE_FORMATS = "supportedImageFormats";
38
45
39
	public static final String BASE_URL = "baseUrl";
46
	public static final String BASE_URL = "baseUrl";
(-)src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTValueConstants.java (+8 lines)
Lines 22-25 Link Here
22
	Value ALL_VALUE = new StringValue(CSSPrimitiveValue.CSS_IDENT, BIRTConstants.BIRT_ALL_VALUE);
22
	Value ALL_VALUE = new StringValue(CSSPrimitiveValue.CSS_IDENT, BIRTConstants.BIRT_ALL_VALUE);
23
	Value SOFT_VALUE = new StringValue(CSSPrimitiveValue.CSS_IDENT,
23
	Value SOFT_VALUE = new StringValue(CSSPrimitiveValue.CSS_IDENT,
24
			BIRTConstants.BIRT_SOFT_VALUE);
24
			BIRTConstants.BIRT_SOFT_VALUE);
25
26
	/**
27
	 * bidi_hcg: The 'Left To Right' and 'Right To Left' keywords.
28
	 */
29
	Value LEFT_TO_RIGHT_VALUE = new StringValue(CSSPrimitiveValue.CSS_IDENT,
30
			BIRTConstants.BIRT_LTR_VALUE);
31
	Value RIGHT_TO_LEFT_VALUE = new StringValue(CSSPrimitiveValue.CSS_IDENT,
32
			BIRTConstants.BIRT_RTL_VALUE);
25
}
33
}
(-)src/org/eclipse/birt/report/engine/css/engine/value/birt/BIRTConstants.java (+3 lines)
Lines 45-48 Link Here
45
	String BIRT_FALSE_VALUE = "false";
45
	String BIRT_FALSE_VALUE = "false";
46
	String BIRT_ALL_VALUE = "all";
46
	String BIRT_ALL_VALUE = "all";
47
	String BIRT_SOFT_VALUE = "soft";
47
	String BIRT_SOFT_VALUE = "soft";
48
49
	String BIRT_LTR_VALUE = "Left To Right"; // bidi_hcg
50
	String BIRT_RTL_VALUE = "Right To Left"; // bidi_hcg
48
}
51
}
(-)src/org/eclipse/birt/report/engine/api/impl/EngineTask.java (-8 / +16 lines)
Lines 1235-1248 Link Here
1235
						IPDFRenderOption.PDF_FONT_SUBSTITUTION,
1235
						IPDFRenderOption.PDF_FONT_SUBSTITUTION,
1236
						pdfFontSubstitution );
1236
						pdfFontSubstitution );
1237
			}
1237
			}
1238
			Object pdfBidiProcessing = renderOptions
1238
			/*
1239
					.getOption( IPDFRenderOption.PDF_BIDI_PROCESSING );
1239
			 * bidi_hcg:
1240
			if ( pdfBidiProcessing != null )
1240
			 */
1241
			{
1241
			layoutEngine.setOption( IRenderOption.RTL_FLAG, renderOptions
1242
				layoutEngine.setOption(
1242
					.getOption( IRenderOption.RTL_FLAG ) );
1243
						IPDFRenderOption.PDF_BIDI_PROCESSING,
1243
1244
						pdfBidiProcessing );
1244
			/*
1245
			}
1245
			 * pdfBidiProcessing is handled by
1246
			 * org.eclipse.birt.report.engine.layout.pdf.PDFReportLayoutEngine
1247
			 * #setupLayoutOptions
1248
			 * 
1249
			 * Object pdfBidiProcessing = renderOptions .getOption(
1250
			 * IPDFRenderOption.PDF_BIDI_PROCESSING ); if ( pdfBidiProcessing !=
1251
			 * null ) { layoutEngine.setOption(
1252
			 * IPDFRenderOption.PDF_BIDI_PROCESSING, pdfBidiProcessing ); }
1253
			 */
1246
		}
1254
		}
1247
		layoutEngine.setOption( TASK_TYPE,  new Integer(taskType));
1255
		layoutEngine.setOption( TASK_TYPE,  new Integer(taskType));
1248
		return layoutEngine;
1256
		return layoutEngine;
(-)src/org/eclipse/birt/report/engine/content/impl/ForeignContent.java (+1 lines)
Lines 127-132 Link Here
127
		String text = content == null ? "" : content.toString( ).trim( );
127
		String text = content == null ? "" : content.toString( ).trim( );
128
		if ( text.length( ) > 6 )
128
		if ( text.length( ) > 6 )
129
		{
129
		{
130
			// XXX bidi_hcg: can this can be <html ...> with attributes?
130
			if ( "<html>".equalsIgnoreCase( text.substring( 0, 6 ) ) )
131
			if ( "<html>".equalsIgnoreCase( text.substring( 0, 6 ) ) )
131
			{
132
			{
132
				return IForeignContent.HTML_TYPE;
133
				return IForeignContent.HTML_TYPE;
(-)src/org/eclipse/birt/report/engine/css/engine/BIRTPropertyManagerFactory.java (-1 / +3 lines)
Lines 61-69 Link Here
61
	{
61
	{
62
		vms = new ValueManager[PerfectHash.TOTAL_KEYWORDS];
62
		vms = new ValueManager[PerfectHash.TOTAL_KEYWORDS];
63
63
64
		// bidi_hcg: Leave this property blank to respect bidirectionality.
64
		vms[StyleConstants.STYLE_TEXT_ALIGN] = new TextAlignManager(
65
		vms[StyleConstants.STYLE_TEXT_ALIGN] = new TextAlignManager(
65
				CSSConstants.CSS_TEXT_ALIGN_PROPERTY,
66
				CSSConstants.CSS_TEXT_ALIGN_PROPERTY,
66
				CSSValueConstants.LEFT_VALUE );
67
				CSSValueConstants.NULL_STRING_VALUE );
68
				//.LEFT_VALUE );
67
		vms[StyleConstants.STYLE_TEXT_INDENT] = new LengthManager(
69
		vms[StyleConstants.STYLE_TEXT_INDENT] = new LengthManager(
68
				CSSConstants.CSS_TEXT_INDENT_PROPERTY, true,
70
				CSSConstants.CSS_TEXT_INDENT_PROPERTY, true,
69
				CSSValueConstants.NUMBER_0 );
71
				CSSValueConstants.NUMBER_0 );
(-)src/org/eclipse/birt/report/engine/util/BidiAlignmentResolver.java (+68 lines)
Added Link Here
1
/***********************************************************************
2
 * Copyright (c) 2008 IBM Corporation.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 * IBM Corporation - initial API and implementation
10
 ***********************************************************************/
11
12
package org.eclipse.birt.report.engine.util;
13
14
import org.eclipse.birt.report.engine.css.engine.value.css.CSSConstants;
15
import org.eclipse.birt.report.model.api.ReportDesignHandle;
16
import org.eclipse.birt.report.model.api.elements.DesignChoiceConstants;
17
18
/**
19
 * @author bidi_hcg
20
 * 
21
 */
22
public class BidiAlignmentResolver
23
{
24
	public static String resolveAlignment( ReportDesignHandle model )
25
	{
26
		if ( model != null )
27
		{
28
			return getDefaultAlignment( model.getBidiOrientation( ) );
29
		}
30
		return CSSConstants.CSS_LEFT_VALUE;
31
	}
32
33
	public static String getDefaultAlignment( boolean rtl )
34
	{
35
		if ( rtl )
36
			return CSSConstants.CSS_RIGHT_VALUE;
37
38
		return CSSConstants.CSS_LEFT_VALUE;
39
	}
40
41
	public static String getDefaultAlignment( String orientation )
42
	{
43
		return getDefaultAlignment( DesignChoiceConstants.BIDI_ORIENTATION_RTL
44
				.equals( orientation ) );
45
	}
46
47
	public static String resolveAlignment( String alignment, boolean mirrored )
48
	{
49
		if ( alignment == null )
50
		{
51
			return CSSConstants.CSS_LEFT_VALUE;
52
		}
53
		if ( !mirrored )
54
		{
55
			return alignment;
56
		}
57
		if ( CSSConstants.CSS_RIGHT_VALUE.equals( alignment ) )
58
		{
59
			return CSSConstants.CSS_LEFT_VALUE;
60
		}
61
		if ( CSSConstants.CSS_LEFT_VALUE.equals( alignment ) )
62
		{
63
			return CSSConstants.CSS_RIGHT_VALUE;
64
		}
65
		return alignment;
66
	}
67
68
}
(-)src/org/eclipse/birt/report/model/api/metadata/IPropertyDefn.java (+8 lines)
Lines 55-60 Link Here
55
	public static final int ODA_PROPERTY = 4;
55
	public static final int ODA_PROPERTY = 4;
56
56
57
	/**
57
	/**
58
	 * bidi_hcg:
59
	 * Type code for a property defined by a Bidi extension.
60
	 */
61
62
	public static final int BIDI_PROPERTY = 5;
63
64
	/**
58
	 * Indicates whether this property is a list. It is useful only when the
65
	 * Indicates whether this property is a list. It is useful only when the
59
	 * property type is a structure type.
66
	 * property type is a structure type.
60
	 * 
67
	 * 
Lines 163-168 Link Here
163
	 * <li>USER_PROPERTY</li>
170
	 * <li>USER_PROPERTY</li>
164
	 * <li>STRUCT_PROPERTY</li>
171
	 * <li>STRUCT_PROPERTY</li>
165
	 * <li>EXTENSION_PROPERTY</li>
172
	 * <li>EXTENSION_PROPERTY</li>
173
	 * <li>BIDI_PROPERTY</li>
166
	 * </ul>
174
	 * </ul>
167
	 * 
175
	 * 
168
	 * @return the type of this definition
176
	 * @return the type of this definition
(-)src/org/eclipse/birt/report/model/metadata/metadata.xsd (+7 lines)
Lines 281-286 Link Here
281
				<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>
281
				<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>
282
			</xs:annotation>
282
			</xs:annotation>
283
		</xs:attribute>
283
		</xs:attribute>
284
		<!-- bidi_hcg start -->
285
		<xs:attribute name="isBidiProperty" type="xs:boolean" use="optional" default="false">
286
			<xs:annotation>
287
				<xs:documentation>Indicates that the property is a bidirectional property and should be propagated when Bidi support is enabled.</xs:documentation>
288
			</xs:annotation>
289
		</xs:attribute>
290
		<!-- bidi_hcg end -->
284
		<xs:attribute name="detailType" type="xs:string" use="optional"/>
291
		<xs:attribute name="detailType" type="xs:string" use="optional"/>
285
		<xs:attribute name="valueRequired" type="xs:boolean" use="optional" default="false"/>
292
		<xs:attribute name="valueRequired" type="xs:boolean" use="optional" default="false"/>
286
		<xs:attribute name="isList" type="xs:boolean" use="optional" default="false"/>
293
		<xs:attribute name="isList" type="xs:boolean" use="optional" default="false"/>
(-)src/org/eclipse/birt/report/model/metadata/ElementDefn.java (+7 lines)
Lines 1669-1674 Link Here
1669
		if ( ( (PropertyDefn) propDefn ).isElementType( ) )
1669
		if ( ( (PropertyDefn) propDefn ).isElementType( ) )
1670
			return false;
1670
			return false;
1671
1671
1672
		// bidi_hcg start
1673
		if ( propDefn.getValueType( ) == IPropertyDefn.BIDI_PROPERTY )
1674
			// TODO: If Bidi is disabled, return false.
1675
			// For now, return true always.
1676
			return true;
1677
		// bidi_hcg end
1678
1672
		String visibility = getPropertyVisibility( propDefn.getName( ) );
1679
		String visibility = getPropertyVisibility( propDefn.getName( ) );
1673
		if ( HIDDEN_IN_PROPERTY_SHEET.equals( visibility ) )
1680
		if ( HIDDEN_IN_PROPERTY_SHEET.equals( visibility ) )
1674
			return false;
1681
			return false;
(-)src/org/eclipse/birt/report/model/metadata/MetaDataHandler.java (-1 / +7 lines)
Lines 104-109 Link Here
104
	private static final String RUNTIME_SETTABLE_ATTRIB = "runtimeSettable"; //$NON-NLS-1$
104
	private static final String RUNTIME_SETTABLE_ATTRIB = "runtimeSettable"; //$NON-NLS-1$
105
	private static final String CONTEXT_ATTRIB = "context"; //$NON-NLS-1$
105
	private static final String CONTEXT_ATTRIB = "context"; //$NON-NLS-1$
106
	private static final String MODULES_ATTRIB = "modules"; //$NON-NLS-1$
106
	private static final String MODULES_ATTRIB = "modules"; //$NON-NLS-1$
107
	private static final String IS_BIDI_PROPERTY_ATTRIB = "isBidiProperty"; //$NON-NLS-1$ // bidi_hcg 
107
108
108
	private static final String THIS_KEYWORD = "this"; //$NON-NLS-1$ 
109
	private static final String THIS_KEYWORD = "this"; //$NON-NLS-1$ 
109
110
Lines 939-945 Link Here
939
					detailName = null;
940
					detailName = null;
940
			}
941
			}
941
942
942
			propDefn = new SystemPropertyDefn( );
943
			// bidi_hcg start
944
			if ( getBooleanAttrib( attrs, IS_BIDI_PROPERTY_ATTRIB, false ) )
945
				propDefn = new BidiPropertyDefn( );
946
			else
947
			// bidi_hcg end
948
				propDefn = new SystemPropertyDefn( );
943
949
944
			propDefn.setName( name );
950
			propDefn.setName( name );
945
			propDefn.setDisplayNameID( displayNameID );
951
			propDefn.setDisplayNameID( displayNameID );
(-)src/org/eclipse/birt/report/model/i18n/Messages.properties (+60 lines)
Lines 632-638 Link Here
632
Choices.scalarParamType.simple=Simple
632
Choices.scalarParamType.simple=Simple
633
Choices.scalarParamType.multi-value=Multi Value
633
Choices.scalarParamType.multi-value=Multi Value
634
Choices.scalarParamType.ad-hoc=Ad-hoc
634
Choices.scalarParamType.ad-hoc=Ad-hoc
635
636
#bidi_hcg start
637
#77. bidiLayoutOrientation   
638
Choices.bidiLayoutOrientation.rtl=Right To Left
639
Choices.bidiLayoutOrientation.ltr=Left To Right
635
    
640
    
641
#78. Bidi text direction
642
Choices.bidiTextDirection.rtl=Right To Left
643
Choices.bidiTextDirection.ltr=Left To Right
644
645
#79. Data Set Bidi format
646
Choices.dataSetBidiFormatOrientation.rtl=Right To Left
647
Choices.dataSetBidiFormatOrientation.ltr=Left To Right
648
Choices.dataSetBidiFormatOrientation.contextualrtl=Contextual Right To Left
649
Choices.dataSetBidiFormatOrientation.contextualltr=Contextual Left To Right
650
Choices.dataSetBidiFormatOrderingScheme.logical=Logical
651
Choices.dataSetBidiFormatOrderingScheme.visual=Visual
652
Choices.dataSetBidiFormatSymSwap.true =True
653
Choices.dataSetBidiFormatSymSwap.false =False
654
Choices.dataSetBidiFormatTextShaping.shaped=Shaped
655
Choices.dataSetBidiFormatTextShaping.nominal=Nominal
656
Choices.dataSetBidiFormatNumericShaping.national=National
657
Choices.dataSetBidiFormatNumericShaping.nominal=Nominal
658
Choices.dataSetBidiFormatNumericShaping.contextual=Contextual
659
#bidi_hcg end
636
###########################################################
660
###########################################################
637
# Classes
661
# Classes
638
662
Lines 1771-1776 Link Here
1771
Class.BirtComp.anyOf.toolTip=whether value is in the following arguments
1795
Class.BirtComp.anyOf.toolTip=whether value is in the following arguments
1772
Class.BirtComp.anyOf.val=value
1796
Class.BirtComp.anyOf.val=value
1773
1797
1798
#bidi_hcg start
1799
#32 BidiUtils
1800
Class.BidiUtils=BidiUtils
1801
Class.BidiUtils.toolTip=Provides Bidi support
1802
Class.BidiUtils.performBidiTransformForataSetData=performBidiTransformForDataSetData
1803
Class.BidiUtils.performBidiTransformForDataSetData.toolTip=Performs Bidi transformation for DataSet data
1804
Class.BidiUtils.performBidiTransformForDataSetData.str=str
1805
Class.BidiUtils.bidiTransform=performBidiTransform
1806
Class.BidiUtils.bidiTransform.toolTip=Performs Bidi transformation from input Bidi format to Output Bidi format
1807
Class.BidiUtils.bidiTransform.str=str
1808
Class.BidiUtils.bidiTransform.inBidiFormatStr=inBidiFormat
1809
Class.BidiUtils.bidiTransform.outBidiFormatStr=outBidiFormat
1810
#bidi_hcg end
1774
1811
1775
###########################################################
1812
###########################################################
1776
# Structures
1813
# Structures
Lines 2265-2270 Link Here
2265
Element.ReportDesign.cheatSheet=Cheat sheet
2302
Element.ReportDesign.cheatSheet=Cheat sheet
2266
Element.ReportDesign.thumbnail=Thumbnail
2303
Element.ReportDesign.thumbnail=Thumbnail
2267
Element.ReportDesign.layoutPreference=Layout preference
2304
Element.ReportDesign.layoutPreference=Layout preference
2305
#bidi_hcg
2306
Element.ReportDesign.bidiLayoutOrientation=Bidi Layout Orientation
2268
Element.ReportDesign.beforeFactory.toolTip=Called at the start of the Factory after the initialize( ) method and before opening the report document (if any)
2307
Element.ReportDesign.beforeFactory.toolTip=Called at the start of the Factory after the initialize( ) method and before opening the report document (if any)
2269
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
2308
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
2270
Element.ReportDesign.beforeOpenDoc.toolTip=Called just before opening the report document in the Factory
2309
Element.ReportDesign.beforeOpenDoc.toolTip=Called just before opening the report document in the Factory
Lines 2478-2483 Link Here
2478
Element.Style.showIfBlank=Show if blank
2517
Element.Style.showIfBlank=Show if blank
2479
Element.Style.text=Text
2518
Element.Style.text=Text
2480
Element.Style.text.align=Text alignment
2519
Element.Style.text.align=Text alignment
2520
#bidi_hcg
2521
Element.Style.text.direction=Bidi text direction
2481
Element.Style.text.indent=Text indent
2522
Element.Style.text.indent=Text indent
2482
Element.Style.text.transform=Text transform
2523
Element.Style.text.transform=Text transform
2483
Element.Style.verticalAlign=Vertical alignment
2524
Element.Style.verticalAlign=Vertical alignment
Lines 2932-2937 Link Here
2932
Element.OdaDataSet.designerState=Designer state
2973
Element.OdaDataSet.designerState=Designer state
2933
Element.OdaDataSet.parameters=Data set parameters
2974
Element.OdaDataSet.parameters=Data set parameters
2934
Element.OdaDataSet.designerValues=Designer values
2975
Element.OdaDataSet.designerValues=Designer values
2976
#bidi_hcg start
2977
Element.OdaDataSet.bidiFormatStr=Bidi Format String
2978
Element.OdaDataSet.bidiFormatMetadataStr=Bidi Format Metadata String
2979
Element.OdaDataSet.bidiFormatContentStr=Bidi Format Content String
2980
Element.OdaDataSet.bidiFormatMetadata=Bidi Format Metadata
2981
Element.OdaDataSet.bidiFormatMetadata.orderingScheme=Ordering Scheme
2982
Element.OdaDataSet.bidiFormatMetadata.orientation=Text Direction
2983
Element.OdaDataSet.bidiFormatMetadata.symSwap=Symmetric Swapping
2984
Element.OdaDataSet.bidiFormatMetadata.textShaping=Text Shaping
2985
Element.OdaDataSet.bidiFormatMetadata.numericShaping=Numeric Shaping
2986
Element.OdaDataSet.bidiFormatContent=Bidi Format Content
2987
Element.OdaDataSet.bidiFormatContent.orderingScheme=Ordering Scheme
2988
Element.OdaDataSet.bidiFormatContent.orientation=Text Direction
2989
Element.OdaDataSet.bidiFormatContent.symSwap=Symmetric Swapping
2990
Element.OdaDataSet.bidiFormatContent.textShaping=Text Shaping
2991
Element.OdaDataSet.bidiFormatContent.numericShaping=Numeric Shaping
2992
#bidi_hcg end
2935
2993
2936
#37 DesignElement ( Prefix Element.DesignElement )
2994
#37 DesignElement ( Prefix Element.DesignElement )
2937
Element.DesignElement.customXml=Custom XML
2995
Element.DesignElement.customXml=Custom XML
Lines 3511-3516 Link Here
3511
Error.DesignParserException.INCONSISTENT_TEMPLATE_ELEMENT_TYPE=The template element {0} is inconsistent with the default element of the referred template parameter definition {1}.
3569
Error.DesignParserException.INCONSISTENT_TEMPLATE_ELEMENT_TYPE=The template element {0} is inconsistent with the default element of the referred template parameter definition {1}.
3512
Error.DesignParserException.MISSING_TEMPLATE_PARAMETER_DEFAULT=The element {0} must define a default element explicitly.
3570
Error.DesignParserException.MISSING_TEMPLATE_PARAMETER_DEFAULT=The element {0} must define a default element explicitly.
3513
Error.DesignParserException.WRONG_SIMPLE_LIST_TYPE=No such an element property is simple list type.
3571
Error.DesignParserException.WRONG_SIMPLE_LIST_TYPE=No such an element property is simple list type.
3572
#bidi_hcg
3573
Error.DesignParserException.INVALID_DATASETBIDIFORMAT_ID=Bidi format {1} in the {0} is invalid.
3514
3574
3515
#DesignFileException
3575
#DesignFileException
3516
Error.DesignFileException.SYNTAX_ERROR=Syntax error found, and see error details.
3576
Error.DesignFileException.SYNTAX_ERROR=Syntax error found, and see error details.
(-)src/org/eclipse/birt/report/model/api/DesignElementHandle.java (+25 lines)
Lines 2883-2886 Link Here
2883
				getElement( ) );
2883
				getElement( ) );
2884
		cmd.setEncryption( propName, encryptionID );
2884
		cmd.setEncryption( propName, encryptionID );
2885
	}
2885
	}
2886
2887
	/**
2888
	 * Examines whether the resolved direction of this design element is Right to Left or not.
2889
	 * 
2890
	 * @return
2891
	 *             true if the direction is RTL, false otherwise
2892
	 * 
2893
	 * @author bidi_hcg
2894
	 * 
2895
	 */
2896
2897
	public boolean isDirectionRTL( )
2898
	{
2899
		/*
2900
		 * TODO: Once text direction support is added, we will first check the
2901
		 * direction style of this particular design element. If not set for
2902
		 * this element and - inherently - for upper level elements (the
2903
		 * direction style is inheritable), the direction will be decided based
2904
		 * on another property - orientation - of the top-level container. For
2905
		 * the time being, we only look at this top-level container.
2906
		 */
2907
		ModuleHandle root = getRoot( );
2908
		return root != null && root.isDirectionRTL( );
2909
	}
2910
2886
}
2911
}
(-)src/org/eclipse/birt/report/model/api/ReportDesignHandle.java (+46 lines)
Lines 22-27 Link Here
22
import org.eclipse.birt.report.model.api.command.ContentException;
22
import org.eclipse.birt.report.model.api.command.ContentException;
23
import org.eclipse.birt.report.model.api.command.NameException;
23
import org.eclipse.birt.report.model.api.command.NameException;
24
import org.eclipse.birt.report.model.api.css.CssStyleSheetHandle;
24
import org.eclipse.birt.report.model.api.css.CssStyleSheetHandle;
25
import org.eclipse.birt.report.model.api.elements.DesignChoiceConstants;
25
import org.eclipse.birt.report.model.api.elements.structures.TOC;
26
import org.eclipse.birt.report.model.api.elements.structures.TOC;
26
import org.eclipse.birt.report.model.core.ContainerContext;
27
import org.eclipse.birt.report.model.core.ContainerContext;
27
import org.eclipse.birt.report.model.core.DesignElement;
28
import org.eclipse.birt.report.model.core.DesignElement;
Lines 31-36 Link Here
31
import org.eclipse.birt.report.model.elements.ReportDesign;
32
import org.eclipse.birt.report.model.elements.ReportDesign;
32
import org.eclipse.birt.report.model.elements.interfaces.IReportDesignModel;
33
import org.eclipse.birt.report.model.elements.interfaces.IReportDesignModel;
33
import org.eclipse.birt.report.model.elements.interfaces.IReportItemModel;
34
import org.eclipse.birt.report.model.elements.interfaces.IReportItemModel;
35
import org.eclipse.birt.report.model.metadata.ElementPropertyDefn;
34
import org.eclipse.birt.report.model.util.LevelContentIterator;
36
import org.eclipse.birt.report.model.util.LevelContentIterator;
35
import org.eclipse.birt.report.model.util.ModelUtil;
37
import org.eclipse.birt.report.model.util.ModelUtil;
36
38
Lines 898-901 Link Here
898
				module, getElement( ) );
900
				module, getElement( ) );
899
		adapter.reloadCss( sheetHandle );
901
		adapter.reloadCss( sheetHandle );
900
	}
902
	}
903
904
	/**
905
	 * Gets Bidi orientation value
906
	 * 
907
	 * @return the Bidi orientation value
908
	 * 
909
	 * @author bidi_hcg
910
	 */
911
	public String getBidiOrientation( )
912
	{
913
		ElementPropertyDefn propDefn = (ElementPropertyDefn) getPropertyDefn(
914
				IReportDesignModel.BIDI_ORIENTATION_PROP );
915
916
		return (String) module.getLocalProperty( module, propDefn );
917
	}
918
919
	/**
920
	 * Sets Bidi orientation value
921
	 * 
922
	 * @param bidiOrientation
923
	 *            orientation value to be set
924
	 * 
925
	 * @author bidi_hcg
926
	 */
927
	public void setBidiOrientation( String bidiOrientation ) throws SemanticException
928
	{
929
		ElementPropertyDefn propDefn = (ElementPropertyDefn) getPropertyDefn(
930
				IReportDesignModel.BIDI_ORIENTATION_PROP );
931
		module.setProperty( propDefn, bidiOrientation );
932
	}
933
934
	/*
935
	 * (non-Javadoc)
936
	 * 
937
	 * @see org.eclipse.birt.report.model.api.DesignElementHandle#isDirectionRTL()
938
	 * 
939
	 * @author bidi_hcg
940
	 */
941
	public boolean isDirectionRTL( )
942
	{
943
		return DesignChoiceConstants.BIDI_ORIENTATION_RTL
944
				.equals( getBidiOrientation( ) );
945
	}
946
901
}
947
}
(-)src/org/eclipse/birt/report/model/api/PropertyHandle.java (+2 lines)
Lines 263-268 Link Here
263
				case IPropertyDefn.SYSTEM_PROPERTY :
263
				case IPropertyDefn.SYSTEM_PROPERTY :
264
				case IPropertyDefn.EXTENSION_PROPERTY :
264
				case IPropertyDefn.EXTENSION_PROPERTY :
265
				case IPropertyDefn.ODA_PROPERTY :
265
				case IPropertyDefn.ODA_PROPERTY :
266
				case IPropertyDefn.BIDI_PROPERTY : // bidi_hcg
266
					IElementDefn elementDefn = getElementHandle( ).getDefn( );
267
					IElementDefn elementDefn = getElementHandle( ).getDefn( );
267
					if ( elementDefn.isPropertyReadOnly( propDefn.getName( ) ) )
268
					if ( elementDefn.isPropertyReadOnly( propDefn.getName( ) ) )
268
						isReadOnly = true;
269
						isReadOnly = true;
Lines 294-299 Link Here
294
			case IPropertyDefn.SYSTEM_PROPERTY :
295
			case IPropertyDefn.SYSTEM_PROPERTY :
295
			case IPropertyDefn.EXTENSION_PROPERTY :
296
			case IPropertyDefn.EXTENSION_PROPERTY :
296
			case IPropertyDefn.ODA_PROPERTY :
297
			case IPropertyDefn.ODA_PROPERTY :
298
			case IPropertyDefn.BIDI_PROPERTY : // bidi_hcg
297
				IElementDefn elementDefn = getElementHandle( ).getDefn( );
299
				IElementDefn elementDefn = getElementHandle( ).getDefn( );
298
				if ( !elementDefn.isPropertyVisible( propDefn.getName( ) ) )
300
				if ( !elementDefn.isPropertyVisible( propDefn.getName( ) ) )
299
					isVisible = false;
301
					isVisible = false;
(-)src/org/eclipse/birt/report/model/elements/interfaces/IReportDesignModel.java (+5 lines)
Lines 126-129 Link Here
126
126
127
	public static final int SLOT_COUNT = 10;
127
	public static final int SLOT_COUNT = 10;
128
128
129
	/**
130
	 * bidi_hcg: Bidi orientation property
131
	 */
132
	public static final String BIDI_ORIENTATION_PROP = "bidiLayoutOrientation"; //$NON-NLS-1$
133
129
}
134
}
(-)src/org/eclipse/birt/report/model/writer/ModuleWriter.java (-1 lines)
Lines 40-46 Link Here
40
import org.eclipse.birt.report.model.api.metadata.IChoice;
40
import org.eclipse.birt.report.model.api.metadata.IChoice;
41
import org.eclipse.birt.report.model.api.metadata.IChoiceSet;
41
import org.eclipse.birt.report.model.api.metadata.IChoiceSet;
42
import org.eclipse.birt.report.model.api.metadata.IElementDefn;
42
import org.eclipse.birt.report.model.api.metadata.IElementDefn;
43
import org.eclipse.birt.report.model.api.metadata.IPropertyDefn;
44
import org.eclipse.birt.report.model.api.metadata.IPropertyType;
43
import org.eclipse.birt.report.model.api.metadata.IPropertyType;
45
import org.eclipse.birt.report.model.api.metadata.IStructureDefn;
44
import org.eclipse.birt.report.model.api.metadata.IStructureDefn;
46
import org.eclipse.birt.report.model.api.metadata.UserChoice;
45
import org.eclipse.birt.report.model.api.metadata.UserChoice;
(-)src/org/eclipse/birt/report/model/writer/DesignWriter.java (+4 lines)
Lines 94-99 Link Here
94
		property( obj, IDesignElementModel.EVENT_HANDLER_CLASS_PROP );
94
		property( obj, IDesignElementModel.EVENT_HANDLER_CLASS_PROP );
95
		property( obj, IReportDesignModel.LAYOUT_PREFERENCE_PROP );
95
		property( obj, IReportDesignModel.LAYOUT_PREFERENCE_PROP );
96
96
97
		// bidi_hcg: Bidi orientation property
98
		property( obj, IReportDesignModel.BIDI_ORIENTATION_PROP );
99
97
		// include libraries and scripts
100
		// include libraries and scripts
98
101
99
		writeStructureList( obj, IModuleModel.LIBRARIES_PROP );
102
		writeStructureList( obj, IModuleModel.LIBRARIES_PROP );
Lines 177-180 Link Here
177
	{
180
	{
178
		return design;
181
		return design;
179
	}
182
	}
183
180
}
184
}
(-)src/org/eclipse/birt/report/model/elements/rom.def (+94 lines)
Lines 131-136 Link Here
131
  <ChoiceType name="margin">
131
  <ChoiceType name="margin">
132
    <Choice displayNameID="Choices.margine.auto" name="auto"/>
132
    <Choice displayNameID="Choices.margine.auto" name="auto"/>
133
  </ChoiceType>
133
  </ChoiceType>
134
  <!-- bidi_hcg start -->
135
  <ChoiceType name="bidiTextDirection">
136
    <Choice displayNameID="Choices.bidiTextDirection.ltr" name="Left To Right" displayName="Left To Right"/>
137
    <Choice displayNameID="Choices.bidiTextDirection.rtl" name="Right To Left" displayName="Right To Left"/>
138
  </ChoiceType>
139
  <!-- bidi_hcg end -->
134
  <ChoiceType name="textUnderline">
140
  <ChoiceType name="textUnderline">
135
    <Choice displayNameID="Choices.textUnderline.none" name="none"/>
141
    <Choice displayNameID="Choices.textUnderline.none" name="none"/>
136
    <Choice displayNameID="Choices.textUnderline.underline" name="underline"/>
142
    <Choice displayNameID="Choices.textUnderline.underline" name="underline"/>
Lines 558-563 Link Here
558
  	<Choice displayNameID="Choices.reportLayoutPreference.fixedLayout" name="fixed layout"/>
564
  	<Choice displayNameID="Choices.reportLayoutPreference.fixedLayout" name="fixed layout"/>
559
  	<Choice displayNameID="Choices.reportLayoutPreference.autoLayout" name="auto layout"/>
565
  	<Choice displayNameID="Choices.reportLayoutPreference.autoLayout" name="auto layout"/>
560
  </ChoiceType>
566
  </ChoiceType>
567
  <!-- bidi_hcg start -->
568
  <ChoiceType name="bidiLayoutOrientation">
569
  	<Choice displayNameID="Choices.bidiLayoutOrientation.rtl" name="Right To Left"/>
570
  	<Choice displayNameID="Choices.bidiLayoutOrientation.ltr" name="Left To Right"/>
571
  </ChoiceType>
572
  <ChoiceType name="dataSetBidiFormatOrientation">
573
  	<Choice displayNameID="Choices.dataSetBidiFormatOrientation.rtl" name="Right To Left"/>
574
  	<Choice displayNameID="Choices.dataSetBidiFormatOrientation.ltr" name="Left To Right"/>
575
  	<Choice displayNameID="Choices.dataSetBidiFormatOrientation.contextualrtl" name="Contextual Right o Left"/>
576
  	<Choice displayNameID="Choices.dataSetBidiFormatOrientation.contextualltr" name=" Contextual Left To Right"/>
577
  </ChoiceType>
578
  <ChoiceType name="dataSetBidiFormatOrderingScheme">
579
  	<Choice displayNameID="Choices.dataSetBidiFormatOrderingScheme.logical" name="Logical"/>
580
  	<Choice displayNameID="Choices.dataSetBidiFormatOrderingScheme.visual" name="Visual"/>
581
  </ChoiceType>
582
  <ChoiceType name="dataSetBidiFormatTextShaping">
583
  	<Choice displayNameID="Choices.dataSetBidiFormatTextShaping.shaped" name="Shaped"/>
584
  	<Choice displayNameID="Choices.dataSetBidiFormatTextShaping.nominal" name="Nominal"/>
585
  </ChoiceType>
586
  <ChoiceType name="dataSetBidiFormatNumericShaping">
587
  	<Choice displayNameID="Choices.dataSetBidiFormatNumericShaping.national" name="National"/>
588
  	<Choice displayNameID="Choices.dataSetBidiFormatNumericShaping.nominal" name="Nominal"/>
589
  	<Choice displayNameID="Choices.dataSetBidiFormatNumericShaping.contextual" name="Contextual"/>
590
  </ChoiceType>
591
  <!-- bidi_hcg end -->
561
  <ChoiceType name="dateTimeLevelType">
592
  <ChoiceType name="dateTimeLevelType">
562
	<Choice displayNameID="Choices.dateTimeLevelType.year" name="year"/>
593
	<Choice displayNameID="Choices.dateTimeLevelType.year" name="year"/>
563
	<Choice displayNameID="Choices.dateTimeLevelType.quarter" name="quarter"/>
594
	<Choice displayNameID="Choices.dateTimeLevelType.quarter" name="quarter"/>
Lines 1265-1270 Link Here
1265
		<Argument name="seconds" tagID="Class.DateTimeSpan.subTime.seconds" type="number"/>									
1296
		<Argument name="seconds" tagID="Class.DateTimeSpan.subTime.seconds" type="number"/>									
1266
	</Method>	
1297
	</Method>	
1267
  </Class>
1298
  </Class>
1299
  <!-- bidi_hcg start -->
1300
  <Class displayNameID="Class.BidiUtils" name="BidiUtils" toolTipID="Class.BidiUtils.toolTip">	
1301
	<Method displayNameID="Class.BidiUtils.bidiTransform" isStatic="true" name="bidiTransform" returnType="String" toolTipID="Class.BidiUtils.bidiTransform.toolTip">
1302
		<Argument name="str" tagID="Class.BidiUtils.bidiTransform.str" type="String"/>	
1303
		<Argument name="inBidiFormatStr" tagID="Class.BidiUtils.bidiTransform.inBidiFormatStr" type="String"/>	
1304
		<Argument name="outBidiFormatStr" tagID="Class.BidiUtils.bidiTransform.outBidiFormatStr" type="String"/>	
1305
	</Method>
1306
  </Class>
1307
  <!-- bidi_hcg end -->
1268
  <Class displayNameID="Class.Finance" name="Finance" toolTipID="Class.Finance.toolTip">	
1308
  <Class displayNameID="Class.Finance" name="Finance" toolTipID="Class.Finance.toolTip">	
1269
	<Method displayNameID="Class.Finance.sln" isStatic="true" name="sln" returnType="number" toolTipID="Class.Finance.sln.toolTip">
1309
	<Method displayNameID="Class.Finance.sln" isStatic="true" name="sln" returnType="number" toolTipID="Class.Finance.sln.toolTip">
1270
		<Argument name="initialCost" tagID="Class.Finance.sln.initialCost" type="number"/>
1310
		<Argument name="initialCost" tagID="Class.Finance.sln.initialCost" type="number"/>
Lines 1908-1913 Link Here
1908
    <Property detailType="reportLayoutPreference" displayNameID="Element.ReportDesign.layoutPreference" name="layoutPreference" runtimeSettable="false" since="2.2" type="choice">
1948
    <Property detailType="reportLayoutPreference" displayNameID="Element.ReportDesign.layoutPreference" name="layoutPreference" runtimeSettable="false" since="2.2" type="choice">
1909
	  <Default>auto layout</Default>	
1949
	  <Default>auto layout</Default>	
1910
    </Property>
1950
    </Property>
1951
    <!-- bidi_hcg start -->
1952
    <Property isBidiProperty="true" detailType="bidiLayoutOrientation" displayNameID="Element.ReportDesign.bidiLayoutOrientation" name="bidiLayoutOrientation" runtimeSettable="true" since="2.3" type="choice">
1953
	  <Default>Left To Right</Default>	
1954
    </Property>
1955
    <!-- bidi_hcg end -->
1911
    <Property canInherit="false" detailType="IncludedCssStyleSheet" displayNameID="Element.ReportDesign.cssStyleSheets" isList="true" name="cssStyleSheets" runtimeSettable="false" since="2.2" type="structure"/>
1956
    <Property canInherit="false" detailType="IncludedCssStyleSheet" displayNameID="Element.ReportDesign.cssStyleSheets" isList="true" name="cssStyleSheets" runtimeSettable="false" since="2.2" type="structure"/>
1912
    <Method context="startup" displayNameID="Element.ReportDesign.initialize" name="initialize" since="1.0" toolTipID="Element.ReportDesign.initialize.toolTip">
1957
    <Method context="startup" displayNameID="Element.ReportDesign.initialize" name="initialize" since="1.0" toolTipID="Element.ReportDesign.initialize.toolTip">
1913
		<Argument name="reportContext" tagID="Element.ReportDesign.initialize.reportContext" type="org.eclipse.birt.report.engine.api.script.IReportContext"/>
1958
		<Argument name="reportContext" tagID="Element.ReportDesign.initialize.reportContext" type="org.eclipse.birt.report.engine.api.script.IReportContext"/>
Lines 2144-2149 Link Here
2144
    <Property detailType="ExtendedProperty" displayNameID="Element.OdaDataSet.privateDriverProperties" isList="true" name="privateDriverProperties" since="1.0" type="structure"/>
2189
    <Property detailType="ExtendedProperty" displayNameID="Element.OdaDataSet.privateDriverProperties" isList="true" name="privateDriverProperties" since="1.0" type="structure"/>
2145
    <Property detailType="OdaDesignerState" displayNameID="Element.OdaDataSet.designerState" name="designerState" since="2.1" type="structure"/>    
2190
    <Property detailType="OdaDesignerState" displayNameID="Element.OdaDataSet.designerState" name="designerState" since="2.1" type="structure"/>    
2146
    <Property displayNameID="Element.OdaDataSet.designerValues" name="designerValues" since="2.1.1" type="xml"/>    
2191
    <Property displayNameID="Element.OdaDataSet.designerValues" name="designerValues" since="2.1.1" type="xml"/>    
2192
    <!-- bidi_hcg start -->
2193
    <Property isBidiProperty="true" displayNameID="Element.OdaDataSet.bidiFormatMetadataStr" name="dataSetMetadataBiDiFormatStr" since="2.3" type="string"/>
2194
    <Property isBidiProperty="true" displayNameID="Element.OdaDataSet.bidiFormatContentStr" name="dataSetContentBiDiFormatStr" since="2.3" type="string"/>
2195
2196
    <PropertyGroup displayNameID="Element.OdaDataSet.bidiFormatMetadata">
2197
      <Property isBidiProperty="true" detailType="dataSetBidiFormatOrderingScheme" displayNameID="Element.OdaDataSet.bidiFormatMetadata.orderingScheme" name="bidiFormatMetadataOrderingScheme" runtimeSettable="false" since="2.3" type="choice"/>
2198
      <Property isBidiProperty="true" detailType="dataSetBidiFormatOrientation" displayNameID="Element.OdaDataSet.bidiFormatMetadata.orientation" name="bidiFormatMetadataOrientation" runtimeSettable="false" since="2.3" type="choice"/>
2199
      <Property isBidiProperty="true" displayNameID="Element.OdaDataSet.bidiFormatMetadata.symSwap" name="bidiFormatMetadataSymSwap" runtimeSettable="false" since="2.3" type="boolean"/>
2200
      <Property isBidiProperty="true" detailType="dataSetBidiFormatTextShaping" displayNameID="Element.OdaDataSet.bidiFormatMetadata.textShaping" name="bidiFormatMetadataTextShaping" runtimeSettable="false" since="2.3" type="choice"/>
2201
      <Property isBidiProperty="true" detailType="dataSetBidiFormatNumericShaping" displayNameID="Element.OdaDataSet.bidiFormatMetadata.numericShaping" name="bidiFormatMetadataNumericShaping" runtimeSettable="false" since="2.3" type="choice"/>
2202
    </PropertyGroup>
2203
2204
    <PropertyVisibility name="dataSetMetadataBiDiFormatStr" visibility="hide"/>	
2205
    <PropertyVisibility name="bidiFormatMetadataOrderingScheme" visibility="readonly"/>
2206
    <PropertyVisibility name="bidiFormatMetadataOrientation" visibility="readonly"/>
2207
    <PropertyVisibility name="bidiFormatMetadataSymSwap" visibility="readonly"/>
2208
    <PropertyVisibility name="bidiFormatMetadataTextShaping" visibility="readonly"/>
2209
    <PropertyVisibility name="bidiFormatMetadataNumericShaping" visibility="readonly"/>
2210
2211
    <PropertyGroup displayNameID="Element.OdaDataSet.bidiFormatContent">
2212
      <Property isBidiProperty="true" detailType="dataSetBidiFormatOrderingScheme" displayNameID="Element.OdaDataSet.bidiFormatContent.orderingScheme" name="bidiFormatContentOrderingScheme" runtimeSettable="false" since="2.3" type="choice"/>
2213
      <Property isBidiProperty="true" detailType="dataSetBidiFormatOrientation" displayNameID="Element.OdaDataSet.bidiFormatContent.orientation" name="bidiFormatContentOrientation" runtimeSettable="false" since="2.3" type="choice"/>
2214
      <Property isBidiProperty="true" displayNameID="Element.OdaDataSet.bidiFormatContent.symSwap" name="bidiFormatContentSymSwap" runtimeSettable="false" since="2.3" type="boolean"/>
2215
      <Property isBidiProperty="true" detailType="dataSetBidiFormatTextShaping" displayNameID="Element.OdaDataSet.bidiFormatContent.textShaping" name="bidiFormatContentTextShaping" runtimeSettable="false" since="2.3" type="choice"/>
2216
      <Property isBidiProperty="true" detailType="dataSetBidiFormatNumericShaping" displayNameID="Element.OdaDataSet.bidiFormatContent.numericShaping" name="bidiFormatContentNumericShaping" runtimeSettable="false" since="2.3" type="choice"/>
2217
    </PropertyGroup>
2218
    <PropertyVisibility name="dataSetContentBiDiFormatStr" visibility="hide"/>	
2219
    <!-- bidi_hcg end -->
2147
    <PropertyVisibility name="extensionID" visibility="hide"/>
2220
    <PropertyVisibility name="extensionID" visibility="hide"/>
2148
    <PropertyVisibility name="resultSetName" visibility="hide"/>
2221
    <PropertyVisibility name="resultSetName" visibility="hide"/>
2149
    <PropertyVisibility name="privateDriverProperties" visibility="hide"/>
2222
    <PropertyVisibility name="privateDriverProperties" visibility="hide"/>
Lines 2296-2301 Link Here
2296
      <Property detailType="textAlign" displayNameID="Element.Style.text.align" isStyleProperty="true" name="textAlign" since="1.0" type="choice">
2369
      <Property detailType="textAlign" displayNameID="Element.Style.text.align" isStyleProperty="true" name="textAlign" since="1.0" type="choice">
2297
        <!--Default>left</Default-->
2370
        <!--Default>left</Default-->
2298
      </Property>
2371
      </Property>
2372
      <!-- bidi_hcg -->
2373
      <Property isBidiProperty="true" detailType="bidiTextDirection" displayNameID="Element.Style.text.direction" isStyleProperty="true" name="bidiTextDirection" since="2.3" type="choice">
2374
      </Property>
2299
      <Property displayNameID="Element.Style.text.indent" isStyleProperty="true" name="textIndent" since="1.0" type="dimension">
2375
      <Property displayNameID="Element.Style.text.indent" isStyleProperty="true" name="textIndent" since="1.0" type="dimension">
2300
        <Default>0em</Default>
2376
        <Default>0em</Default>
2301
        <DefaultUnit>em</DefaultUnit>
2377
        <DefaultUnit>em</DefaultUnit>
Lines 2601-2606 Link Here
2601
    <StyleProperty name="backgroundAttachment"/>
2677
    <StyleProperty name="backgroundAttachment"/>
2602
    <StyleProperty name="backgroundPositionX"/>
2678
    <StyleProperty name="backgroundPositionX"/>
2603
    <StyleProperty name="backgroundPositionY"/>
2679
    <StyleProperty name="backgroundPositionY"/>
2680
    <!-- bidi_hcg start -->
2681
    <StyleProperty name="bidiTextDirection"/>
2682
    <!-- bidi_hcg end -->
2604
    <StyleProperty name="borderTopWidth"/>
2683
    <StyleProperty name="borderTopWidth"/>
2605
    <StyleProperty name="borderTopStyle"/>
2684
    <StyleProperty name="borderTopStyle"/>
2606
    <StyleProperty name="borderTopColor"/>
2685
    <StyleProperty name="borderTopColor"/>
Lines 2677-2682 Link Here
2677
    <StyleProperty name="backgroundAttachment"/>
2756
    <StyleProperty name="backgroundAttachment"/>
2678
    <StyleProperty name="backgroundPositionX"/>
2757
    <StyleProperty name="backgroundPositionX"/>
2679
    <StyleProperty name="backgroundPositionY"/>
2758
    <StyleProperty name="backgroundPositionY"/>
2759
    <!-- bidi_hcg start -->
2760
    <StyleProperty name="bidiTextDirection"/>
2761
    <!-- bidi_hcg end -->
2680
    <StyleProperty name="borderTopWidth"/>
2762
    <StyleProperty name="borderTopWidth"/>
2681
    <StyleProperty name="borderTopStyle"/>
2763
    <StyleProperty name="borderTopStyle"/>
2682
    <StyleProperty name="borderTopColor"/>
2764
    <StyleProperty name="borderTopColor"/>
Lines 2772-2777 Link Here
2772
    <StyleProperty name="backgroundAttachment"/>
2854
    <StyleProperty name="backgroundAttachment"/>
2773
    <StyleProperty name="backgroundPositionX"/>
2855
    <StyleProperty name="backgroundPositionX"/>
2774
    <StyleProperty name="backgroundPositionY"/>
2856
    <StyleProperty name="backgroundPositionY"/>
2857
    <!-- bidi_hcg start -->
2858
    <StyleProperty name="bidiTextDirection"/>
2859
    <!-- bidi_hcg end -->
2775
    <StyleProperty name="borderTopWidth"/>
2860
    <StyleProperty name="borderTopWidth"/>
2776
    <StyleProperty name="borderTopStyle"/>
2861
    <StyleProperty name="borderTopStyle"/>
2777
    <StyleProperty name="borderTopColor"/>
2862
    <StyleProperty name="borderTopColor"/>
Lines 2852-2857 Link Here
2852
    <StyleProperty name="backgroundPositionY"/>
2937
    <StyleProperty name="backgroundPositionY"/>
2853
    <StyleProperty name="backgroundRepeat"/>
2938
    <StyleProperty name="backgroundRepeat"/>
2854
    <StyleProperty name="backgroundColor"/>
2939
    <StyleProperty name="backgroundColor"/>
2940
    <!-- bidi_hcg start -->
2941
    <StyleProperty name="bidiTextDirection"/>
2942
    <!-- bidi_hcg end -->
2855
    <StyleProperty name="borderTopWidth"/>
2943
    <StyleProperty name="borderTopWidth"/>
2856
    <StyleProperty name="borderTopStyle"/>
2944
    <StyleProperty name="borderTopStyle"/>
2857
    <StyleProperty name="borderTopColor"/>
2945
    <StyleProperty name="borderTopColor"/>
Lines 3154-3159 Link Here
3154
    <StyleProperty name="backgroundPositionX"/>
3242
    <StyleProperty name="backgroundPositionX"/>
3155
    <StyleProperty name="backgroundPositionY"/>
3243
    <StyleProperty name="backgroundPositionY"/>
3156
    <StyleProperty name="backgroundRepeat"/>
3244
    <StyleProperty name="backgroundRepeat"/>
3245
    <!-- bidi_hcg start -->
3246
    <StyleProperty name="bidiTextDirection"/>
3247
    <!-- bidi_hcg end -->
3157
    <StyleProperty name="letterSpacing"/>
3248
    <StyleProperty name="letterSpacing"/>
3158
    <StyleProperty name="lineHeight"/>
3249
    <StyleProperty name="lineHeight"/>
3159
    <StyleProperty name="textAlign"/>
3250
    <StyleProperty name="textAlign"/>
Lines 3447-3452 Link Here
3447
    <StyleProperty name="backgroundPositionY"/>
3538
    <StyleProperty name="backgroundPositionY"/>
3448
    <StyleProperty name="backgroundRepeat"/>
3539
    <StyleProperty name="backgroundRepeat"/>
3449
    <StyleProperty name="backgroundColor"/>
3540
    <StyleProperty name="backgroundColor"/>
3541
    <!-- bidi_hcg start -->
3542
    <StyleProperty name="bidiTextDirection"/>
3543
    <!-- bidi_hcg end -->
3450
    <StyleProperty name="borderTopWidth"/>
3544
    <StyleProperty name="borderTopWidth"/>
3451
    <StyleProperty name="borderTopStyle"/>
3545
    <StyleProperty name="borderTopStyle"/>
3452
    <StyleProperty name="borderTopColor"/>
3546
    <StyleProperty name="borderTopColor"/>
(-)src/org/eclipse/birt/report/model/api/elements/DesignChoiceConstants.java (+14 lines)
Lines 896-900 Link Here
896
	public static final String SCALAR_PARAM_TYPE_SIMPLE = "simple"; //$NON-NLS-1$
896
	public static final String SCALAR_PARAM_TYPE_SIMPLE = "simple"; //$NON-NLS-1$
897
	public static final String SCALAR_PARAM_TYPE_MULTI_VALUE = "multi-value"; //$NON-NLS-1$
897
	public static final String SCALAR_PARAM_TYPE_MULTI_VALUE = "multi-value"; //$NON-NLS-1$
898
	public static final String SCALAR_PARAM_TYPE_AD_HOC = "ad-hoc"; //$NON-NLS-1$
898
	public static final String SCALAR_PARAM_TYPE_AD_HOC = "ad-hoc"; //$NON-NLS-1$
899
	
900
	// bidi_hcg start
901
	/**
902
	 * Report Bidi Orientation
903
	 */
904
	public static final String CHOICE_BIDI_ORIENTATION = "bidiLayoutOrientation"; //$NON-NLS-1$
905
	public static final String BIDI_ORIENTATION_RTL = "Right To Left"; //$NON-NLS-1$
906
	public static final String BIDI_ORIENTATION_LTR = "Left To Right"; //$NON-NLS-1$
907
908
	/**
909
	 * Bidi text direction
910
	 */
911
	public static final String CHOICE_BIDI_DIRECTION = "bidiTextDirection"; //$NON-NLS-1$
912
	// bidi_hcg end
899
913
900
};
914
};
(-)src/org/eclipse/birt/report/model/metadata/BidiPropertyDefn.java (+93 lines)
Added Link Here
1
/***********************************************************************
2
 * Copyright (c) 2004 Actuate Corporation.
3
 * Copyright (c) 2008 IBM Corporation.
4
 * All rights reserved. This program and the accompanying materials
5
 * are made available under the terms of the Eclipse Public License v1.0
6
 * which accompanies this distribution, and is available at
7
 * http://www.eclipse.org/legal/epl-v10.html
8
 *
9
 * Contributors:
10
 *  Actuate Corporation  - initial API and implementation
11
 * 	IBM Corporation
12
 ***********************************************************************/
13
14
package org.eclipse.birt.report.model.metadata;
15
16
import org.eclipse.birt.report.model.api.metadata.IPropertyDefn;
17
import org.eclipse.birt.report.model.core.Module;
18
import org.eclipse.birt.report.model.elements.interfaces.IReportDesignModel;
19
20
/**
21
 * @author bidi_hcg
22
 * 
23
 */
24
public class BidiPropertyDefn extends SystemPropertyDefn
25
{
26
	/**
27
	 * 
28
	 */
29
	public BidiPropertyDefn( )
30
	{
31
		super( );
32
	}
33
34
	/*
35
	 * (non-Javadoc)
36
	 * 
37
	 * @see org.eclipse.birt.report.model.metadata.ElementPropertyDefn#isVisible()
38
	 */
39
	public boolean isVisible( )
40
	{
41
		// TODO: return false if Bidi is disabled
42
		return true;
43
	}
44
45
	/*
46
	 * (non-Javadoc)
47
	 * 
48
	 * @see org.eclipse.birt.report.model.metadata.SystemPropertyDefn#getValueType()
49
	 */
50
	public int getValueType( )
51
	{
52
		return IPropertyDefn.BIDI_PROPERTY;
53
	}
54
55
	/*
56
	 * (non-Javadoc)
57
	 * 
58
	 * @see org.eclipse.birt.report.model.metadata.PropertyDefn#getXmlValue(org.eclipse.birt.report.model.core.Module,
59
	 *      java.lang.Object)
60
	 */
61
	public String getXmlValue( Module module, Object value )
62
	{
63
		String rv = super.getXmlValue( module, value );
64
65
		if ( rv == null
66
				&& IReportDesignModel.BIDI_ORIENTATION_PROP.equals( name ) )
67
			return (String) defaultValue;
68
69
		return rv;
70
	}
71
72
	/*
73
	 * (non-Javadoc)
74
	 * 
75
	 * @see org.eclipse.birt.report.model.metadata.PropertyDefn#isValueRequired()
76
	 */
77
	public boolean isValueRequired( )
78
	{
79
		// TODO: return false if Bidi is disabled
80
		return IReportDesignModel.BIDI_ORIENTATION_PROP.equals( name );
81
	}
82
83
	/*
84
	 * (non-Javadoc)
85
	 * 
86
	 * @see org.eclipse.birt.report.model.metadata.PropertyDefn#isSystemProperty()
87
	 */
88
	public boolean isSystemProperty( )
89
	{
90
		return true;
91
	}
92
93
}

Return to bug 225140