From 7c497c7c57e94e4100f860214f8f4d4c08ce1e31 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Mon, 26 Sep 2022 14:07:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E6=8A=A5=E5=AF=BC=E5=87=BA--=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=9B=AE=E5=BD=95=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LawsMonthlyReportWriteEOServiceImpl.java | 45 ++++++++-------- .../jero/modules/report/util/WordUtil.java | 53 +++++++++++++++++-- 2 files changed, 72 insertions(+), 26 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java index 5eacaccbc..fb6b02180 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java @@ -648,8 +648,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl lawsMonthlyReportWriteEOS, List lawsMonthlyReportTitleTemplateEOS, @@ -902,8 +902,9 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl新征求意见清单模板, 新发布标准清单模板 @@ -950,13 +951,13 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl style is more prominent in the formats bar + ctStyle.setUiPriority(indentNumber); + + CTOnOff onoffnull = CTOnOff.Factory.newInstance(); + ctStyle.setUnhideWhenUsed(onoffnull); + // style shows up in the formats bar + ctStyle.setQFormat(onoffnull); + // style defines a heading of the given level + CTPPr ppr = CTPPr.Factory.newInstance(); + ppr.setOutlineLvl(indentNumber); + ctStyle.setPPr(ppr); + XWPFStyle style = new XWPFStyle(ctStyle); + // is a null op if already defined + XWPFStyles styles = docxDocument.createStyles(); + style.setType(STStyleType.PARAGRAPH); + styles.addStyle(style); + } + // @SneakyThrows // public static void exportHeardAndFoot(XWPFDocument document){ //// XWPFDocument document = new XWPFDocument();