Fix an issue

This commit is contained in:
George Kalampokis 2024-02-02 17:54:15 +02:00
parent 7716345a73
commit c51cfac31e
1 changed files with 3 additions and 1 deletions

View File

@ -315,7 +315,9 @@ public class WordBuilder {
if (section.getSections() != null) {
createSections(section.getSections(), mainDocumentPart, ParagraphStyle.HEADER5, indent + 1, createListing, page, tempSectionString);
}
hasValue = createCompositeFields(section.getFieldSets(), mainDocumentPart, indent + 1, createListing, page, tempSectionString);
if (section.getFieldSets() != null) {
hasValue = createCompositeFields(section.getFieldSets(), mainDocumentPart, indent + 1, createListing, page, tempSectionString);
}
if (!hasValue && paragraphPos > -1) {
mainDocumentPart.removeBodyElement(paragraphPos);