手册修订记录内容自适应,表头设置宋体五号字体

This commit is contained in:
zhal 2023-09-07 22:38:10 +08:00
parent ed61d9be11
commit 2692664007
2 changed files with 10 additions and 4 deletions

View File

@ -417,7 +417,7 @@ public class OutputWordUtil {
TextRange tr2 = paragraph2.appendText("修订记录");
tr2.getCharacterFormat().setBold(true);
tr2.getCharacterFormat().setFontName("宋体");
tr2.getCharacterFormat().setFontSize(10.5f);
tr2.getCharacterFormat().setFontSize(12f);
paragraph2.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式
@ -475,7 +475,8 @@ public class OutputWordUtil {
TextRange txtRange = p.appendText(header[i]);
txtRange.getCharacterFormat().setBold(true);
//txtRange.getCharacterFormat().setFontSize();
txtRange.getCharacterFormat().setFontName("宋体");
txtRange.getCharacterFormat().setFontSize(10.5f);
}
@ -487,7 +488,7 @@ public class OutputWordUtil {
TableRow dataRow = table.getRows().get(r + 1);
dataRow.setHeight(25);
dataRow.setHeightType(TableRowHeightType.Exactly);
dataRow.setHeightType(TableRowHeightType.Auto);
dataRow.getRowFormat().setBackColor(Color.white);
for (int c = 0; c < data[r].length; c++) {
@ -759,7 +760,8 @@ public class OutputWordUtil {
p.getFormat().setHorizontalAlignment(Center);
TextRange txtRange = p.appendText(header[i]);
txtRange.getCharacterFormat().setBold(true);
txtRange.getCharacterFormat().setFontName("宋体");
txtRange.getCharacterFormat().setFontSize(10.5f);
}
@ -875,6 +877,8 @@ public class OutputWordUtil {
p.getFormat().setHorizontalAlignment(Center);
TextRange txtRange = p.appendText(header[i]);
txtRange.getCharacterFormat().setBold(true);
txtRange.getCharacterFormat().setFontName("宋体");
txtRange.getCharacterFormat().setFontSize(10.5f);
}
@ -967,6 +971,8 @@ public class OutputWordUtil {
p.getFormat().setHorizontalAlignment(Center);
TextRange txtRange = p.appendText(header[i]);
txtRange.getCharacterFormat().setBold(true);
txtRange.getCharacterFormat().setFontName("宋体");
txtRange.getCharacterFormat().setFontSize(10.5f);
}
//将数据添加到其余行