diff --git a/plugins/org.obeonetwork.m2doc/src/org/obeonetwork/m2doc/generator/M2DocEvaluator.java b/plugins/org.obeonetwork.m2doc/src/org/obeonetwork/m2doc/generator/M2DocEvaluator.java index b8c67d8c4..678851a9d 100644 --- a/plugins/org.obeonetwork.m2doc/src/org/obeonetwork/m2doc/generator/M2DocEvaluator.java +++ b/plugins/org.obeonetwork.m2doc/src/org/obeonetwork/m2doc/generator/M2DocEvaluator.java @@ -698,17 +698,24 @@ private XWPFParagraph insertObject(XWPFParagraph paragraph, Object object, XWPFR insertMImage(imageParagraph, imageRun, (MImage) object); res = imageParagraph; } else { + // nothing to do here res = paragraph; } } else if (object instanceof MText) { - res = (XWPFParagraph) insertMText(paragraph, run, (MText) object).getParent(); + if (((MText) object).getText() != null && !((MText) object).getText().isEmpty()) { + res = (XWPFParagraph) insertMText(paragraph, run, (MText) object).getParent(); + } else { + // nothing to do here + res = paragraph; + } } else if (object instanceof MTable) { - if (!((MTable) object).getRows().isEmpty()) { + if (!((MTable) object).getRows().isEmpty() && ((MTable) object).getColumnsCount() != 0) { XWPFRun tableRun = run; tableRun.getCTR().getInstrTextList().clear(); insertMTable(tableRun, (MTable) object); res = (XWPFParagraph) tableRun.getParent(); } else { + // nothing to do here res = paragraph; } } else if (object instanceof MPagination) { @@ -716,15 +723,32 @@ private XWPFParagraph insertObject(XWPFParagraph paragraph, Object object, XWPFR } else if (object instanceof MParagraph) { res = insertMParagraph(generatedDocument, (MParagraph) object, run); } else if (object instanceof IBody) { - final XWPFRun bodyRun = insertFieldRunReplacement(paragraph, run, ""); - res = insertBody((XWPFParagraph) bodyRun.getParent(), (IBody) object); + if (!((IBody) object).getBodyElements().isEmpty()) { + final XWPFRun bodyRun = insertFieldRunReplacement(paragraph, run, ""); + res = insertBody((XWPFParagraph) bodyRun.getParent(), (IBody) object); + } else { + // nothing to do here + res = paragraph; + } } else if (object instanceof GenerationResult) { - final XWPFRun generationRun = insertFieldRunReplacement(paragraph, run, ""); - res = insertGenerationResult((XWPFParagraph) generationRun.getParent(), (GenerationResult) object); + if (!((GenerationResult) object).getBody().getBodyElements().isEmpty()) { + final XWPFRun generationRun = insertFieldRunReplacement(paragraph, run, ""); + res = insertGenerationResult((XWPFParagraph) generationRun.getParent(), (GenerationResult) object); + } else { + // nothing to do here + res = paragraph; + } } else if (object == null) { - res = (XWPFParagraph) insertFieldRunReplacement(paragraph, run, "").getParent(); + // nothing to do here + res = paragraph; } else { - res = (XWPFParagraph) insertFieldRunReplacement(paragraph, run, object.toString()).getParent(); + final String stringValue = object.toString(); + if (stringValue != null && !stringValue.isEmpty()) { + res = (XWPFParagraph) insertFieldRunReplacement(paragraph, run, stringValue).getParent(); + } else { + // nothing to do here + res = paragraph; + } } return res; @@ -744,9 +768,9 @@ private XWPFParagraph insertGenerationResult(XWPFParagraph paragraph, Generation result.addMessage(message); } - final XWPFParagraph insertBody = insertBody(paragraph, generationResult.getBody()); - currentGeneratedParagraph = insertBody; - return insertBody; + final XWPFParagraph res = insertBody(paragraph, generationResult.getBody()); + currentGeneratedParagraph = res; + return res; } /** diff --git a/tests/org.obeonetwork.m2doc.tests/resources/booleanServices/checkFalse/checkFalse-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/booleanServices/checkFalse/checkFalse-expected-generation.docx index 0f0752719..4cc7cfcca 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/booleanServices/checkFalse/checkFalse-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/booleanServices/checkFalse/checkFalse-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/booleanDocumentProperty/booleanDocumentProperty-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/booleanDocumentProperty/booleanDocumentProperty-expected-generation.docx index 51a45e5eb..304d3b8b4 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/booleanDocumentProperty/booleanDocumentProperty-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/booleanDocumentProperty/booleanDocumentProperty-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentAppVersion/documentAppVersion-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentAppVersion/documentAppVersion-expected-generation.docx index 1f68b7f73..db2e7d4f4 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentAppVersion/documentAppVersion-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentAppVersion/documentAppVersion-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentApplication/documentApplication-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentApplication/documentApplication-expected-generation.docx index ba6f51edb..30509cd84 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentApplication/documentApplication-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentApplication/documentApplication-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCategory/documentCategory-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCategory/documentCategory-expected-generation.docx index 657368436..5262a7f78 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCategory/documentCategory-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCategory/documentCategory-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCompany/documentCompany-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCompany/documentCompany-expected-generation.docx index e30cd67ca..0719f1acb 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCompany/documentCompany-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCompany/documentCompany-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentContentStatus/documentContentStatus-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentContentStatus/documentContentStatus-expected-generation.docx index 5a213cc33..63cc312cc 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentContentStatus/documentContentStatus-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentContentStatus/documentContentStatus-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentContentType/documentContentType-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentContentType/documentContentType-expected-generation.docx index f717f2573..8d348cbce 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentContentType/documentContentType-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentContentType/documentContentType-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCreator/documentCreator-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCreator/documentCreator-expected-generation.docx index 4f5c2d8e9..e74bad9e5 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCreator/documentCreator-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentCreator/documentCreator-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentDescription/documentDescription-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentDescription/documentDescription-expected-generation.docx index fcc81a05f..88da185a9 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentDescription/documentDescription-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentDescription/documentDescription-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentIdentifier/documentIdentifier-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentIdentifier/documentIdentifier-expected-generation.docx index ba7da9a43..12904b982 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentIdentifier/documentIdentifier-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentIdentifier/documentIdentifier-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentKeywords/documentKeywords-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentKeywords/documentKeywords-expected-generation.docx index cdba6372f..610879010 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentKeywords/documentKeywords-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentKeywords/documentKeywords-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentManager/documentManager-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentManager/documentManager-expected-generation.docx index 70a9dc2a6..2666578da 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentManager/documentManager-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentManager/documentManager-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentRevision/documentRevision-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentRevision/documentRevision-expected-generation.docx index ea42b8c8d..605d91d5e 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentRevision/documentRevision-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentRevision/documentRevision-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentSubject/documentSubject-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentSubject/documentSubject-expected-generation.docx index 9f5d9f1d0..19f0f1cf1 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentSubject/documentSubject-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentSubject/documentSubject-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentTitle/documentTitle-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentTitle/documentTitle-expected-generation.docx index f75da30f9..7022289dd 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentTitle/documentTitle-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentTitle/documentTitle-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentVersion/documentVersion-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentVersion/documentVersion-expected-generation.docx index ea2b55ff9..61f6e15f7 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentVersion/documentVersion-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/documentVersion/documentVersion-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/doubleDocumentProperty/doubleDocumentProperty-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/doubleDocumentProperty/doubleDocumentProperty-expected-generation.docx index 64c0d6522..4965f62be 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/doubleDocumentProperty/doubleDocumentProperty-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/doubleDocumentProperty/doubleDocumentProperty-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/integerDocumentProperty/integerDocumentProperty-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/integerDocumentProperty/integerDocumentProperty-expected-generation.docx index 7a702899c..4127a37d9 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/integerDocumentProperty/integerDocumentProperty-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/integerDocumentProperty/integerDocumentProperty-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/longDocumentProperty/longDocumentProperty-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/longDocumentProperty/longDocumentProperty-expected-generation.docx index dbd3a57a8..fb0cd0352 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/longDocumentProperty/longDocumentProperty-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/longDocumentProperty/longDocumentProperty-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringBooleanDocumentProperty/stringBooleanDocumentProperty-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringBooleanDocumentProperty/stringBooleanDocumentProperty-expected-generation.docx index 451b7539e..71d32b835 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringBooleanDocumentProperty/stringBooleanDocumentProperty-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringBooleanDocumentProperty/stringBooleanDocumentProperty-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringDocumentProperty/stringDocumentProperty-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringDocumentProperty/stringDocumentProperty-expected-generation.docx index e3c0fa4e4..31463edfb 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringDocumentProperty/stringDocumentProperty-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringDocumentProperty/stringDocumentProperty-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringDoubleDocumentProperty/stringDoubleDocumentProperty-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringDoubleDocumentProperty/stringDoubleDocumentProperty-expected-generation.docx index 67e14c295..e85d9888a 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringDoubleDocumentProperty/stringDoubleDocumentProperty-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringDoubleDocumentProperty/stringDoubleDocumentProperty-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringIntegerDocumentProperty/stringIntegerDocumentProperty-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringIntegerDocumentProperty/stringIntegerDocumentProperty-expected-generation.docx index fd86ee160..d571f60d8 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringIntegerDocumentProperty/stringIntegerDocumentProperty-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/documentServices/stringIntegerDocumentProperty/stringIntegerDocumentProperty-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTable/asTable-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTable/asTable-expected-generation.docx index 6ff637ca9..036fdf4da 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTable/asTable-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTable/asTable-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableEmptyColumn/asTableEmptyColumn-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableEmptyColumn/asTableEmptyColumn-expected-generation.docx index 041fd730f..74f9e1205 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableEmptyColumn/asTableEmptyColumn-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableEmptyColumn/asTableEmptyColumn-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableEmptyLine/asTableEmptyLine-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableEmptyLine/asTableEmptyLine-expected-generation.docx index 4681fc445..477d2d052 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableEmptyLine/asTableEmptyLine-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableEmptyLine/asTableEmptyLine-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableWithFont/asTableWithFont-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableWithFont/asTableWithFont-expected-generation.docx index 481801839..584a0032d 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableWithFont/asTableWithFont-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/excelServices/asTableWithFont/asTableWithFont-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/asImageNull/asImageNull-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/asImageNull/asImageNull-expected-generation.docx index 183d0659b..716fdf1d3 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/asImageNull/asImageNull-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/asImageNull/asImageNull-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/fitAllNull/fitAllNull-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/fitAllNull/fitAllNull-expected-generation.docx index cab2e37d1..9608f368a 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/fitAllNull/fitAllNull-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/fitAllNull/fitAllNull-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/fitNull/fitNull-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/fitNull/fitNull-expected-generation.docx index 807cfa026..e8dac7b27 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/fitNull/fitNull-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/fitNull/fitNull-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/resizeNull/resizeNull-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/resizeNull/resizeNull-expected-generation.docx index 686ed6b54..1d208649c 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/resizeNull/resizeNull-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/resizeNull/resizeNull-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/rotateNull/rotateNull-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/rotateNull/rotateNull-expected-generation.docx index 0e5c1122a..ddbf3a346 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/rotateNull/rotateNull-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/rotateNull/rotateNull-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setConserveRatioNull/setConserveRatioNull-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setConserveRatioNull/setConserveRatioNull-expected-generation.docx index b2ca182c3..fff915fd4 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setConserveRatioNull/setConserveRatioNull-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setConserveRatioNull/setConserveRatioNull-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setHeightNull/setHeightNull-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setHeightNull/setHeightNull-expected-generation.docx index fcf0c7194..9f02a360e 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setHeightNull/setHeightNull-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setHeightNull/setHeightNull-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setWidthNull/setWidthNull-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setWidthNull/setWidthNull-expected-generation.docx index 3d702db2a..0dc5066a1 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setWidthNull/setWidthNull-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/imageServices/setWidthNull/setWidthNull-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/query/null/null-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/query/null/null-expected-generation.docx index a5efa06f8..d63f6da5d 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/query/null/null-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/query/null/null-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/query/returningNothing/returningNothing-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/query/returningNothing/returningNothing-expected-generation.docx index 28943d2a5..2f4e0ba3c 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/query/returningNothing/returningNothing-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/query/returningNothing/returningNothing-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-expected-ast.txt b/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-expected-ast.txt new file mode 100644 index 000000000..9cf103768 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-expected-ast.txt @@ -0,0 +1,14 @@ + +=== HEADER === + +=== BODY === + + A simple demonstration of a template : + [query: .myTemplate(2)] + End of demonstration. +=== FOOTER === + +=== TEMPLATES === + +template myTemplate (a : java.lang.Integer) + [query: null] \ No newline at end of file diff --git a/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-expected-generation-messages.txt b/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-expected-generation-messages.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-expected-generation.docx new file mode 100644 index 000000000..fd9fc462b Binary files /dev/null and b/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-expected-validation.docx b/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-expected-validation.docx new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-template.docx b/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-template.docx new file mode 100644 index 000000000..a2e7b62f4 Binary files /dev/null and b/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent-template.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent.genconf b/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent.genconf new file mode 100644 index 000000000..d67d65733 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.tests/resources/template/emptyContent/emptyContent.genconf @@ -0,0 +1,2 @@ + + diff --git a/tests/org.obeonetwork.m2doc.tests/resources/template/withComment/withComment-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/template/withComment/withComment-expected-generation.docx index 4be8a5cf6..ca10f760e 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/template/withComment/withComment-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/template/withComment/withComment-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.tests/resources/template/withCommentBlock/withCommentBlock-expected-generation.docx b/tests/org.obeonetwork.m2doc.tests/resources/template/withCommentBlock/withCommentBlock-expected-generation.docx index d886000a3..12fc07d19 100644 Binary files a/tests/org.obeonetwork.m2doc.tests/resources/template/withCommentBlock/withCommentBlock-expected-generation.docx and b/tests/org.obeonetwork.m2doc.tests/resources/template/withCommentBlock/withCommentBlock-expected-generation.docx differ