update common models

This commit is contained in:
Efstratios Giannopoulos 2024-04-25 12:14:35 +03:00
parent 69f7ae7c34
commit b981876d86
2 changed files with 6 additions and 6 deletions

View File

@ -326,7 +326,7 @@ public class WordBuilderImpl implements WordBuilder {
// CTDecimalNumber number = paragraph.getCTP().getPPr().getNumPr().addNewIlvl();
// number.setVal(BigInteger.valueOf(indent));
paragraphPos = mainDocumentPart.getPosOfParagraph(paragraph);
if (!fieldSetModel.getMultiplicity().getTableView() && propertyDefinitionFieldSetItemModels.size() > 1) {
if (fieldSetModel.getMultiplicity() != null && !fieldSetModel.getMultiplicity().getTableView() && propertyDefinitionFieldSetItemModels.size() > 1) {
XWPFParagraph paragraphInner = addParagraphContent(c + ". ", mainDocumentPart, ParagraphStyle.TEXT, numId, indent);
paragraphPosInner = mainDocumentPart.getPosOfParagraph(paragraphInner);
hasMultiplicityItems = true;
@ -336,7 +336,7 @@ public class WordBuilderImpl implements WordBuilder {
XWPFTable tbl = null;
XWPFTableRow row = null;
int numOfRows = 0;
if (fieldSetModel.getMultiplicity().getTableView()) {
if (fieldSetModel.getMultiplicity() != null && fieldSetModel.getMultiplicity().getTableView()) {
tbl = mainDocumentPart.createTable();
tbl.setTableAlignment(TableRowAlign.CENTER);
mainDocumentPart.createParagraph();
@ -344,7 +344,7 @@ public class WordBuilderImpl implements WordBuilder {
numOfRows = tbl.getRows().size();
row = tbl.createRow();
}
if (fieldSetModel.getMultiplicity().getTableView()) {
if (fieldSetModel.getMultiplicity() != null && fieldSetModel.getMultiplicity().getTableView()) {
hasValue = createFieldsInTable(fieldSetModel, propertyDefinitionFieldSetItemModels.getFirst(), row, indent, createListing, hasMultiplicityItems, numOfRows, visibilityService);
numOfRows++;
} else {
@ -360,7 +360,7 @@ public class WordBuilderImpl implements WordBuilder {
if (propertyDefinitionFieldSetItemModels.size() > 1) {
for (PropertyDefinitionFieldSetItemModel multiplicityFieldset : propertyDefinitionFieldSetItemModels.stream().skip(1).toList()) {
paragraphPosInner = -1;
if (!fieldSetModel.getMultiplicity().getTableView() && !createListing) {
if (fieldSetModel.getMultiplicity() != null && !fieldSetModel.getMultiplicity().getTableView() && !createListing) {
c++;
// addParagraphContent(c + ". ", mainDocumentPart, ParagraphStyle.HEADER6, numId);
XWPFParagraph paragraphInner = addParagraphContent(c + ". ", mainDocumentPart, ParagraphStyle.TEXT, numId, indent);
@ -370,7 +370,7 @@ public class WordBuilderImpl implements WordBuilder {
}
// hasValue = createFields(multiplicityFieldset.getFields(), mainDocumentPart, 3, createListing, visibilityRuleService, hasMultiplicityItems);
boolean hasValueInner = false;
if (fieldSetModel.getMultiplicity().getTableView()) {
if (fieldSetModel.getMultiplicity() != null && fieldSetModel.getMultiplicity().getTableView()) {
row = tbl.createRow();
hasValueInner = createFieldsInTable(fieldSetModel, multiplicityFieldset, row, indent, createListing, hasMultiplicityItems, numOfRows, visibilityService);
numOfRows++;

View File

@ -25,7 +25,7 @@
<dependency>
<groupId>gr.cite.opendmp</groupId>
<artifactId>file-transformer-base</artifactId>
<version>0.0.13</version>
<version>0.0.14</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>