From 2869c589cdb18e1b94be640af6c3b65a197833d6 Mon Sep 17 00:00:00 2001 From: Branden Phillips Date: Thu, 27 Feb 2020 16:55:05 -0700 Subject: bug[TW16646]: Adjust expressions for publishing to handle footers and section breaks Change-Id: I63ef1b9503d64960ef1725d80d5686f41e853853 Signed-off-by: Branden Phillips --- .../internal/wordupdate/WordTemplateContentRendererHandler.java | 1 + .../src/org/eclipse/osee/framework/core/util/ReportConstants.java | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordTemplateContentRendererHandler.java b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordTemplateContentRendererHandler.java index a4dc6b1ea41..956e5b9d988 100644 --- a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordTemplateContentRendererHandler.java +++ b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordTemplateContentRendererHandler.java @@ -89,6 +89,7 @@ public class WordTemplateContentRendererHandler { // if no extra paragraphs have been added this will replace the normal footer data = data.replaceAll(ReportConstants.ENTIRE_FTR_EXTRA_PARA, ""); data = data.replaceAll(ReportConstants.ENTIRE_FTR, ""); + data = data.replaceAll(ReportConstants.EMPTY_SECTION_BREAK, ReportConstants.PAGE_BREAK); data = data.replaceAll(ReportConstants.NO_DATA_RIGHTS, ""); if (wtcData.getIsEdit() && !data.contains("")) { diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/ReportConstants.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/ReportConstants.java index 2ee61d0554a..7e4da9dc8b2 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/ReportConstants.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/ReportConstants.java @@ -23,12 +23,13 @@ public class ReportConstants { public static final String FTR = ""; public static final String PAGE_SZ = "]*/>"; public static final String ENTIRE_FTR_EXTRA_PARA = - "]*>]*>()*]*>()?]*>[\\s\\S]+[\\s\\S]+"; - public static final String ENTIRE_FTR = - "]*>]*>[\\s\\S]+?"; + "]*>(]*>)*()*]*>()?]*>[\\s\\S]+[\\s\\S]+"; + public static final String ENTIRE_FTR = "]*>[\\s\\S]+?"; public static final String FULL_PARA_END = ""; public static final String NO_DATA_RIGHTS = "[\\s||\\S]+?NO DATA RIGHTS ARTIFACT FOUND[\\s\\S]+?"; + public static final String EMPTY_SECTION_BREAK = + "]*>]*>]*>]*>"; //wordml public static final String PG_SZ = ""; @@ -55,6 +56,7 @@ public class ReportConstants { public static final String BULLETSYM = ""; public static final String OLD_BULLET_STYLE = "bullettight1"; public static final String NEW_BULLET_STYLE = "bulletlvl2"; + public static final String PAGE_BREAK = ""; public static final String PARA_REGEX = ""; public static final String PARA_PROP_START = ""; public static final String PARA_PROP_REGEX = PARA_PROP_START + "(.*?)"; -- cgit v1.2.3