Added code to handle diamond1 format item

Added RNOWidthAdj flag for Braidwood
This commit is contained in:
Rich 2014-01-08 20:13:11 +00:00
parent 1b09d64a7f
commit 74886aa3b4
2 changed files with 54 additions and 34 deletions

View File

@ -2516,7 +2516,7 @@ namespace VEPROMS.CSLA.Library
{
_MyTab.CleanText = ((ItemInfo)ActiveParent).MyTab.CleanText;
_MyTab.Text = ((ItemInfo)ActiveParent).MyTab.Text;
_MyTab.RNOTabWidthAdjust = ((ItemInfo)ActiveParent).FormatStepData.TabData.RNOAdjustTabSize ?? 0;
_MyTab.RNOTabWidthAdjust = ((ItemInfo)ActiveParent).FormatStepData.TabData.RNOAdjustTabSize??0;
if (((ItemInfo)ActiveParent).MyTab.Offset != 0) _MyTab.Offset = ((ItemInfo)ActiveParent).MyTab.Offset;
if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOExcludeMacros)
_MyTab.Text = Regex.Replace(_MyTab.Text, "{!.+?}", " ");
@ -2556,7 +2556,7 @@ namespace VEPROMS.CSLA.Library
// the ident of the step:
bool useSubStepTabs = false;
if (doMeta && IsHigh
&& !seqtabs[(localPrintLevel < 0 ? 0 : localPrintLevel) % seqtabs.Count].TabToken.Contains("{numericWpar}")
&& !seqtabs[(localPrintLevel<0?0:localPrintLevel) % seqtabs.Count].TabToken.Contains("{numericWpar}")
&& tbformat.Contains("{")) useSubStepTabs = true;
// Check to be sure the parent tab should be included... If this sequential is within a note
@ -2649,7 +2649,7 @@ namespace VEPROMS.CSLA.Library
if (!(((MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_AddDotZeroStdHLS) == E_DocStructStyle.DSS_AddDotZeroStdHLS) && this.MyHLS.MyContent.Type == 20002))
{
int indxlb = tbformat.IndexOf("#");
string ofst = tbformat.Substring(indxlb + 1, 3);
string ofst = tbformat.Substring(indxlb+1, 3);
_MyTab.Offset = Convert.ToInt32(ofst.Substring(0, 1)) * (int)FormatStepData.TabData.Font.CharsToTwips;
}
tbformat = tbformat.Replace("#2#", "").Replace("#1#", "");
@ -2658,9 +2658,9 @@ namespace VEPROMS.CSLA.Library
{
int begPos = tbformat.IndexOf("{Pos");
int endPos = tbformat.IndexOf("}");
string ofst = tbformat.Substring(begPos + 4, endPos - begPos - 4);
string ofst = tbformat.Substring(begPos + 4, endPos-begPos-4);
_MyTab.Position = -(Convert.ToInt32(ofst) * (int)FormatStepData.TabData.Font.CPI);
tbformat = tbformat.Remove(begPos, endPos + 1);
tbformat = tbformat.Remove(begPos,endPos+1);
}
// if this is a caution/note type determine where 'NOTE/CAUTION' tab goes, as tab or as 'header'
// and also determine whether the tab itself gets converted to a bullet.
@ -2695,14 +2695,14 @@ namespace VEPROMS.CSLA.Library
tbformat = tbformat.Replace("{numeric}", ordinal.ToString().PadLeft(2) + ".0");
tbformat = tbformat.Substring(0, tbformat.Length - 2);
}
tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : FormatStepData.AtLeastTwoDigits ? ordinal.ToString().PadLeft(2, '0') : ordinal.ToString().PadLeft(2));
tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : FormatStepData.AtLeastTwoDigits ? ordinal.ToString().PadLeft(2,'0') : ordinal.ToString().PadLeft(2));
if (tbformate != null) tbformate = tbformate.Replace("{numeric}", trimTabStart ? ordinal.ToString() : FormatStepData.AtLeastTwoDigits ? ordinal.ToString().PadLeft(2, '0') : ordinal.ToString().PadLeft(2));
tbformat = tbformat.Replace("{numericWpar}", ordinal.ToString());
if (tbformat.Contains("{asterisk}"))
{
// if this has a checkoff - need to set location of the asterisk - because the asterisk has to come before
// the checkoff. Otherwise, it doesn't matter
_MyTab.AsteriskOffset = -10;
_MyTab.AsteriskOffset = - 10;
tbformat = tbformat.Replace("{asterisk}", ""); // the asteriskoffset flags a '*' to be printed at xloc - this.
}
int macroindx = tbformat.IndexOf("{!C");
@ -2711,6 +2711,18 @@ namespace VEPROMS.CSLA.Library
cltext = cltext == null ? tbformat.Remove(macroindx, 5) : cltext.Remove(macroindx, 5);
cltext = cltext + " ";
}
macroindx = tbformat.IndexOf("{!diamond1}");
if (macroindx > -1) //i found it
{
cltext = cltext == null ? tbformat.Remove(macroindx, 11) : cltext.Remove(macroindx, 11);
cltext = cltext + " ";
}
macroindx = tbformat.IndexOf("{!diamond}");
if (macroindx > -1) //i found it
{
cltext = cltext == null ? tbformat.Remove(macroindx, 10) : cltext.Remove(macroindx, 10);
cltext = cltext + " ";
}
// "{Null}" was introduced so that inheritance in format files could differentiate between an
// empty string, and null. And also, so that if a tab was null but it's parent had text in the
// tab, don't inherit the parent's tab, use a null.
@ -4917,7 +4929,7 @@ namespace VEPROMS.CSLA.Library
}
else
{
string tmp = DisplayNumber.IndexOf(".") > -1 ? DisplayNumber.Substring(0, DisplayNumber.IndexOf(".")) : DisplayNumber;
string tmp = DisplayNumber.IndexOf(".")>-1?DisplayNumber.Substring(0,DisplayNumber.IndexOf(".")):DisplayNumber;
if (underline)
retStr = @"\ul " + tmp + "." + Snum.ToString() + @"\ul0 ";
else

View File

@ -2695,6 +2695,14 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _RNOWidthAlt, "@RNOWidthAlt");
}
}
private LazyLoad<string> _RNOWidthAdj;
public string RNOWidthAdj
{
get
{
return LazyLoad(ref _RNOWidthAdj, "@RNOWidthAdj");
}
}
private LazyLoad<int?> _HLSWidthOVRD;
public int? HLSWidthOVRD
{