Merge branch 'RED-9925-fixes' into 'master'

RED-9925 - Remove extra breakline from report

Closes RED-9925

See merge request redactmanager/redaction-report-service!99
This commit is contained in:
Andrei Isvoran 2024-09-20 14:00:14 +02:00
commit 21775d5a7d

View File

@ -587,7 +587,9 @@ public class WordReportGenerationService {
private int setText(XWPFTableCell cell, String value) {
// Apache POI automatically adds an initial empty paragraph to a cell resulting in a break line.
cell.removeParagraph(0);
if (cell.getParagraphs() != null && !cell.getParagraphs().isEmpty()) {
cell.removeParagraph(0);
}
cell.setVerticalAlignment(XWPFTableCell.XWPFVertAlign.CENTER);
XWPFParagraph addParagraph = cell.addParagraph();
XWPFRun run = addParagraph.createRun();