Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ private void appendPageField(XWPFParagraph para, PageFieldNode field) {
// the node's text style like any other run — Word keeps a field result's
// formatting when it repaints it, so an unstyled placeholder would snap
// a styled page number back to the document default.
XWPFRun run = new XWPFRun(simple.addNewR(), para);
XWPFRun run = new XWPFRun(simple.addNewR(), (IRunBody) para);
applyStyle(run, field.textStyle());
run.setText(fieldPlaceholder(field.kind()));
}
Expand Down Expand Up @@ -2186,7 +2186,7 @@ private void writePageReference(XWPFDocument document,
} else {
CTSimpleField field = para.getCTP().addNewFldSimple();
field.setInstr(" PAGEREF " + bookmark + " \\h ");
run = new XWPFRun(field.addNewR(), para);
run = new XWPFRun(field.addNewR(), (IRunBody) para);
}
applyStyle(run, node.textStyle());
run.setText(shown);
Expand Down
Loading