summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorruoyin2011-08-24 22:45:54 (EDT)
committer xgu2011-08-31 02:00:52 (EDT)
commit6bf3622128b8b8c28c79f705a1f8b22f7dd38ef3 (patch)
tree3a7ec3cef469a3808174d3a163a81e2631062048
parenta6cce35e6bedf7e46182508775c0460bb29d335f (diff)
downloadorg.eclipse.birt-6bf3622128b8b8c28c79f705a1f8b22f7dd38ef3.zip
org.eclipse.birt-6bf3622128b8b8c28c79f705a1f8b22f7dd38ef3.tar.gz
org.eclipse.birt-6bf3622128b8b8c28c79f705a1f8b22f7dd38ef3.tar.bz2
43036 unexpected blank rows in grid in ODT file empty paragraph in opendocument will leave a blank line and this is not needed.
-rw-r--r--engine/org.eclipse.birt.report.engine.emitter.ods/src/org/eclipse/birt/report/engine/emitter/ods/OdsXmlWriter.java2
-rw-r--r--engine/org.eclipse.birt.report.engine.emitter.odt/src/org/eclipse/birt/report/engine/emitter/odt/OdtEmitter.java24
-rw-r--r--engine/org.eclipse.birt.report.engine.odf/src/org/eclipse/birt/report/engine/odf/IOdfWriter.java14
-rw-r--r--engine/org.eclipse.birt.report.engine.odf/src/org/eclipse/birt/report/engine/odf/writer/AbstractOdfWriter.java8
4 files changed, 12 insertions, 36 deletions
diff --git a/engine/org.eclipse.birt.report.engine.emitter.ods/src/org/eclipse/birt/report/engine/emitter/ods/OdsXmlWriter.java b/engine/org.eclipse.birt.report.engine.emitter.ods/src/org/eclipse/birt/report/engine/emitter/ods/OdsXmlWriter.java
index 0e16399..cdf0cc2 100644
--- a/engine/org.eclipse.birt.report.engine.emitter.ods/src/org/eclipse/birt/report/engine/emitter/ods/OdsXmlWriter.java
+++ b/engine/org.eclipse.birt.report.engine.emitter.ods/src/org/eclipse/birt/report/engine/emitter/ods/OdsXmlWriter.java
@@ -328,7 +328,7 @@ public class OdsXmlWriter extends AbstractOdfWriter implements IOdsWriter
private void endCell( )
{
- this.endTableCell( false );
+ this.endTableCell( );
}
private void defineNames( Entry<String, BookmarkDef> bookmarkEntry )
diff --git a/engine/org.eclipse.birt.report.engine.emitter.odt/src/org/eclipse/birt/report/engine/emitter/odt/OdtEmitter.java b/engine/org.eclipse.birt.report.engine.emitter.odt/src/org/eclipse/birt/report/engine/emitter/odt/OdtEmitter.java
index 072ff85..0f486bd 100644
--- a/engine/org.eclipse.birt.report.engine.emitter.odt/src/org/eclipse/birt/report/engine/emitter/odt/OdtEmitter.java
+++ b/engine/org.eclipse.birt.report.engine.emitter.odt/src/org/eclipse/birt/report/engine/emitter/odt/OdtEmitter.java
@@ -236,11 +236,6 @@ public class OdtEmitter extends AbstractOdfEmitter
adjustInline( );
}
- if ( context.isLastTable( ) )
- {
- bodyWriter.insertHiddenParagraph( );
- }
-
if ( !CSSConstants.CSS_INLINE_VALUE.equalsIgnoreCase( container
.getComputedStyle( ).getDisplay( ) ) )
{
@@ -311,11 +306,6 @@ public class OdtEmitter extends AbstractOdfEmitter
context.startCell( );
- if ( context.isLastTable( ) )
- {
- bodyWriter.insertHiddenParagraph( );
- }
-
tableCount++;
StyleEntry foreignStyle = StyleBuilder.createStyleEntry( foreign.getComputedStyle(), StyleEntry.TYPE_TABLE );
foreignStyle.setProperty( StyleConstant.WIDTH, context.getCurrentWidth( ) );
@@ -334,7 +324,7 @@ public class OdtEmitter extends AbstractOdfEmitter
adjustInline( );
- bodyWriter.endTableCell( context.needEmptyP( ) );
+ bodyWriter.endTableCell( );
context.endCell( );
bodyWriter.endTableRow( );
@@ -693,11 +683,6 @@ public class OdtEmitter extends AbstractOdfEmitter
addTableToc( list );
increaseTOCLevel( list );
- if ( context.isLastTable( ) )
- {
- bodyWriter.insertHiddenParagraph( );
- }
-
double width = OdfUtil.convertTo( list.getWidth( ), context
.getCurrentWidth( ), context.getReportDpi() );
width = Math.min( width, context.getCurrentWidth( ) );
@@ -1028,7 +1013,6 @@ public class OdtEmitter extends AbstractOdfEmitter
adjustInline( );
context.removeWidth( );
- boolean needEmptyP = context.needEmptyP( );
if ( !containerBookmarks.isEmpty( ) || !tableTocs.isEmpty( ) )
{
// the table bookmarks and tocs have still not be output in
@@ -1036,11 +1020,9 @@ public class OdtEmitter extends AbstractOdfEmitter
// didn't contain any paragraph, so output an empty paragraph
bodyWriter.writeMarkersParagraph( containerBookmarks, tableTocs );
- // setting need empty P since we already output one
- needEmptyP = false;
}
- bodyWriter.endTableCell( needEmptyP );
+ bodyWriter.endTableCell( );
context.endCell( );
}
@@ -1085,7 +1067,7 @@ public class OdtEmitter extends AbstractOdfEmitter
}
adjustInline( );
- bodyWriter.endTableCell( context.needEmptyP() );
+ bodyWriter.endTableCell( );
context.endCell( );
bodyWriter.endTableRow( );
}
diff --git a/engine/org.eclipse.birt.report.engine.odf/src/org/eclipse/birt/report/engine/odf/IOdfWriter.java b/engine/org.eclipse.birt.report.engine.odf/src/org/eclipse/birt/report/engine/odf/IOdfWriter.java
index 140dd72..8670cd5 100644
--- a/engine/org.eclipse.birt.report.engine.odf/src/org/eclipse/birt/report/engine/odf/IOdfWriter.java
+++ b/engine/org.eclipse.birt.report.engine.odf/src/org/eclipse/birt/report/engine/odf/IOdfWriter.java
@@ -15,13 +15,13 @@ import org.eclipse.birt.report.engine.odf.style.StyleEntry;
public interface IOdfWriter
{
-
- void endTable( );
-
- void endTableCell( boolean needEmptyP );
-
- void endTableHeader( );
-
+
+ void endTable( );
+
+ void endTableCell( );
+
+ void endTableHeader( );
+
void endTableRow( );
diff --git a/engine/org.eclipse.birt.report.engine.odf/src/org/eclipse/birt/report/engine/odf/writer/AbstractOdfWriter.java b/engine/org.eclipse.birt.report.engine.odf/src/org/eclipse/birt/report/engine/odf/writer/AbstractOdfWriter.java
index 73140a6..b26849b 100644
--- a/engine/org.eclipse.birt.report.engine.odf/src/org/eclipse/birt/report/engine/odf/writer/AbstractOdfWriter.java
+++ b/engine/org.eclipse.birt.report.engine.odf/src/org/eclipse/birt/report/engine/odf/writer/AbstractOdfWriter.java
@@ -108,14 +108,8 @@ public class AbstractOdfWriter implements IOdfWriter
}
}
- public void endTableCell( boolean empty )
+ public void endTableCell( )
{
- if ( empty )
- {
- // TODO: needed for opendocument ?
- insertHiddenParagraph( );
- }
-
writer.closeTag( "table:table-cell" );
}