| Summary: | In DOC format, table cells inherit margin/padding properties of the parent table when they shouldn't | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Dmitry Balzer <balzerd> | ||||
| Component: | BIRT | Assignee: | Yu Chen <yChen> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Xiaodan Wang <xwang> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | bluesoldier, jouyang | ||||
| Version: | 2.6.0 | ||||||
| Target Milestone: | 2.6.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Dmitry Balzer
Created attachment 184032 [details]
Bug demonstration
The problem might be in the following code chunk:
===
protected void writeBorders( IStyle style, int bottomMargin, int topMargin,
int leftMargin, int rightMargin )
{
String borderStyle = style.getBorderBottomStyle( );
if ( hasBorder( borderStyle ) )
{
writeSingleBorder( BOTTOM, borderStyle, style
.getBorderBottomColor( ), style
.getProperty( StyleConstants.STYLE_BORDER_BOTTOM_WIDTH ),
bottomMargin );
}
......
===
As one can see, margin properties will only be written if a table or a cell has a respective border enabled:
===
private boolean hasBorder( String borderStyle )
{
return !( borderStyle == null || "none".equalsIgnoreCase( borderStyle ) );
}
===
===
private void writeCellBorders( IStyle style )
{
writer.openTag( "w:tcBorders" );
writeBorders( style, 0, 0, 0, 0 );
writer.closeTag( "w:tcBorders" );
}
===
Or in this one :
===
private void writeCellBorders( IStyle style )
{
writer.openTag( "w:tcBorders" );
writeBorders( style, 0, 0, 0, 0 );
writer.closeTag( "w:tcBorders" );
}
===
Where all cell margins are set to 0, ignoring their actual values in the report template.
Hi Xiaoying, could you please provide an update on this? Any chance this fix can make it into 2.6.2? Thank you very much, Dmitry Dmitry, We will fix this problem ASAP. 2.6.2 will definitely be ok. Fixed. Verified in build (2.6.2.v20110111-0630). I have just tested BIRT 2.6.2RC2 and the bug is *fixed*. Why was the "Target Milestone" tag cleared? Will the bugfix be included in 2.6.2Final ? Add the target milestone. |