This commit is contained in:
parent
2a300b24eb
commit
c6821188c5
@ -1370,7 +1370,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
myStyle |= isBold ? E_Style.Bold : 0;
|
myStyle |= isBold ? E_Style.Bold : 0;
|
||||||
myStyle |= isMmBold ? E_Style.MmBold : 0;
|
myStyle |= isMmBold ? E_Style.MmBold : 0;
|
||||||
if (myStyle != font.Style)
|
if (myStyle != font.Style)
|
||||||
font = new VE_Font(font.Family, (int)font.Size, myStyle);
|
font = new VE_Font(font.Family, (int)font.Size, myStyle, (float)font.CPI);
|
||||||
}
|
}
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
@ -2026,7 +2026,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (IsCaution || IsNote) tbformat = CheckNoteCautionTab(tbformat);
|
if (IsCaution || IsNote) tbformat = CheckNoteCautionTab(tbformat);
|
||||||
|
|
||||||
int ordinal = Ordinal;
|
int ordinal = Ordinal;
|
||||||
if (!IsSection && !IsProcedure) tbformat = tbformat.Replace("{Section Prefix}", this.ActiveSection.MyTab.CleanText);
|
bool trimTabStart = false;
|
||||||
|
if (!IsSection && !IsProcedure && tbformat.IndexOf("{Section Prefix}") >= 0)
|
||||||
|
{
|
||||||
|
// if there is a section prefix, trim any spaces from the start of this tab, so we don't have
|
||||||
|
// a tab that looks like "1. 1"
|
||||||
|
if (ActiveSection.MyTab.CleanText != null && ActiveSection.MyTab.CleanText != "") trimTabStart = true;
|
||||||
|
tbformat = tbformat.Replace("{Section Prefix}", SectionPrefix(tbformat));
|
||||||
|
}
|
||||||
string alpha = AlphabeticalNumbering(ordinal);
|
string alpha = AlphabeticalNumbering(ordinal);
|
||||||
tbformat = tbformat.Replace("{alpha}", alpha.ToLower());
|
tbformat = tbformat.Replace("{alpha}", alpha.ToLower());
|
||||||
tbformat = tbformat.Replace("{alphaWpar}", alpha.ToLower());
|
tbformat = tbformat.Replace("{alphaWpar}", alpha.ToLower());
|
||||||
@ -2035,7 +2042,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
string roman = RomanNumbering(ordinal);
|
string roman = RomanNumbering(ordinal);
|
||||||
tbformat = tbformat.Replace("{roman}", roman.ToLower());
|
tbformat = tbformat.Replace("{roman}", roman.ToLower());
|
||||||
tbformat = tbformat.Replace("{ROMAN}", roman);
|
tbformat = tbformat.Replace("{ROMAN}", roman);
|
||||||
tbformat = tbformat.Replace("{numeric}", ordinal.ToString().PadLeft(2));
|
tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : ordinal.ToString().PadLeft(2));
|
||||||
tbformat = tbformat.Replace("{numericWpar}", ordinal.ToString());
|
tbformat = tbformat.Replace("{numericWpar}", ordinal.ToString());
|
||||||
|
|
||||||
if (tbformat.IndexOf("{!C0}") > -1)
|
if (tbformat.IndexOf("{!C0}") > -1)
|
||||||
@ -2045,7 +2052,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (FormatStepData.Sep != null && MyPrevious != null)
|
if (FormatStepData.Sep != null && MyPrevious != null)
|
||||||
{
|
{
|
||||||
if (_MyHeader == null) _MyHeader = new MetaTag(FormatStepData.TabData.Font);
|
if (_MyHeader == null) _MyHeader = new MetaTag(FormatStepData.TabData.Font);
|
||||||
_MyHeader.Text = _MyHeader.CleanText = FormatStepData.Sep;
|
_MyHeader.Text = FormatStepData.Sep;
|
||||||
|
_MyHeader.CleanText = StripRtfFormatting(_MyHeader.Text);
|
||||||
_MyHeader.Justify = ContentAlignment.MiddleCenter;
|
_MyHeader.Justify = ContentAlignment.MiddleCenter;
|
||||||
}
|
}
|
||||||
#region Non HLP tab TODO
|
#region Non HLP tab TODO
|
||||||
@ -2090,6 +2098,17 @@ namespace VEPROMS.CSLA.Library
|
|||||||
_MyTab.Text = tbformat;
|
_MyTab.Text = tbformat;
|
||||||
_MyTab.CleanText = cltext != null ? cltext : tbformat;
|
_MyTab.CleanText = cltext != null ? cltext : tbformat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string SectionPrefix(string tbformat)
|
||||||
|
{
|
||||||
|
// 16 bit has code that handles various levels of sections with a flag called TieTabToLevel. This
|
||||||
|
// code will need to be added at some point. For now, handle the basic case of just getting the
|
||||||
|
// section tab up to and including the '.'.
|
||||||
|
int indxs = ActiveSection.MyTab.CleanText.IndexOf(".");
|
||||||
|
// if the '.' is found, include it in the tab:
|
||||||
|
return indxs > 0 ? ActiveSection.MyTab.CleanText.Substring(0, indxs + 1) : ActiveSection.MyTab.CleanText.Trim();
|
||||||
|
}
|
||||||
|
|
||||||
private string CheckNoteCautionTab(string tbformat)
|
private string CheckNoteCautionTab(string tbformat)
|
||||||
{
|
{
|
||||||
string prevTbFormat = null;
|
string prevTbFormat = null;
|
||||||
@ -2112,8 +2131,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (FormatStepData.TabData.Justify == "Center")
|
if (FormatStepData.TabData.Justify == "Center")
|
||||||
{
|
{
|
||||||
_MyHeader.Justify = ContentAlignment.MiddleCenter;
|
_MyHeader.Justify = ContentAlignment.MiddleCenter;
|
||||||
_MyHeader.Text = _MyHeader.CleanText = tbformat.Trim(); ;
|
_MyHeader.Text = tbformat.Trim(); ;
|
||||||
|
_MyHeader.CleanText = StripRtfFormatting(_MyHeader.Text);
|
||||||
// if there is only step in the group - no bullet is used, if more that one replace the tab
|
// if there is only step in the group - no bullet is used, if more that one replace the tab
|
||||||
// with a bullet
|
// with a bullet
|
||||||
if (MyPrevious == null && NextItem == null)
|
if (MyPrevious == null && NextItem == null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user