From ab6eab8b69338af33fb0d94dfea9fca9ee471810 Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 4 Dec 2013 17:31:35 +0000 Subject: [PATCH] FNP: Fix AOP One column transitions that had extraneous (HLS.0) text --- .../Extension/TransitionExt.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs index d53f0f4b..e2b07352 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs @@ -636,6 +636,9 @@ namespace VEPROMS.CSLA.Library } private static string Tab(ItemInfo item, bool doStep) { + // if this section has the DSS_AddDotZeroStdHLS, then we need to account for this when + // concatenating text onto the tabs. + bool hasDotZero = (item.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_AddDotZeroStdHLS) == E_DocStructStyle.DSS_AddDotZeroStdHLS; if (item == null) return ""; string sret = ""; switch (item.MyContent.Type / 10000) @@ -687,6 +690,7 @@ namespace VEPROMS.CSLA.Library { thisTab = thisTab.Trim(" ".ToCharArray()); if (hasDelim && !thisTab.EndsWith(".") && !thisTab.EndsWith(")")) thisTab = thisTab + "."; + if (hasDotZero && thisTab.EndsWith(".0.")) thisTab = thisTab.Substring(0, thisTab.Length - 2); } // RHM 20130326 2039 - I added the logic to limit the addition of the section tab to // the existing tab if it starts the same. @@ -711,7 +715,13 @@ namespace VEPROMS.CSLA.Library foreach (string rmvDelim in DelimList) hlsTab = hlsTab.Replace(rmvDelim, ""); hlsTab = hlsTab.Trim(" ".ToCharArray()); if (hasDelim && !hlsTab.EndsWith(".") && !hlsTab.EndsWith(")")) hlsTab = hlsTab + "."; - sret = hlsTab + sret; + if (hasDotZero) + { + if (hlsTab.EndsWith(".0.")) hlsTab = hlsTab.Substring(0, hlsTab.Length - 2); + if (sret == "" || !sret.StartsWith(hlsTab)) sret = hlsTab + sret; + } + else + sret = hlsTab + sret; } } break; @@ -906,6 +916,9 @@ namespace VEPROMS.CSLA.Library retstr = retstr.Insert(indx, @"\u160?"); } } + // *** DO NOT DELETE - to fix a problem where the word ,step was appearing twice when there was no + // section tab. + //if (retstr!=null&&retstr!="") tb.AppendPrefix(); tb.AppendPrefix(); tb.ReplaceToken(retstr); return (retstr != null && retstr != "");