diff --git a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/DocxEmitterImpl.java b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/DocxEmitterImpl.java index bf8740f214b..fc6efa0c739 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/DocxEmitterImpl.java +++ b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/DocxEmitterImpl.java @@ -72,8 +72,7 @@ public void initialize(IEmitterServices service) throws EngineException { this.embedHtml = (Boolean) value; } - wordWriter = new DocxWriter(out, tempFileDir, getCompressionMode(service).getValue(), getWordVersion(), - wrappedTableHeaderFooter); + wordWriter = new DocxWriter(out, tempFileDir, getCompressionMode(service).getValue(), getWordVersion()); } private CompressionMode getCompressionMode(IEmitterServices service) { diff --git a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/BasicComponent.java b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/BasicComponent.java index 8509d8decb6..23bde0cfdf0 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/BasicComponent.java +++ b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/BasicComponent.java @@ -107,8 +107,6 @@ public abstract class BasicComponent extends AbstractWordXmlWriter { protected boolean wrappedTable = true; - protected boolean wrappedTableHeaderFooter = true; - protected BasicComponent(IPart part) throws IOException { this.part = part; this.imageManager = (ImageManager) part.getPackage().getExtensionData(); @@ -1175,16 +1173,4 @@ private void getCorrectFontSize(Node nodeTag, HashMap cssStyles) { } } - protected void startHeaderFooterContainer(int headerHeight, int headerWidth, boolean writeColumns) { - if (wrappedTableHeaderFooter) { - super.startHeaderFooterContainer(headerHeight, headerWidth, writeColumns); - } - } - - @Override - protected void endHeaderFooterContainer() { - if (wrappedTableHeaderFooter) { - super.endHeaderFooterContainer(); - } - } } diff --git a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Document.java b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Document.java index e9ada89da5e..8d6f19d05f8 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Document.java +++ b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Document.java @@ -311,20 +311,20 @@ void writeFooterReference(BasicComponent footer) { writer.closeTag("w:footerReference"); } - Header createHeader(int headerHeight, int headerWidth) throws IOException { + Header createHeader(int headerHeight, int headerWidth, boolean wrapHeader) throws IOException { String uri = "header" + getHeaderID() + ".xml"; String type = ContentTypes.WORD_HEADER; String relationshipType = RelationshipTypes.HEADER; IPart headerPart = part.getPart(uri, type, relationshipType); - return new Header(headerPart, this, headerHeight, headerWidth); + return new Header(headerPart, this, headerHeight, headerWidth, wrapHeader); } - Footer createFooter(int footerHeight, int footerWidth) throws IOException { + Footer createFooter(int footerHeight, int footerWidth, boolean wrapHeader) throws IOException { String uri = "footer" + getFooterID() + ".xml"; String type = ContentTypes.WORD_FOOTER; String relationshipType = RelationshipTypes.FOOTER; IPart footerPart = part.getPart(uri, type, relationshipType); - return new Footer(footerPart, this, footerHeight, footerWidth); + return new Footer(footerPart, this, footerHeight, footerWidth, wrapHeader); } private int getHeaderID() { diff --git a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/DocxWriter.java b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/DocxWriter.java index 5efd7ee497f..ce638de7ff2 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/DocxWriter.java +++ b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/DocxWriter.java @@ -66,12 +66,10 @@ public class DocxWriter implements IWordWriter { * @param compressionMode compression mode * @param wordVersion word version */ - public DocxWriter(OutputStream out, String tempFileDir, int compressionMode, int wordVersion, - boolean wrappedTableHeaderFooter) { + public DocxWriter(OutputStream out, String tempFileDir, int compressionMode, int wordVersion) { pkg = Package.createInstance(out, tempFileDir, compressionMode); pkg.setExtensionData(new ImageManager()); this.wordVersion = wordVersion; - this.wrappedTableHeaderFooter = wrappedTableHeaderFooter; } @Override @@ -137,7 +135,6 @@ private void initializeDocumentPart(String backgroundColor, String backgroundIma rtl, wordVersion, this.getDocumentLanguage()); document.start(); currentComponent = document; - currentComponent.wrappedTableHeaderFooter = this.wrappedTableHeaderFooter; } @Override @@ -162,7 +159,7 @@ public void endSection() { @Override public void startHeader(boolean showHeaderOnFirst, int headerHeight, int headerWidth) throws IOException { - currentComponent = document.createHeader(headerHeight, headerWidth); + currentComponent = document.createHeader(headerHeight, headerWidth, this.wrappedTableHeaderFooter); currentComponent.start(); this.showHeaderOnFirst = showHeaderOnFirst; } @@ -176,7 +173,7 @@ public void endHeader() { @Override public void startFooter(int footerHeight, int footerWidth) throws IOException { - currentComponent = document.createFooter(footerHeight, footerWidth); + currentComponent = document.createFooter(footerHeight, footerWidth, this.wrappedTableHeaderFooter); currentComponent.start(); } @@ -368,4 +365,13 @@ public String getDocumentLanguage() { return this.documentLanguage; } + @Override + public void setWrappedTableHeaderFooter(boolean useWrappedTable) { + this.wrappedTableHeaderFooter = useWrappedTable; + } + + @Override + public boolean getWrappedTableHeaderFooter() { + return this.wrappedTableHeaderFooter; + } } diff --git a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Footer.java b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Footer.java index 42b8544cd4d..f0c6dccd0f2 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Footer.java +++ b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Footer.java @@ -1,15 +1,16 @@ /******************************************************************************* - * Copyright (c) 2013 Actuate Corporation. - * + * Copyright (c) 2013, 2024 Actuate Corporation and others + * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * https://www.eclipse.org/legal/epl-2.0/. - * + * * SPDX-License-Identifier: EPL-2.0 - * + * * * Contributors: - * Actuate Corporation - initial API and implementation + * Actuate Corporation - initial API and implementation + * Thomas Gutmann - add option to handle footer wrapper *******************************************************************************/ package org.eclipse.birt.report.engine.emitter.docx.writer; @@ -23,12 +24,24 @@ public class Footer extends BasicComponent { Document document; int footerHeight; int footerWidth; + boolean wrapFooter; + /** + * Constructor 1 + */ Footer(IPart part, Document document, int footerHeight, int footerWidth) throws IOException { + this(part, document, footerHeight, footerWidth, true); + } + + /** + * Constructor 2 + */ + Footer(IPart part, Document document, int footerHeight, int footerWidth, boolean wrapFooter) throws IOException { super(part); this.document = document; this.footerHeight = footerHeight; this.footerWidth = footerWidth; + this.wrapFooter = wrapFooter; } @Override @@ -36,12 +49,14 @@ void start() { writer.startWriter(); writer.openTag("w:ftr"); writeXmlns(); - startHeaderFooterContainer(footerHeight, footerWidth); + if (this.wrapFooter) + startHeaderFooterContainer(footerHeight, footerWidth); } @Override void end() { - endHeaderFooterContainer(); + if (wrapFooter) + endHeaderFooterContainer(); writer.closeTag("w:ftr"); writer.endWriter(); writer.close(); diff --git a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Header.java b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Header.java index 26e509e823c..5c332e4bcbb 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Header.java +++ b/engine/org.eclipse.birt.report.engine.emitter.docx/src/org/eclipse/birt/report/engine/emitter/docx/writer/Header.java @@ -1,15 +1,16 @@ /******************************************************************************* - * Copyright (c) 2013 Actuate Corporation. - * + * Copyright (c) 2013, 2024 Actuate Corporation. + * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * https://www.eclipse.org/legal/epl-2.0/. - * + * * SPDX-License-Identifier: EPL-2.0 - * + * * * Contributors: - * Actuate Corporation - initial API and implementation + * Actuate Corporation - initial API and implementation + * Thomas Gutmann - add option to handle header wrapper *******************************************************************************/ package org.eclipse.birt.report.engine.emitter.docx.writer; @@ -32,12 +33,24 @@ public class Header extends BasicComponent { Document document; int headerHeight; int headerWidth; + boolean wrapHeader; + /** + * Constructor 1 + */ Header(IPart part, Document document, int headerHeight, int headerWidth) throws IOException { + this(part, document, headerHeight, headerWidth, true); + } + + /** + * Constructor 2 + */ + Header(IPart part, Document document, int headerHeight, int headerWidth, boolean wrapHeader) throws IOException { super(part); this.document = document; this.headerHeight = headerHeight; this.headerWidth = headerWidth; + this.wrapHeader = wrapHeader; } @Override @@ -45,12 +58,14 @@ void start() { writer.startWriter(); writer.openTag("w:hdr"); writeXmlns(); - startHeaderFooterContainer(headerHeight, headerWidth, true); + if (this.wrapHeader) + startHeaderFooterContainer(headerHeight, headerWidth, true); } @Override void end() { - endHeaderFooterContainer(); + if (this.wrapHeader) + endHeaderFooterContainer(); writer.closeTag("w:hdr"); writer.endWriter(); writer.close(); diff --git a/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/AbstractEmitterImpl.java b/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/AbstractEmitterImpl.java index f737899fd5e..2e6acb3599c 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/AbstractEmitterImpl.java +++ b/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/AbstractEmitterImpl.java @@ -24,7 +24,6 @@ import java.util.HashSet; import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.Set; import java.util.Stack; import java.util.logging.Level; @@ -347,9 +346,10 @@ public void start(IReportContent report) { // header & footer: wrap header and footer with table if (EmitterServices.booleanOption(null, report, DocEmitter.WORD_HEADER_FOOTER_WRAPPED_TABLE, false)) { wrappedTableHeaderFooter = true; + wordWriter.setWrappedTableHeaderFooter(wrappedTableHeaderFooter); } // foreign text: add empty paragraph to wrapper table cell - if (EmitterServices.booleanOption(null, report, DocEmitter.WORD_ADD_EMPTY_PARAGRAPH_FOR_ALL_CELLS, wrappedTableForMarginPadding)) { + if (wrappedTableForMarginPadding || EmitterServices.booleanOption(null, report, DocEmitter.WORD_ADD_EMPTY_PARAGRAPH_FOR_ALL_CELLS, false)) { addEmptyParagraphToForAllCells = true; } diff --git a/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/EmitterServices.java b/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/EmitterServices.java index 7ed49bc7cfb..da4878b6e08 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/EmitterServices.java +++ b/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/EmitterServices.java @@ -405,12 +405,18 @@ protected static Object getUserProperty(IContent birtContent, String propName) { private static Object getReportDesignConfiguration(IReportContent reportContent, String name) { Object value = null; - // TODO: implementation of designer options if (name.equalsIgnoreCase(DocEmitter.WORD_MARGIN_PADDING_WRAPPED_TABLE)) { - // value = reportContent.getDesign().getReportDesign().getWordWrappedTable(); + value = reportContent.getDesign().getReportDesign().getWordWrapTableForMarginPadding(); } else if (name.equalsIgnoreCase(DocEmitter.WORD_MARGIN_PADDING_COMBINE)) { - // value = reportContent.getDesign().getReportDesign().getWordMarginPaddingCombined(); + value = reportContent.getDesign().getReportDesign().getWordCombineMarginPadding(); + + } else if (name.equalsIgnoreCase(DocEmitter.WORD_HEADER_FOOTER_WRAPPED_TABLE)) { + value = reportContent.getDesign().getReportDesign().getWordWrapTableForHeaderFooter(); + + } else if (name.equalsIgnoreCase(DocEmitter.WORD_ADD_EMPTY_PARAGRAPH_FOR_LIST_CELL)) { + value = reportContent.getDesign().getReportDesign().getWordListCellAddEmptyPara(); + } return value; } diff --git a/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/IWordWriter.java b/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/IWordWriter.java index 11437e98bf3..29db2db1be8 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/IWordWriter.java +++ b/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/IWordWriter.java @@ -377,4 +377,23 @@ void writeContent(int type, String txt, IStyle style, IStyle inlineStyle, String * End page */ void endPage(); + + /** + * Set the layout attribute for header and footer wrapping + * + * @param useWrappedTable use layout grid to wrap header and footer + */ + default void setWrappedTableHeaderFooter(boolean useWrappedTable) { + // do nothing + } + + /** + * Get the configuration of layout-grid usage for header and footer + * + * @return the configuration of layout-grid usage for header and footer + */ + default boolean getWrappedTableHeaderFooter() { + return true; + } + } diff --git a/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/README.md b/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/README.md index 79e0e165a6e..2de1223e406 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/README.md +++ b/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/README.md @@ -22,6 +22,7 @@ The following list get an overview of all supported user properties, the content false, margin will be used for text indent (without padding) Default true Since 4.18 + Designer 4.18 **WordEmitter.AddEmptyParagraphForAllCells** @@ -34,6 +35,7 @@ The following list get an overview of all supported user properties, the content true, if wrappedTableForMarginPadding is set to true Relation WordEmitter.WrappedTableForMarginPadding Since 4.18 + Designer 4.18 **WordEmitter.AddEmptyParagraphForListCell** @@ -44,6 +46,7 @@ The following list get an overview of all supported user properties, the content false, avoid empty paragraph at list table cell end Default false Since 4.18 + Designer 4.18 **WordEmitter.WrappedTableForMarginPadding** @@ -55,6 +58,7 @@ The following list get an overview of all supported user properties, the content Default false Relation WordEmitter.AddEmptyParagraphForAllCells Since 4.18 + Designer 4.18 **WordEmitter.WrappedTableHeaderFooter** @@ -66,3 +70,5 @@ The following list get an overview of all supported user properties, the content false, use optimized handling and avoid wrapper layout table for page header and footer Default false Since 4.18 + Designer 4.18 + \ No newline at end of file diff --git a/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/writer/AbstractWordXmlWriter.java b/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/writer/AbstractWordXmlWriter.java index b0252e87dca..7ef7ca578bd 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/writer/AbstractWordXmlWriter.java +++ b/engine/org.eclipse.birt.report.engine.emitter.wpml/src/org/eclipse/birt/report/engine/emitter/wpml/writer/AbstractWordXmlWriter.java @@ -50,6 +50,8 @@ public abstract class AbstractWordXmlWriter { protected boolean combineMarginPadding = true; + protected boolean wrappedTableHeaderFooter = false; + /** constant property: space */ public static final char SPACE = ' '; @@ -1457,4 +1459,12 @@ private void drawLine(double width, String style, String color, Line line) { private int getLineId() { return lineId++; } + + public void setWrappedTableHeaderFooter(boolean useWrappedTable) { + this.wrappedTableHeaderFooter = useWrappedTable; + } + + public boolean getWrappedTableHeaderFooter() { + return this.wrappedTableHeaderFooter; + } } diff --git a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ReportDesignHandleImpl.java b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ReportDesignHandleImpl.java index f9d99929b31..27da1ccb949 100644 --- a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ReportDesignHandleImpl.java +++ b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ReportDesignHandleImpl.java @@ -1848,8 +1848,87 @@ public String getPdfAEmbedTitle() { * @param embedTitle embed title * @throws SemanticException */ - public void setPdfAEmbedTitle(String embedTitle) throws SemanticException { - setStringProperty(PDFA_DOCUMENT_EMBED_TITLE, embedTitle); + public void setPdfAEmbedTitle(boolean embedTitle) throws SemanticException { + setBooleanProperty(PDFA_DOCUMENT_EMBED_TITLE, embedTitle); + } + + /** + * Get the configuration to the combined usage of margin & padding for spacing + * + * @return the configuration to use the combined calculation of margin & padding + */ + public boolean getWordCombineMarginPadding() { + return getBooleanProperty(WORD_COMBINE_MARGIN_PADDING); + } + + /** + * Set the configuration to the combined usage of margin & padding for spacing + * + * @param combineMarginPadding use combination of margin & padding for spacing + * @throws SemanticException + */ + public void setWordCombineMarginPadding(boolean combineMarginPadding) throws SemanticException { + setBooleanProperty(WORD_COMBINE_MARGIN_PADDING, combineMarginPadding); + } + + /** + * Get the configuration if an empty paragraph is to use at the end of a list + * cell + * + * @return the configuration if an empty paragraph is to use at the end of a + * list cell + */ + public boolean getWordListCellAddEmptyPara() { + return getBooleanProperty(WORD_LIST_CELL_ADD_EMPTY_PARA); + } + + /** + * Set the configuration if an empty paragraph is to use at the end of a list + * cell + * + * @param addEmptyPara add empty paragraph + * @throws SemanticException + */ + public void setWordListCellAddEmptyPara(boolean addEmptyPara) throws SemanticException { + setBooleanProperty(WORD_LIST_CELL_ADD_EMPTY_PARA, addEmptyPara); + } + + /** + * Get the configuration to use a wrapping table for margin and padding + * + * @return the configuration to use a wrapping table for margin and padding + */ + public boolean getWordWrapTableForMarginPadding() { + return getBooleanProperty(WORD_WRAP_TABLE_FOR_MARGIN_PADDING); + } + + /** + * Set the configuration to use a wrapping table for margin and padding + * + * @param wrapTable wrap table for margin and padding + * @throws SemanticException + */ + public void setWordWrapTableForMarginPadding(boolean wrapTable) throws SemanticException { + setBooleanProperty(WORD_WRAP_TABLE_FOR_MARGIN_PADDING, wrapTable); + } + + /** + * Get the configuration to use a layout table for header and footer + * + * @return the configuration to use a layout table for header and footer + */ + public boolean getWordWrapTableForHeaderFooter() { + return getBooleanProperty(WORD_WRAP_TABLE_FOR_HEADER_FOOTER); + } + + /** + * Set the configuration to use a layout table for header and footer + * + * @param wrapTable layout table for header and footer + * @throws SemanticException + */ + public void setWordWrapTableForHeaderFooter(boolean wrapTable) throws SemanticException { + setBooleanProperty(WORD_WRAP_TABLE_FOR_HEADER_FOOTER, wrapTable); } } diff --git a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/interfaces/IInternalReportDesignModel.java b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/interfaces/IInternalReportDesignModel.java index dbc415e40d1..9085d300fb2 100644 --- a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/interfaces/IInternalReportDesignModel.java +++ b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/interfaces/IInternalReportDesignModel.java @@ -333,4 +333,20 @@ public interface IInternalReportDesignModel { */ String PDFA_DOCUMENT_EMBED_TITLE = "pdfaDocumentTitleEmbed"; //$NON-NLS-1$ + /** + * Word option, use margin & padding for spacing (only without layout-grid) + */ + String WORD_COMBINE_MARGIN_PADDING = "wordCombineMarginPadding"; //$NON-NLS-1$ + /** + * Word option, list element, add empty line of cell end + */ + String WORD_LIST_CELL_ADD_EMPTY_PARA = "wordAddEmptyParagraphForListCell"; //$NON-NLS-1$ + /** + * Word option, text element, use layout-grid for margin & padding + */ + String WORD_WRAP_TABLE_FOR_MARGIN_PADDING = "wordWrappedTableForMarginPadding"; //$NON-NLS-1$ + /** + * Word option, page header & footer, use layout-grid + */ + String WORD_WRAP_TABLE_FOR_HEADER_FOOTER = "wordWrappedTableHeaderFooter"; //$NON-NLS-1$ } diff --git a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/rom.def b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/rom.def index 186f172798f..b57825a9714 100644 --- a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/rom.def +++ b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/rom.def @@ -1986,6 +1986,24 @@ + + + + true + + + + false + + + + false + + + + false + + diff --git a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/i18n/Messages.properties b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/i18n/Messages.properties index 26826248f14..4f223f39404 100644 --- a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/i18n/Messages.properties +++ b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/i18n/Messages.properties @@ -2673,7 +2673,11 @@ Element.ReportDesign.Emitter.pdf.document.append=PDF, document(s) append Element.ReportDesign.Emitter.pdfa.font.fallback=PDF/A, fallback font (full qualified file name) Element.ReportDesign.Emitter.pdfa.font.cid.embed=PDF/A, include the CIDSet font stream Element.ReportDesign.Emitter.pdfa.document.title.embed=PDF/A, embed title - +Element.ReportDesign.Emitter.word=Emitter Word configuration +Element.ReportDesign.Emitter.word.combineMarginPadding=Use margin & padding for spacing (only without layout-grid) +Element.ReportDesign.Emitter.word.addEmptyParagraphForListCell=List element, add empty line of cell end +Element.ReportDesign.Emitter.word.wrappedTableForMarginPadding=Text element, use layout-grid for margin & padding +Element.ReportDesign.Emitter.word.wrappedTableHeaderFooter=Page header & footer, use layout-grid #2. Report Element ( Prefix = Element.ReportElement ) Element.ReportElement.displayName=Display name diff --git a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/DesignWriterImpl.java b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/DesignWriterImpl.java index 5c53ae35b3a..f4ce68c2df3 100644 --- a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/DesignWriterImpl.java +++ b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/DesignWriterImpl.java @@ -150,6 +150,11 @@ protected void writeSimpleProperties(ReportDesign obj) { property(obj, IInternalReportDesignModel.PDF_FONT_CID_SET); property(obj, IInternalReportDesignModel.PDFA_DOCUMENT_EMBED_TITLE); + property(obj, IInternalReportDesignModel.WORD_COMBINE_MARGIN_PADDING); + property(obj, IInternalReportDesignModel.WORD_LIST_CELL_ADD_EMPTY_PARA); + property(obj, IInternalReportDesignModel.WORD_WRAP_TABLE_FOR_MARGIN_PADDING); + property(obj, IInternalReportDesignModel.WORD_WRAP_TABLE_FOR_HEADER_FOOTER); + // include libraries and scripts writeStructureList(obj, IModuleModel.LIBRARIES_PROP);