Skip to content

Commit

Permalink
Fixed empty paragraph in first table cell.
Browse files Browse the repository at this point in the history
- see #534
  • Loading branch information
ylussaud committed Nov 4, 2024
1 parent e28e913 commit 554b53f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1726,15 +1726,18 @@ private void setCellContent(XWPFTableCell cell, MCell mCell) {
final IBody savedGeneratedDocument = generatedDocument;
final XWPFParagraph savedGeneratedParagraph = currentGeneratedParagraph;
final XWPFParagraph savedTemplateParagraph = currentTemplateParagraph;
final boolean savedforceNewParagraph = forceNewParagraph;
generatedDocument = cell;
currentGeneratedParagraph = cellParagraph;
currentTemplateParagraph = cellParagraph;
forceNewParagraph = false;
try {
insertObject(cellParagraph, contents, cellRun);
} finally {
generatedDocument = savedGeneratedDocument;
currentGeneratedParagraph = savedGeneratedParagraph;
currentTemplateParagraph = savedTemplateParagraph;
forceNewParagraph = savedforceNewParagraph;
}
cellParagraph.removeRun(cellParagraph.getRuns().indexOf(cellRun));
if (startWithMParagraph(contents)) {
Expand Down

0 comments on commit 554b53f

Please sign in to comment.