Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a37b075
Several enhancements to the Word Emitter (see bugs Bug 431616 and 433…
Jul 30, 2019
cc83023
Support kind of a "vertical tab" for the PDF emitter.
hvbtup Oct 1, 2019
403e3af
Fixed the handling of page header and footer for Word 2003 and 2007 o…
hvbtup Oct 1, 2019
b8de757
Revert commit f84d0f812a72ba8e54f6caf641e16442d480594c because it cau…
hvbtup Oct 25, 2019
e095563
Updated the Spudsoft Excel Emitter to the latest release 0.8.0.201310…
hvbtup Oct 25, 2019
45ec28a
Updated the Spudsoft Excel Emitter to the latest release 0.8.0.201310…
hvbtup Oct 25, 2019
959c5a2
Fixed errors in the ok.co.spudsoft excel emitter tests
hvbtup Oct 28, 2019
6ce34e0
Corrected GIT repository URL in Eclipse Setup file
hvbtup Oct 28, 2019
f13cef2
Obviously the signature of a constructor for LayoutEngine has changed.
hvbtup Oct 28, 2019
df505a4
Fix BIRT bug 562873 PDF Rendering error with dynamic text item after …
hvbtup May 7, 2020
065d06c
Merge branch 'flugtiger_master' of https://github.com/Flugtiger/birt …
hvbtup May 22, 2020
fee8b76
Fix bug 519375: Birt inserts an extra space in DOCX if part of the wo…
hvbtup May 29, 2020
bb7d825
Trying to support newer word versions, does not yet work.
hvbtup Jul 28, 2020
9dd3de4
Support for Word 2016
hvbtup Jul 29, 2020
04b152a
The DOCX emitter now creates Word 2016 documents by default.
hvbtup Jul 29, 2020
9035efe
Update README.md
hvbtup Aug 10, 2020
be6294f
Fix java.lang.StringIndexOutOfBoundsException in TextArea.calculateTe…
hvbtup Jun 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions EclipseBIRT.setup
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<setupTask
xsi:type="git:GitCloneTask"
id="git.clone.birt"
remoteURI="flugtiger/birt">
remoteURI="hvbtup/birt">
<annotation
source="http://www.eclipse.org/oomph/setup/InducedChoices">
<detail
Expand Down Expand Up @@ -241,7 +241,7 @@
<setupTask
xsi:type="setup:EclipseIniTask"
option="-Doomph.redirection.birt"
value="=https://github.com/Flugtiger/birt/raw/flugtiger_master/EclipseBIRT.setup->${git.clone.birt.location|uri}/EclipseBIRT.setup"
value="=https://github.com/hvbtup/birt/raw/flugtiger_master/EclipseBIRT.setup->${git.clone.birt.location|uri}/EclipseBIRT.setup"
vm="true">
<description>Set an Oomph redirection system property to redirect the logical location of this setup to its physical location in the Git clone.</description>
</setupTask>
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Eclipse BIRT [![Build Status](https://travis-ci.com/Flugtiger/birt.svg?branch=flugtiger_master)](https://travis-ci.com/Flugtiger/birt)
# Eclipse BIRT [![Build Status](https://travis-ci.com/hvbtup/birt.svg?branch=flugtiger_master)](https://travis-ci.com/hvbtup/birt)
The open source Eclipse BIRT reporting and data visualization project.

**This is not the official Eclipse repository, nevertheless feel free to open tickets and pull requests!**

## Reasons for this fork and differences to the official Eclipse repository

For more information about this repository see our [wiki pages](https://github.com/hvbtup/birt/wiki)

## Building BIRT
See our wiki pages [How to build Eclipse BIRT](https://github.com/Flugtiger/birt/wiki/How-to-build-Eclipse-BIRT) and [How to setup an Eclipse IDE for Eclipse BIRT](https://github.com/Flugtiger/birt/wiki/How-to-setup-an-Eclipse-IDE-for-Eclipse-BIRT)
See the wiki pages on flugtiger/birt [How to build Eclipse BIRT](https://github.com/Flugtiger/birt/wiki/How-to-build-Eclipse-BIRT) and [How to setup an Eclipse IDE for Eclipse BIRT](https://github.com/Flugtiger/birt/wiki/How-to-setup-an-Eclipse-IDE-for-Eclipse-BIRT).

Just remember to replace flugtiger/birt with hvbtup/birt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
package org.eclipse.birt.report.engine.emitter.config.docx;

import static org.eclipse.birt.report.engine.api.DocxRenderOption.OPTION_EMBED_HTML;
import static org.eclipse.birt.report.engine.api.DocxRenderOption.OPTION_WORD_VERSION;
import org.eclipse.birt.report.engine.api.IRenderOption;
import org.eclipse.birt.report.engine.api.RenderOption;
import org.eclipse.birt.report.engine.emitter.config.AbstractConfigurableOptionObserver;
Expand All @@ -20,6 +21,7 @@
import org.eclipse.birt.report.engine.emitter.config.IConfigurableOption;
import org.eclipse.birt.report.engine.emitter.config.IConfigurableOptionObserver;
import org.eclipse.birt.report.engine.emitter.config.IOptionValue;
import org.eclipse.birt.report.engine.emitter.config.OptionValue;
import org.eclipse.birt.report.engine.emitter.config.docx.i18n.Messages;


Expand All @@ -30,6 +32,7 @@ public class DocxEmitterDescriptor extends AbstractEmitterDescriptor
{
protected static final String CHART_DPI = "ChartDpi";
protected static final String EMBED_HTML = "EmbedHtml";
protected static final String WORD_VERSION = "WordVersion";

protected void initOptions( )
{
Expand All @@ -50,8 +53,18 @@ protected void initOptions( )
embedHtml.setDefaultValue( new Boolean(Boolean.TRUE) );
embedHtml.setToolTip( getMessage( "Tooltip.EmbedHtml" ) );
embedHtml.setDescription( getMessage( "OptionDescription.EmbedHtml" ) ); //$NON-NLS-1$

options = new IConfigurableOption[]{chartDpi, embedHtml};

ConfigurableOption wordVersion = new ConfigurableOption( WORD_VERSION );
wordVersion.setDisplayName( getMessage( "OptionDisplayValue.WordVersion" ) ); //$NON-NLS-1$
wordVersion.setDataType( IConfigurableOption.DataType.INTEGER );
wordVersion.setDisplayType( IConfigurableOption.DisplayType.TEXT );
wordVersion.setDefaultValue( new Integer( 2016 ) );
IOptionValue[] choices = { new OptionValue(2010), new OptionValue(2016) };
wordVersion.setChoices(choices);
wordVersion.setToolTip( getMessage( "Tooltip.WordVersion" ) );
wordVersion.setDescription( getMessage( "OptionDescription.WordVersion" ) ); //$NON-NLS-1$

options = new IConfigurableOption[]{chartDpi, embedHtml, wordVersion};
applyDefaultValues( );
}
@Override
Expand Down Expand Up @@ -110,6 +123,11 @@ public String getRenderOptionName( String name )
{
return OPTION_EMBED_HTML;
}

if ( WORD_VERSION.equals( name ) )
{
return OPTION_WORD_VERSION;
}
return name;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ DocxEmitter.DisplayName=Word (DOCX)
#Option Display Value
OptionDisplayValue.ChartDpi=Chart DPI
OptionDisplayValue.EmbedHtml=Embed HTML
OptionDisplayValue.WordVersion=Word Version

###########################################################
#Option Description
OptionDescription.ChartDpi=The DPI used to generate chart.
OptionDescription.EmbedHtml=Allow DOCX to use embedded HTML
OptionDescription.WordVersion=Compatibility of .docx to which word version

###########################################################
#tooltip
Tooltip.ChartDpi=The DPI which chart engine uses to generate charts. For example, 192.
Tooltip.EmbedHtml=If HTML content should be embedded directly to DOCX output
Tooltip.EmbedHtml=If HTML content should be embedded directly to DOCX output
Tooltip.WordVersion=MS changed word behavior with Word 2013, so usually 2016 is the best choice.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class DocxEmitterImpl extends AbstractEmitterImpl
{

private static final String OUTPUT_FORMAT = "docx";

private boolean embedHtml = true;

public DocxEmitterImpl( ContentEmitterVisitor contentVisitor )
Expand All @@ -47,14 +47,22 @@ public void initialize( IEmitterServices service ) throws EngineException
super.initialize( service );
String tempFileDir = service.getReportEngine( ).getConfig( )
.getTempDir( );
wordWriter = new DocxWriter( out, tempFileDir, getCompressionMode( service )
.getValue( ) );

IRenderOption renderOption = service.getRenderOption( );
Object value = renderOption.getOption( DocxRenderOption.OPTION_EMBED_HTML );
Object value = renderOption.getOption( DocxRenderOption.OPTION_WORD_VERSION );
if (value instanceof Integer) {
setWordVersion((Integer)value);
} else {
setWordVersion(2016);
}
value = renderOption.getOption( DocxRenderOption.OPTION_EMBED_HTML );
if ( value instanceof Boolean )
{
this.embedHtml = (Boolean) value;
}

wordWriter = new DocxWriter( out, tempFileDir, getCompressionMode( service )
.getValue( ), getWordVersion() );
}

private CompressionMode getCompressionMode( IEmitterServices service )
Expand Down Expand Up @@ -105,7 +113,7 @@ public void startForeign( IForeignContent foreign ) throws BirtException
wordWriter.writeForeign( foreign );
if ( isInSpannedCell( foreign ) )
{
//insert empty line after embed html
//insert empty line after embed html
wordWriter.endTableCell( true, true );
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ protected void writeTOC( String tocText, int level )
{
writeTOC( tocText, null, level, false );
}

protected void writeTOC( String tocText, String color, int level, boolean middleInline)
{
if ( !middleInline )
Expand Down Expand Up @@ -457,6 +457,7 @@ private String normalize( String foreignText, Map appContext ) throws Unsupporte
Element body = null;
ByteArrayOutputStream byteOut = new ByteArrayOutputStream( );
HTMLWriter htmlWriter = new HTMLWriter( );
htmlWriter.setEnableCompactMode(true); // HVB, bug 519375
htmlWriter.open( byteOut );
if ( doc != null )
{
Expand Down Expand Up @@ -664,7 +665,7 @@ private void buildBox( StringBuffer styleBuffer, IStyle style )

/**
* Build the margins.
*
*
* @param styleBuffer
* @param style
*/
Expand Down Expand Up @@ -733,7 +734,7 @@ private void buildMargins( StringBuffer styleBuffer, IStyle style )

/**
* Build the paddings.
*
*
* @param styleBuffer
* @param style
*/
Expand Down Expand Up @@ -1066,7 +1067,7 @@ public void endNode( Node node, HTMLWriter writer )

/**
* test if the text node is in the script
*
*
* @param node
* text node
* @return true if the text is a script, otherwise, false.
Expand Down Expand Up @@ -1152,19 +1153,19 @@ protected void writeIndent( int leftMargin, int rightMargin, int textIndent )
{
writer.attribute( "w:left", leftMargin );
}

if ( rightMargin != 0 )
{
writer.attribute( "w:right", rightMargin );
}

if ( textIndent != 0 )
{
writer.attribute( "w:firstLine", textIndent );
}
writer.closeTag( "w:ind" );
}

abstract void start( );

abstract void end( );
Expand Down
Loading