Support 'BoldHighLevel' format flag and fix section tabs with spaces.
This commit is contained in:
parent
a425670a08
commit
bca68b2fd0
@ -1736,6 +1736,7 @@ namespace VEPROMS.CSLA.Library
|
||||
int typindx = type - 20000; // what to do for other types rather than steps
|
||||
font = format.PlantFormat.FormatData.StepDataList[typindx].Font;
|
||||
if (typindx == _ParagraphType) font = AdjustForTextSubFollowsTextStyle(format,typindx,font);
|
||||
if (IsRNOPart && MyParent.IsHigh && FormatStepData.BoldHighLevel) font = BoldTextStyle(font);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1745,6 +1746,14 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
return font;
|
||||
}
|
||||
private VE_Font BoldTextStyle(VE_Font font)
|
||||
{
|
||||
E_Style myStyle = (E_Style) font.Style;
|
||||
myStyle |= E_Style.Bold;
|
||||
if (myStyle != font.Style)
|
||||
font = new VE_Font(font.Family, (int)font.Size, myStyle, (float)font.CPI);
|
||||
return font;
|
||||
}
|
||||
private const int _ParagraphType=24;
|
||||
protected VE_Font AdjustForTextSubFollowsTextStyle(VE_Font font)
|
||||
{
|
||||
@ -4900,9 +4909,13 @@ namespace VEPROMS.CSLA.Library
|
||||
string ch = DisplayNumber != null && DisplayNumber != "" ? DisplayNumber.Substring(0,1) : null;
|
||||
int Snum = GetSectionNum();
|
||||
if (Snum == -1)
|
||||
{
|
||||
if (ch[0] == ' ') ch = DisplayNumber != null && DisplayNumber.TrimStart() != "" ? DisplayNumber.TrimStart().Substring(0, 1) : null;
|
||||
retStr = ch + ".";
|
||||
else {
|
||||
string tmp = DisplayNumber.IndexOf(".")>-1?DisplayNumber.Substring(0,DisplayNumber.IndexOf(".")):DisplayNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
string tmp = DisplayNumber.IndexOf(".") > -1 ? DisplayNumber.Substring(0, DisplayNumber.IndexOf(".")) : DisplayNumber;
|
||||
if (underline)
|
||||
retStr = @"\ul " + tmp + "." + Snum.ToString() + @"\ul0 ";
|
||||
else
|
||||
@ -4919,7 +4932,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if there is a number after the '.', return it as a number. For example if it is 001, return a 1:
|
||||
string tmpstr = indx+1<DisplayNumber.Length?DisplayNumber.Substring(indx+1):null;
|
||||
// if the section's tab is a letter, we don't want a 0 on the section.... for example A.0.
|
||||
if (IsSection && tmpstr == null && System.Char.IsLetter(DisplayNumber, 0)) return -1;
|
||||
if (IsSection && tmpstr == null && System.Char.IsLetter(DisplayNumber.TrimStart(), 0)) return -1;
|
||||
if (tmpstr != null && tmpstr.IndexOf('-') >= 0) return -1;
|
||||
if (tmpstr == null) return 0;
|
||||
Int32 x;
|
||||
|
Loading…
x
Reference in New Issue
Block a user