This commit is contained in:
parent
bc923f77a0
commit
f0d9003d0d
@ -491,6 +491,12 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return _PrintBias; }
|
||||
set { _PrintBias = value; }
|
||||
}
|
||||
private int _OffsetTab = 0;
|
||||
public int OffsetTab
|
||||
{
|
||||
get { return _OffsetTab; }
|
||||
set { _OffsetTab = value; }
|
||||
}
|
||||
private int _PrintLevel = 0;
|
||||
public int PrintLevel
|
||||
{
|
||||
@ -2406,6 +2412,8 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
_MyTab.CleanText = ((ItemInfo)ActiveParent).MyTab.CleanText;
|
||||
_MyTab.Text = ((ItemInfo)ActiveParent).MyTab.Text;
|
||||
if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOIdentPrint.Contains("{asterisk}"))
|
||||
_MyTab.AsteriskOffset = -10;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -2461,15 +2469,24 @@ namespace VEPROMS.CSLA.Library
|
||||
lv = lv % 2;
|
||||
tbformat = (lv == 0) ? "{numeric}." : "{alpha}.";
|
||||
}
|
||||
|
||||
bool trimTabStart = false;
|
||||
|
||||
if (useSubStepTabs || tbformat.IndexOf("{seq}") > -1)
|
||||
{
|
||||
int itmp = (localPrintLevel + PrintBias) % seqtabs.Count;
|
||||
int itmp = (localPrintLevel + PrintBias + OffsetTab) % seqtabs.Count;
|
||||
if (!tbformat.Contains(@"{!C"))
|
||||
tbformat = seqtabs[itmp].PrintTabFormat; // seqtab in 16bit, i.e. '. or )' etc.
|
||||
else
|
||||
tbformat = tbformat.Replace("{seq}", seqtabs[itmp].PrintTabFormat);
|
||||
string tbtoken = seqtabs[localPrintLevel % seqtabs.Count].TabToken; // seqstart in 16bit, number/letter
|
||||
|
||||
// if the tab has a character before the token, trim the front of tab:
|
||||
int br = tbformat.IndexOf("{");
|
||||
if (br > 0)
|
||||
{
|
||||
char isAChar = tbformat[br - 1];
|
||||
if ("{} #".IndexOf(isAChar) < 0) trimTabStart = true;
|
||||
}
|
||||
tbformat = tbformat.Replace("{seq}", tbtoken);
|
||||
}
|
||||
else
|
||||
@ -2511,16 +2528,15 @@ namespace VEPROMS.CSLA.Library
|
||||
// and also determine whether the tab itself gets converted to a bullet.
|
||||
if (IsCaution || IsNote) tbformat = CheckNoteCautionTab(tbformat);
|
||||
|
||||
int ordinal = Ordinal;
|
||||
bool trimTabStart = false;
|
||||
// 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 (!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"
|
||||
string tmpsectpref = SectionPrefix(tbformat) ?? string.Empty;
|
||||
if (ActiveSection.MyTab.CleanText != null && ActiveSection.MyTab.CleanText != "" && tmpsectpref != string.Empty) trimTabStart = true;
|
||||
tbformat = tbformat.Replace("{Section Prefix}", SectionPrefix(tbformat));
|
||||
}
|
||||
int ordinal = Ordinal;
|
||||
string alpha = AlphabeticalNumbering(ordinal);
|
||||
tbformat = tbformat.Replace("{alpha}", alpha.ToLower());
|
||||
tbformat = tbformat.Replace("{alphaWpar}", alpha.ToLower());
|
||||
@ -2531,7 +2547,13 @@ namespace VEPROMS.CSLA.Library
|
||||
tbformat = tbformat.Replace("{ROMAN}", roman);
|
||||
tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : ordinal.ToString().PadLeft(2));
|
||||
tbformat = tbformat.Replace("{numericWpar}", ordinal.ToString());
|
||||
tbformat = tbformat.Replace("{asterisk}", "*");
|
||||
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;
|
||||
tbformat = tbformat.Replace("{asterisk}", ""); // the asteriskoffset flags a '*' to be printed at xloc - this.
|
||||
}
|
||||
int macroindx = tbformat.IndexOf("{!C");
|
||||
if (macroindx > -1)
|
||||
{
|
||||
@ -2543,7 +2565,14 @@ namespace VEPROMS.CSLA.Library
|
||||
// tab, don't inherit the parent's tab, use a null.
|
||||
if (MyPrevious != null && FormatStepData.Sep != null && FormatStepData.Sep != "{Null}")
|
||||
{
|
||||
if (_MyHeader == null) _MyHeader = new MetaTag(FormatStepData.TabData.Font);
|
||||
// check if there is font information for the separator, use it. If not use the font information
|
||||
// that is associated with the tab.
|
||||
VE_Font hdrFont = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.Separator == null ? null :
|
||||
ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.Separator.Font;
|
||||
if (hdrFont == null) hdrFont = FormatStepData.TabData.Font;
|
||||
if (_MyHeader == null) _MyHeader = new MetaTag(hdrFont);
|
||||
else _MyHeader.MyFont = hdrFont;
|
||||
|
||||
_MyHeader.Text = FormatStepData.Sep;
|
||||
_MyHeader.CleanText = StripRtfFormatting(_MyHeader.Text);
|
||||
_MyHeader.Justify = ContentAlignment.MiddleCenter;
|
||||
@ -2620,14 +2649,23 @@ namespace VEPROMS.CSLA.Library
|
||||
int level = 0;
|
||||
ItemInfo par = this;
|
||||
ItemInfo LastRNO = null;
|
||||
ItemInfo TopRNO = null;
|
||||
while (par != null && !par.IsSection && !par.IsProcedure && !par.IsHigh)
|
||||
{
|
||||
if (par.IsRNOPart) LastRNO = par.MyParent;
|
||||
if (par.IsRNOPart)
|
||||
{
|
||||
LastRNO = par.MyParent;
|
||||
TopRNO = par;
|
||||
}
|
||||
if (!par.IsRNOPart && (par.IsSequential || (!(par.IsCaution || par.IsNote)
|
||||
&& ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CountAllSubLevels)))
|
||||
level++;
|
||||
par = par.MyParent;
|
||||
}
|
||||
// If high level RNOs are numbered, use the next level of tabs for lower
|
||||
// level RNOs - unless DontOffsetTab format flag is set
|
||||
if (LastRNO != null && LastRNO.IsHigh && TopRNO.FormatStepData.NumberHighLevel && TopRNO.FormatStepData.OffsetTab)
|
||||
OffsetTab = TopRNO.FormatStepData.NumberHighLevel?1:0;
|
||||
bias = 0;
|
||||
if (par.FormatStepData != null && par.FormatStepData.TabData.IdentPrint.Contains("{ALPHA}"))
|
||||
level--;
|
||||
@ -2767,7 +2805,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (FormatStepData.TabData.Justify == "Center")
|
||||
{
|
||||
_MyHeader.Justify = ContentAlignment.MiddleCenter;
|
||||
_MyHeader.Text = tbformat.Replace("\\xA0"," ").Trim();
|
||||
_MyHeader.Text = (!FormatStepData.TabData.NoTrim)?tbformat.Replace("\\xA0"," ").Trim():tbformat.Replace("\\xA0"," ");
|
||||
_MyHeader.CleanText = StripRtfFormatting(_MyHeader.Text);
|
||||
// if there is only step in the group - no bullet is used, if more that one replace the tab
|
||||
// with a bullet. Also, if only one in group and tab text ends with 'S', remove it:
|
||||
@ -3051,7 +3089,7 @@ namespace VEPROMS.CSLA.Library
|
||||
int sectCoIndx = SectionDefaultCheckOffIndex(); // no checkoff on step, see if there is a section default.
|
||||
if (sectCoIndx == -1) return null;
|
||||
if ((ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffOnHLSOnly && IsHigh)
|
||||
|| (!ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffOnHLSOnly && IsLowestLevelStep() && !RNOsHighHasCheckOff()))
|
||||
|| (!ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffOnHLSOnly && IsLowestLevelStep())) // && !RNOsHighHasCheckOff()))
|
||||
return ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList[sectCoIndx];
|
||||
return null;
|
||||
}
|
||||
@ -3127,6 +3165,7 @@ namespace VEPROMS.CSLA.Library
|
||||
MyFont = font;
|
||||
}
|
||||
public int Offset;
|
||||
public int AsteriskOffset;
|
||||
private static Regex _ReplaceSymbols = new Regex("^[^0-9A-Za-z]*"); // trim anything that isn't an ascii alpha/numeric from the beginning
|
||||
public string CleanTextNoSymbols
|
||||
{
|
||||
@ -4469,7 +4508,6 @@ namespace VEPROMS.CSLA.Library
|
||||
//Procedure tmp = (Procedure)GetExistingByPrimaryKey(itemID);
|
||||
if (tmp == null)
|
||||
{
|
||||
if (itm != null) Console.WriteLine("type = {0}", itm.GetType().Name);
|
||||
tmp = DataPortal.Fetch<Procedure>(new PKCriteria(itemID));
|
||||
AddToCache(tmp);
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (sd.Type == s && !sd.Inactive)
|
||||
{
|
||||
sds.Add(new StepDataRetval(sd.StepEditData.TypeMenu.MenuItem, Convert.ToInt32(sd.Index)));
|
||||
if (topType.Type == sd.Type) retval = cntitm;
|
||||
if (curType == sd.Type) retval = cntitm;
|
||||
cntitm++;
|
||||
break;
|
||||
}
|
||||
@ -2485,6 +2485,14 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _LineDrawingOption, "@LineDrawingOption");
|
||||
}
|
||||
}
|
||||
private LazyLoad<float?> _TabPtsPerChar;
|
||||
public float? TabPtsPerChar
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _TabPtsPerChar, "@TabPtsPerChar");
|
||||
}
|
||||
}
|
||||
private LazyLoad<float?> _ColS;
|
||||
public float? ColS
|
||||
{
|
||||
@ -4528,14 +4536,6 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _Justify, "TabData/@Justify");
|
||||
}
|
||||
}
|
||||
//private LazyLoad<string> _CheckOff;
|
||||
//public string CheckOff
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return LazyLoad(ref _CheckOff, "TabData/@CheckOff");
|
||||
// }
|
||||
//}
|
||||
private LazyLoad<bool> _UsePreviousStyle;
|
||||
public bool UsePreviousStyle
|
||||
{
|
||||
@ -4573,6 +4573,14 @@ namespace VEPROMS.CSLA.Library
|
||||
return (_Bullet == null) ? _Bullet = new Bullet(base.XmlNode) : _Bullet;
|
||||
}
|
||||
}
|
||||
private LazyLoad<bool> _NoTrim;
|
||||
public bool NoTrim
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _NoTrim, "TabData/@NoTrim");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
@ -331,7 +331,7 @@ namespace Volian.Controls.Library
|
||||
//}
|
||||
public bool TopRowHasBorder()
|
||||
{
|
||||
for (int c = 0; c < Cols.Count - 1; c++)
|
||||
for (int c = 0; c < Cols.Count; c++)
|
||||
if (MyBorders.HorizontalLines[0, c] != GridLinePattern.None) return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -728,7 +728,7 @@ namespace Volian.Print.Library
|
||||
int eindx = token.IndexOf("}", bindx);
|
||||
val = token.Substring(bindx + 1, eindx - bindx - 1);
|
||||
}
|
||||
if (val != null && val != "") PgLogicals.Add(pstok, val != null);
|
||||
if (val != null && val != "" && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
||||
//if (val == null || val == "")
|
||||
//val = " ";
|
||||
if (val == null)
|
||||
|
@ -31,7 +31,7 @@ namespace Volian.Print.Library
|
||||
int fontStyle = (MyFont.WindowsFont.Bold ? iTextSharp.text.Font.BOLD : 0) + (MyFont.WindowsFont.Italic ? iTextSharp.text.Font.ITALIC : 0);
|
||||
iTextSharp.text.Font itextFont = Volian.Svg.Library.Svg.GetFont(fontFace, MyFont.WindowsFont.Size, fontStyle, System.Drawing.Color.Black);
|
||||
float hdrwidth = itextFont.BaseFont.GetWidthPoint(Text, MyFont.WindowsFont.Size);
|
||||
hdrwidth += 1;
|
||||
hdrwidth += 5;
|
||||
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
|
||||
Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, hdrwidth, 100, "", yBottomMargin);
|
||||
return yPageStart;
|
||||
|
@ -143,8 +143,8 @@ namespace Volian.Print.Library
|
||||
Processed = true;
|
||||
if (_PartsAbove != null && _PartsAbove.Count > 0) yPageStart = PartsAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||
if (MyItemInfo.IsHigh && MyItemInfo.MyDocStyle.SpecialStepsFoldout) yPageStart -= SixLinesPerInch;
|
||||
//SHE if (MyItemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.DoSTExtraAtTop && (yPageStart - YTopMost == yTopMargin))
|
||||
//SHE yPageStart += ((MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0);
|
||||
if (MyItemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.DoSTExtraAtTop && (yPageStart - YTopMost == yTopMargin))
|
||||
yPageStart += ((MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0);
|
||||
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
|
||||
if (MyItemInfo.HasChangeBar && MyPageHelper.ChangeBarDefinition.MyChangeBarType != PrintChangeBar.Without) MyPageHelper.AddChangeBar(DoChangeBar(cb, MyItemInfo, MyPageHelper, XOffset, yLocation, MyPageHelper.MaxRNO, MyItemInfo.ActiveFormat), cbMess);
|
||||
float retval = yLocation;
|
||||
@ -1035,14 +1035,6 @@ namespace Volian.Print.Library
|
||||
mytab.XOffset += mytab.Width;
|
||||
XOffset = mytab.XOffset + mytab.Width;
|
||||
}
|
||||
//SHE if this is the High Level RNO step (MyTopRNO) and we are numbering the RNO, adjust the xoffset to
|
||||
//SHE include the HLS tab size.
|
||||
//SHEif (!itemInfo.IsSection && itemInfo.FormatStepData.NumberHighLevel && itemInfo.IsRNOPart && itemInfo.ItemID == MyTopRNO.MyItemInfo.ItemID)
|
||||
//SHE{
|
||||
//SHE float tadj = itemInfo.MyHLS.FormatStepData.TabData.RNOIdentPrint == null || itemInfo.MyHLS.FormatStepData.TabData.RNOIdentPrint == "" ? mytab.Text.Length * 6 : (itemInfo.MyHLS.FormatStepData.TabData.RNOIdentPrint.Length * 6);
|
||||
//SHE mytab.XOffset += tadj;
|
||||
//SHE XOffset = mytab.XOffset + (tadj + 6); // had to do this to get it to match 16 bit for SHE.
|
||||
//SHE}
|
||||
AdjustWidth(itemInfo, maxRNO, formatInfo, mytab);
|
||||
AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj);
|
||||
if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab)
|
||||
@ -1081,6 +1073,12 @@ namespace Volian.Print.Library
|
||||
myBullet.Rtf = myBullet.Rtf.Replace("\u25CF", @"\f1\u9679?\f0 ");
|
||||
PartsLeft.Add(myBullet);
|
||||
}
|
||||
if (itemInfo.MyTab.AsteriskOffset != 0)
|
||||
{
|
||||
// the '-24' was used for the SHE format to get the continuous HLS's asterisk to match 16bit.
|
||||
vlnText myAsterisk = new vlnText(cb, this, "*", "*", mytab.XOffset - 24, YOffset, MyItemInfo.FormatStepData.TabData.Font);
|
||||
PartsLeft.Add(myAsterisk);
|
||||
}
|
||||
if (itemInfo.IsRNOPart)
|
||||
{
|
||||
// there may be other places that double space, but this supports it for RNOs (the DoubleRNOspace flag)
|
||||
@ -1106,7 +1104,7 @@ namespace Volian.Print.Library
|
||||
if (dropCheckoff)
|
||||
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
||||
yoff += (Height + (2 * SixLinesPerInch));
|
||||
CalculateXOffset(itemInfo, maxRNO, formatInfo);
|
||||
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
|
||||
yoff = (float)Math.Ceiling(yoff); // RHM 20120925 - Make sure that yOff is an integer value after a grid
|
||||
}
|
||||
else if (itemInfo.IsFigure) // if a figure we've got to determine the size:
|
||||
@ -1159,7 +1157,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
if (erMsg != null) Rtf = GetRtf(erMsg, itemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
||||
CalculateXOffset(itemInfo, maxRNO, formatInfo);
|
||||
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1196,7 +1194,7 @@ namespace Volian.Print.Library
|
||||
if (itemInfo.IsTablePart) // Not for grid, this is for old-style tables.
|
||||
{
|
||||
Width = GetTableWidth(cb, IParagraph, MyItemInfo.MyDocStyle.Layout.PageWidth);
|
||||
CalculateXOffset(itemInfo, maxRNO, formatInfo);
|
||||
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
|
||||
}
|
||||
else
|
||||
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null) XOffset += (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
|
||||
@ -1252,17 +1250,10 @@ namespace Volian.Print.Library
|
||||
if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.SkipSpaces)
|
||||
{
|
||||
if (mytab != null)
|
||||
{
|
||||
int cntspac = 0;
|
||||
xloc_co = mytab.XOffset;
|
||||
// SHE commented out next two lines - may need to control this by format flag
|
||||
for (int c = 0; c < itemInfo.MyTab.CleanText.Length; c++) if (itemInfo.MyTab.CleanText[c] == ' ') cntspac++;
|
||||
xloc_co = xloc_co - (cntspac * 6);
|
||||
}
|
||||
//SHE else
|
||||
//SHE xloc_co = XOffset; //there's no tab - put checkoff at step's xoff. Macro should back up from step's x.
|
||||
else
|
||||
xloc_co = XOffset; //there's no tab - put checkoff at step's xoff. Macro should back up from step's x.
|
||||
}
|
||||
|
||||
PartsRight.Add(new vlnMacro(xloc_co, yForCheckoff, co.Macro));
|
||||
}
|
||||
float yOffRight = yoff;
|
||||
@ -1299,7 +1290,6 @@ namespace Volian.Print.Library
|
||||
SectionConfig sc = itemInfo.MyConfig as SectionConfig;
|
||||
if (sc != null && sc.SubSection_Edit != "Y") printsteps = false;
|
||||
}
|
||||
|
||||
if (itemInfo.Steps != null && printsteps) yoff = ChildrenBelow.Add(cb, itemInfo.Steps, XOffset, yoff, yOffRight, rnoLevel, maxRNO, formatInfo);
|
||||
if (itemInfo.Sections != null) yoff = ChildrenBelow.Add(cb, itemInfo.Sections, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
|
||||
if (itemInfo.Procedures != null) yoff = ChildrenBelow.Add(cb, itemInfo.Procedures, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
|
||||
@ -1496,14 +1486,13 @@ namespace Volian.Print.Library
|
||||
return bottomChild;
|
||||
}
|
||||
}
|
||||
private void CalculateXOffset(ItemInfo itemInfo, int maxRNO, FormatInfo formatInfo)
|
||||
private void CalculateXOffsetGridOrFigure(ItemInfo itemInfo, int maxRNO, FormatInfo formatInfo)
|
||||
{
|
||||
bool aerTableOrFigure = itemInfo.FormatStepData.Type.Contains("AER");
|
||||
vlnParagraph hls1 = MyParent;
|
||||
while (hls1.MyParent != null && !hls1.MyItemInfo.IsHigh) hls1 = hls1.MyParent;
|
||||
float colR = float.Parse(formatInfo.MyStepSectionLayoutData.ColRTable.Split(",".ToCharArray())[itemInfo.ColumnMode]);
|
||||
//SHE float xLowerLimit = hls1.PartsLeft != null && hls1.PartsLeft.Count > 0 ? hls1.PartsLeft[0].XOffset : hls1.XOffset;
|
||||
float xLowerLimit = hls1.XOffset;
|
||||
float xLowerLimit = hls1.PartsLeft != null && hls1.PartsLeft.Count > 0 ? hls1.PartsLeft[0].XOffset : hls1.XOffset;
|
||||
float xUpperLimit = hls1.XOffset + hls1.Width + colR * itemInfo.ColumnMode;
|
||||
float TableCenterPos = float.Parse(formatInfo.MyStepSectionLayoutData.TableCenterPos.Split(",".ToCharArray())[itemInfo.ColumnMode]);
|
||||
if (formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
||||
@ -2069,6 +2058,14 @@ namespace Volian.Print.Library
|
||||
XOffset -= (itemInfo.MyTab.Offset - hls.MyTab.Offset);
|
||||
}
|
||||
}
|
||||
// if the step is within the rno and we're numbering the high level rno, we've got to account for the
|
||||
// indenting (increased x offset) for the top level rno's tab, if there is no top level rno:
|
||||
if (itemInfo.FormatStepData.NumberHighLevel && (itemInfo.MyHLS.RNOs == null || itemInfo.MyHLS.RNOs.Count<=0))
|
||||
{
|
||||
// add in the size that an RNO off HLS would take.
|
||||
XOffset += tabWidth;
|
||||
if (myTab != null) myTab.XOffset += tabWidth;
|
||||
}
|
||||
}
|
||||
else if (MyParent != null)
|
||||
{
|
||||
@ -2122,7 +2119,7 @@ namespace Volian.Print.Library
|
||||
widOvrd = xwid;
|
||||
else
|
||||
widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride;
|
||||
if (itemInfo.IsRNOPart && itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt != null)
|
||||
if (itemInfo.IsRNOPart && itemInfo.MyParent.IsHigh && itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt != null)
|
||||
{
|
||||
string[] splitRNOWidthAlt = itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt.Split(',');
|
||||
float ovrd = (itemInfo.RNOLevel < splitRNOWidthAlt.Length) ? float.Parse(splitRNOWidthAlt[itemInfo.RNOLevel]) : 0;
|
||||
|
@ -130,25 +130,13 @@ namespace Volian.Print.Library
|
||||
Width = (float)myparent.MyItemInfo.FormatStepData.TabData.IdentWidth;
|
||||
else if (CCCs != IIIs)
|
||||
{
|
||||
if (myparent.MyItemInfo.ActiveFormat.Name.ToUpper().Contains("WST")) // Temporary for WST development. need better way to do this check
|
||||
{
|
||||
Width = 6.8f * origTab.Length;
|
||||
}
|
||||
else if (myparent.MyItemInfo.ActiveFormat.Name.ToUpper().Contains("SHE")) // Temporary for SHE development. need better way to do this check
|
||||
{
|
||||
if (myparent.MyItemInfo.IsHigh)
|
||||
Width = 6 * origTab.Length;
|
||||
else
|
||||
Width = GetTextWidth(MyFont, (Text != null ? Text : origTab), symblFontName); //MyFont.CharsToTwips * (Text != null ? Text.Length : origTab.Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
origTab1 = origTab1.TrimStart(" ".ToCharArray());
|
||||
// 6 = number of points per character. 4 characters between end of tab and beginning of text
|
||||
// origTab1.Trim... is number of non-space characters of the tab string.
|
||||
// Tested for FPL & NSP
|
||||
Width = 6 * (4 + origTab1.Trim(" ".ToCharArray()).Length);
|
||||
}
|
||||
float tPtPerChar = myparent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TabPtsPerChar ?? 6;
|
||||
Width = tPtPerChar * origTab.Length;
|
||||
// Check the following, it may be needed for FPL:
|
||||
//origTab1 = origTab1.TrimStart(" ".ToCharArray());
|
||||
// 6 = number of points per character. 4 characters between end of tab and beginning of text
|
||||
// origTab1.Trim... is number of non-space characters of the tab string.
|
||||
//Width = 6 * (4 + origTab1.Trim(" ".ToCharArray()).Length);
|
||||
}
|
||||
else
|
||||
Width = GetTextWidth(MyFont, (Text != null ? Text : origTab), symblFontName); //MyFont.CharsToTwips * (Text != null ? Text.Length : origTab.Length);
|
||||
@ -168,11 +156,9 @@ namespace Volian.Print.Library
|
||||
cleanTab = origTab;
|
||||
if (CCCs != IIIs)
|
||||
{
|
||||
|
||||
if (myparent.MyItemInfo.ActiveFormat.Name.ToUpper().Contains("WST")) // Temporary for WST development. need better way to do this check
|
||||
{
|
||||
Width = 6.8f * origTab.Length;
|
||||
}
|
||||
float? tPtPerChar1 = myparent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TabPtsPerChar;
|
||||
if (tPtPerChar1!=null)
|
||||
Width = (float)tPtPerChar1 * origTab.Length;
|
||||
else
|
||||
{
|
||||
origTab = origTab + " ";
|
||||
|
@ -34,6 +34,9 @@ namespace fmtxml
|
||||
case "NSPARP":
|
||||
AddNSPARPfmt(ref fmtdata);
|
||||
break;
|
||||
case "SHE":
|
||||
AddSHEfmt(ref fmtdata);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -313,6 +316,19 @@ namespace fmtxml
|
||||
fmtdata.StepData[1].TabData.RNOIdentEdit = "";
|
||||
fmtdata.StepData[1].TabData.RNOIdent = "";
|
||||
}
|
||||
private void AddSHEfmt(ref FormatData fmtdata)
|
||||
{
|
||||
fmtdata.SectData.StepSectionData.StpSectLayData.ColRTable = "0,198,144";
|
||||
fmtdata.SectData.StepSectionData.StpSectLayData.RNOWidthAlt = "0,186,0";
|
||||
fmtdata.StepData[2].TabData.Ident = " {numeric}.";
|
||||
fmtdata.StepData[2].TabData.RNOIdent = " .";
|
||||
fmtdata.StepData[7].TabData.Ident = @" \ul NOTE\ulnone";
|
||||
fmtdata.StepData[26].TabData.Ident = @" \ul NOTE\ulnone";
|
||||
fmtdata.StepData[7].TabData.NoTrim = "True"; // need this field in stepdata/tabdata.
|
||||
fmtdata.StepData[9].TabData.Ident = "{asterisk} {numeric}.";
|
||||
fmtdata.StepData[18].TabData.Ident = null;
|
||||
fmtdata.StepData[18].TabData.RNOIdent = null;
|
||||
}
|
||||
|
||||
}
|
||||
public partial class FmtToXml
|
||||
@ -354,6 +370,17 @@ namespace fmtxml
|
||||
{
|
||||
// Procedure Steps
|
||||
pgstyles.PgStyles[0].Items[1].Col = 78; // Column for BOX5 needed adjusted to match 16bit
|
||||
pgstyles.PgStyles[2].Items[2].Col = 315; // Adjust columns on PSI items for cover page.
|
||||
pgstyles.PgStyles[2].Items[3].Col = 315;
|
||||
pgstyles.PgStyles[2].Items[4].Col = 315;
|
||||
pgstyles.PgStyles[2].Items[5].Col = 315;
|
||||
pgstyles.PgStyles[2].Items[6].Col = 315;
|
||||
pgstyles.PgStyles[2].Items[7].Col = 315;
|
||||
pgstyles.PgStyles[2].Items[8].Col = 315;
|
||||
pgstyles.PgStyles[2].Items[9].Col = 315;
|
||||
pgstyles.PgStyles[3].Items[1].Col = 447; // Adjust columns on some PSI for cover page.
|
||||
pgstyles.PgStyles[3].Items[2].Col = 447;
|
||||
pgstyles.PgStyles[3].Items[3].Col = 447;
|
||||
}
|
||||
// NSP_ALL
|
||||
private void AddNSPPage(ref PageStyles pgstyles)
|
||||
|
@ -1009,6 +1009,7 @@ public struct Tab
|
||||
//public string RNOIdentWid;
|
||||
public string Justify; // from tbstyle - None, CENTER, LEFT, RIGHT
|
||||
public string UsePreviousStyle;
|
||||
public string NoTrim;
|
||||
public COMacro[] MacroList;
|
||||
public VE_Font Font;
|
||||
public TabBullet Bullet;
|
||||
@ -5239,7 +5240,7 @@ namespace fmtxml
|
||||
//private string StepPartTabRNOIdentEditWid(Step stp) { return stp.TabData.RNOIdentEditWid; }
|
||||
//private string StepPartTabRNOIdentWid(Step stp) { return stp.TabData.RNOIdentWid; }
|
||||
private string StepPartTabJustify(Step stp) { return stp.TabData.Justify; }
|
||||
|
||||
private string StepPartTabTrim(Step stp) { return stp.TabData.NoTrim; }
|
||||
// Do the flags:
|
||||
private string StepPartDoubleSpace(Step stp) { return stp.DoubleSpace; }
|
||||
private string StepPartEnhancedStepNumFromPrev(Step stp) { return stp.EnhancedStepNumFromPrev; }
|
||||
@ -5446,6 +5447,7 @@ namespace fmtxml
|
||||
//if (CheckInheritedStr(new StepPartStr(StepPartTabRNOIdentEditWid), step, dicParents)) step.TabData.RNOIdentEditWid = NullString;
|
||||
//if (CheckInheritedStr(new StepPartStr(StepPartTabRNOIdentWid), step, dicParents)) step.TabData.RNOIdentWid = NullString;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartTabJustify), step, dicParents)) step.TabData.Justify = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartTabTrim), step, dicParents)) step.TabData.NoTrim = null;
|
||||
//if (CheckInheritedStr(new StepPartStr(StepPartTabCheckOff), step, dicParents)) step.TabData.CheckOff = null;
|
||||
|
||||
// substructures - Tab - Font
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user