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

Collapse All | Expand All

(-)src/org/eclipse/birt/report/engine/emitter/excel/StyleConstant.java (-2 / +6 lines)
Lines 1-8 Link Here
1
package org.eclipse.birt.report.engine.emitter.excel;
1
package org.eclipse.birt.report.engine.emitter.excel;
2
2
3
public interface StyleConstant {
3
public interface StyleConstant {
4
    
4
5
    public static final int COUNT = 27;
5
    // bidi_hcg: changed number of styles due to direction added.    
6
    public static final int COUNT = 28;
7
    //27;
6
    
8
    
7
    public static final int FONT_FAMILY_PROP = 0;
9
    public static final int FONT_FAMILY_PROP = 0;
8
    public static final int FONT_SIZE_PROP = 1;
10
    public static final int FONT_SIZE_PROP = 1;
Lines 40-45 Link Here
40
    public static final int DATA_TYPE_PROP = 25;
42
    public static final int DATA_TYPE_PROP = 25;
41
    public static final int TEXT_TRANSFORM = 26;
43
    public static final int TEXT_TRANSFORM = 26;
42
    
44
    
45
    public static final int DIRECTION_PROP = 27; // bidi_hcg
46
43
	public static final String NULL = "NULL";  
47
	public static final String NULL = "NULL";  
44
		
48
		
45
}
49
}
(-)src/org/eclipse/birt/report/engine/emitter/excel/ExcelWriter.java (-7 / +15 lines)
Lines 7-13 Link Here
7
import java.io.IOException;
7
import java.io.IOException;
8
import java.io.OutputStream;
8
import java.io.OutputStream;
9
import java.io.PrintWriter;
9
import java.io.PrintWriter;
10
import java.util.ArrayList;
11
import java.util.HashSet;
10
import java.util.HashSet;
12
import java.util.Iterator;
11
import java.util.Iterator;
13
import java.util.List;
12
import java.util.List;
Lines 16-27 Link Here
16
import java.util.logging.Logger;
15
import java.util.logging.Logger;
17
import org.eclipse.birt.report.engine.content.IHyperlinkAction;
16
import org.eclipse.birt.report.engine.content.IHyperlinkAction;
18
import org.eclipse.birt.report.engine.content.IReportContent;
17
import org.eclipse.birt.report.engine.content.IReportContent;
18
import org.eclipse.birt.report.engine.css.engine.value.birt.BIRTConstants;
19
import org.eclipse.birt.report.engine.css.engine.value.css.CSSConstants;
19
import org.eclipse.birt.report.engine.css.engine.value.css.CSSConstants;
20
import org.eclipse.birt.report.engine.emitter.XMLWriter;
20
import org.eclipse.birt.report.engine.emitter.XMLWriter;
21
import org.eclipse.birt.report.engine.emitter.excel.layout.ExcelContext;
21
import org.eclipse.birt.report.engine.emitter.excel.layout.ExcelContext;
22
import org.eclipse.birt.report.model.api.ReportDesignHandle;
23
import org.eclipse.birt.report.model.api.core.IModuleModel;
22
import org.eclipse.birt.report.model.api.core.IModuleModel;
24
import org.eclipse.birt.report.model.elements.Style;
25
23
26
public class ExcelWriter
24
public class ExcelWriter
27
{
25
{
Lines 280-286 Link Here
280
		writer.closeTag( "Cell" );
278
		writer.closeTag( "Cell" );
281
	}
279
	}
282
280
283
	public void writeAlignment( String horizontal, String vertical, boolean wrapText )
281
	public void writeAlignment( String horizontal, String vertical,
282
			String direction, boolean wrapText )
284
	{
283
	{
285
		writer.openTag( "Alignment" );
284
		writer.openTag( "Alignment" );
286
285
Lines 293-299 Link Here
293
		{
292
		{
294
			writer.attribute( "ss:Vertical", vertical );
293
			writer.attribute( "ss:Vertical", vertical );
295
		}
294
		}
296
295
		// bidi_hcg: Write direction attribute
296
		if ( isValid( direction ) )
297
		{
298
			if ( BIRTConstants.BIRT_RTL_VALUE.equals( direction ) )
299
				writer.attribute( "ss:ReadingOrder", "RightToLeft" );
300
			else
301
				writer.attribute( "ss:ReadingOrder", "LeftToRight" );
302
		}
297
		if(wrapText)
303
		if(wrapText)
298
		{
304
		{
299
			writer.attribute( "ss:WrapText", "1" );
305
			writer.attribute( "ss:WrapText", "1" );
Lines 392-403 Link Here
392
398
393
		if ( id >= StyleEngine.RESERVE_STYLE_ID )
399
		if ( id >= StyleEngine.RESERVE_STYLE_ID )
394
		{
400
		{
401
			String direction = style
402
					.getProperty( StyleConstant.DIRECTION_PROP ); // bidi_hcg
395
			String horizontalAlign = style
403
			String horizontalAlign = style
396
					.getProperty( StyleConstant.H_ALIGN_PROP );
404
					.getProperty( StyleConstant.H_ALIGN_PROP );
397
			String verticalAlign = style
405
			String verticalAlign = style
398
					.getProperty( StyleConstant.V_ALIGN_PROP );
406
					.getProperty( StyleConstant.V_ALIGN_PROP );
399
			writeAlignment( horizontalAlign, verticalAlign ,wrapText);
407
			writeAlignment( horizontalAlign, verticalAlign, direction,
400
408
					wrapText );
401
			writer.openTag( "Borders" );
409
			writer.openTag( "Borders" );
402
			String bottomColor = style
410
			String bottomColor = style
403
					.getProperty( StyleConstant.BORDER_BOTTOM_COLOR_PROP );
411
					.getProperty( StyleConstant.BORDER_BOTTOM_COLOR_PROP );
(-)src/org/eclipse/birt/report/engine/emitter/excel/StyleBuilder.java (+5 lines)
Lines 132-137 Link Here
132
		
132
		
133
        entry.setProperty( StyleConstant.TEXT_TRANSFORM, style
133
        entry.setProperty( StyleConstant.TEXT_TRANSFORM, style
134
				.getTextTransform( ) );
134
				.getTextTransform( ) );
135
136
		// bidi_hcg: direction
137
		entry.setProperty( StyleConstant.DIRECTION_PROP, style
138
				.getDirection( ) );
139
135
		return entry;
140
		return entry;
136
	}
141
	}
137
142

Return to bug 225536