B2022-083: Support Conditional RO Values
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Volian.Print.Library
|
||||
public class PDFReport
|
||||
{
|
||||
#region Enums
|
||||
|
||||
|
||||
public enum ReportType
|
||||
{
|
||||
SearchResults = 0,
|
||||
@@ -28,7 +28,7 @@ namespace Volian.Print.Library
|
||||
#endregion
|
||||
|
||||
#region Fields
|
||||
|
||||
|
||||
private PdfWriter _MyPdfWriter;
|
||||
private ICollection<ItemInfo> _ResultList;
|
||||
|
||||
@@ -57,31 +57,31 @@ namespace Volian.Print.Library
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
|
||||
public ICollection<ItemInfo> ResultList
|
||||
{
|
||||
get { return _ResultList; }
|
||||
set { _ResultList = value; }
|
||||
}
|
||||
|
||||
|
||||
public string FileName
|
||||
{
|
||||
get { return _FileName; }
|
||||
set { _FileName = value; }
|
||||
}
|
||||
|
||||
|
||||
public string ReportTitle
|
||||
{
|
||||
get { return _ReportTitle; }
|
||||
set { _ReportTitle = value; }
|
||||
}
|
||||
|
||||
|
||||
public string TypesSelected
|
||||
{
|
||||
get { return _TypesSelected; }
|
||||
set { _TypesSelected = value; }
|
||||
}
|
||||
|
||||
|
||||
public bool ShowAnnotations
|
||||
{
|
||||
get { return _ShowAnnotations; }
|
||||
@@ -249,7 +249,7 @@ namespace Volian.Print.Library
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
|
||||
public void AddMainRODatabaseTitle(PdfPTable datatable, int dbTitleIndex, Font f2, Color bgColor)
|
||||
{
|
||||
string dbTitle = _ROFSTLookup.GetRODatabaseTitle(dbTitleIndex);
|
||||
@@ -403,7 +403,7 @@ namespace Volian.Print.Library
|
||||
bool foundMisMatch = false;
|
||||
|
||||
// n-1 Exclude the "Working Draft" entry from the list
|
||||
int n = NewPath.Length-1;
|
||||
int n = NewPath.Length - 1;
|
||||
int jstart = (skipFirst) ? 1 : 0;
|
||||
|
||||
if (StripLast)
|
||||
@@ -427,7 +427,7 @@ namespace Volian.Print.Library
|
||||
if (!string.IsNullOrEmpty(NewPath[j]) && (foundMisMatch || OldPath.Length < j + 1 || NewPath[j] != OldPath[j]))
|
||||
{
|
||||
// B2020-006: Add hard space '\u160?'
|
||||
sb.Append(sep + "".PadLeft(2 * level) + NewPath[j].Replace("\x11", " ")).Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace(@"\u9586?",@"\");
|
||||
sb.Append(sep + "".PadLeft(2 * level) + NewPath[j].Replace("\x11", " ")).Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace(@"\u9586?", @"\");
|
||||
sep = "\r\n";
|
||||
foundMisMatch = true;
|
||||
}
|
||||
@@ -592,7 +592,7 @@ namespace Volian.Print.Library
|
||||
level = NewPath.Length - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return level;
|
||||
}
|
||||
|
||||
@@ -603,7 +603,7 @@ namespace Volian.Print.Library
|
||||
/// </summary>
|
||||
/// <param name="document"></param>
|
||||
/// <returns></returns>
|
||||
private bool CreateResultsPDF(iTextSharp.text.Document document,int typ)
|
||||
private bool CreateResultsPDF(iTextSharp.text.Document document, int typ)
|
||||
{
|
||||
int topMargin = 36;
|
||||
|
||||
@@ -670,18 +670,18 @@ namespace Volian.Print.Library
|
||||
datatable.TotalWidth = document.PageSize.Width - document.LeftMargin - document.RightMargin;
|
||||
datatable.LockedWidth = true;
|
||||
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f1 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
iTextSharp.text.Font f3 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 12, 0, Color.BLACK);
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f1 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
iTextSharp.text.Font f3 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 12, 0, Color.BLACK);
|
||||
PdfPCell cell = new PdfPCell(new Phrase(ReportTitle, f1));
|
||||
cell.HorizontalAlignment = Element.ALIGN_CENTER;
|
||||
cell.BackgroundColor = new Color(0xD0, 0xF0, 0xF0); // light cyan
|
||||
datatable.AddCell(cell);
|
||||
|
||||
// C2019-013 add sorted by information if sorting is used
|
||||
cell = new PdfPCell(new Phrase(TypesSelected + ((SortedBy.Length >0)?string.Format("\n{0}",SortedBy):string.Empty), f3));
|
||||
cell = new PdfPCell(new Phrase(TypesSelected + ((SortedBy.Length > 0) ? string.Format("\n{0}", SortedBy) : string.Empty), f3));
|
||||
cell.HorizontalAlignment = Element.ALIGN_LEFT;
|
||||
cell.BackgroundColor = new Color(0xD0, 0xF0, 0xF0); // light cyan
|
||||
datatable.AddCell(cell);
|
||||
@@ -737,15 +737,15 @@ namespace Volian.Print.Library
|
||||
{
|
||||
lastSectNumAndTitle = string.Empty; // C2020-019 reset we are processing a different procedure
|
||||
}
|
||||
|
||||
|
||||
lastProcNum = curProcNum;
|
||||
|
||||
// B2020-006: When doing a section, don't remove the last item or the procedure title won't print (if section is only item found w/ search string)
|
||||
string stepPath = AddGroup(subTable, item.SearchPath ?? item.ShortPath, lastPath, f2, item.IsSection ? false : true, new Color(0xC0, 0xFF, 0xC0), true); // light green for procedure number and title
|
||||
|
||||
|
||||
// C2020-019 add section number and title if is different from last item and it is not a Word Section (item will be a section if search item was found in a Word section)
|
||||
string curSectNumTitle = GetCurSectionNumTitle(item);
|
||||
|
||||
|
||||
if (curSectNumTitle != string.Empty && curSectNumTitle != lastSectNumAndTitle && !item.IsSection)
|
||||
{
|
||||
AddColSpanCell(subTable, curSectNumTitle, f2, StepSectColor, 2, 0);
|
||||
@@ -820,7 +820,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
|
||||
if (str.Length > 0)
|
||||
if (str.Length > 0)
|
||||
p.Add(new Phrase(str, fnt));
|
||||
|
||||
return p;
|
||||
@@ -857,18 +857,18 @@ namespace Volian.Print.Library
|
||||
{
|
||||
// Adjusted from 20,80 to 25,75 to account for long Procedure Numbers
|
||||
float[] headerwidths = { 25, 75 };
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
BuildLibDocProcSetList();
|
||||
|
||||
int splitAt = FindSpitLevel()-1; // find the split level of the common path - for all procedure sets that use these library documents
|
||||
int splitAt = FindSpitLevel() - 1; // find the split level of the common path - for all procedure sets that use these library documents
|
||||
string lastDvPath = string.Empty;
|
||||
Color AnnoBackgroundColor = new Color(0xFF, 0xFF, 0xC0);
|
||||
Color TextBackgroundColor = Color.WHITE;
|
||||
Color NotUsedBackgroundColor = Color.WHITE;
|
||||
MyPageHelper pghlp = _MyPdfWriter.PageEvent as MyPageHelper;
|
||||
pghlp.HeaderTable = LibDocTable(document, headerwidths, f2,null);
|
||||
pghlp.HeaderTable = LibDocTable(document, headerwidths, f2, null);
|
||||
|
||||
foreach (DocumentInfo di in _LibDocList)
|
||||
{
|
||||
@@ -926,16 +926,16 @@ namespace Volian.Print.Library
|
||||
private PdfPTable LibDocTable(iTextSharp.text.Document document, float[] headerwidths, iTextSharp.text.Font f2, DocumentInfo di)
|
||||
{
|
||||
PdfPTable datatable = new PdfPTable(1);// (headerwidths);
|
||||
PdfPTable colheader = new PdfPTable(headerwidths);
|
||||
PdfPTable colheader = new PdfPTable(headerwidths);
|
||||
datatable.HeaderRows = 2;
|
||||
datatable.KeepTogether = false;
|
||||
datatable.TotalWidth = document.PageSize.Width - document.LeftMargin - document.RightMargin;
|
||||
datatable.LockedWidth = true;
|
||||
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f1 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
iTextSharp.text.Font f3 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 12, 0, Color.BLACK);
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f1 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
iTextSharp.text.Font f3 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 12, 0, Color.BLACK);
|
||||
PdfPCell cell = new PdfPCell(new Phrase(ReportTitle, f1));
|
||||
cell.HorizontalAlignment = Element.ALIGN_CENTER;
|
||||
//cell.Colspan = 2;
|
||||
@@ -977,9 +977,9 @@ namespace Volian.Print.Library
|
||||
private void PutROusageForProcedure(PdfPTable curTable, Dictionary<string, List<ItemInfo>> rosused, float[] headerwidths)
|
||||
{
|
||||
//if (rosused.Count == 0) return; // nothing to process
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
|
||||
foreach (string roKey in rosused.Keys)
|
||||
{
|
||||
@@ -1006,7 +1006,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
ROTitleCell.BackgroundColor = new Color(0xDC, 0xE7, 0xC9); //new Color(0xD0, 0xF0, 0xD0);//ligt green //new Color(0xC8, 0xC8, 0x91);//(0xAF, 0xD8, 0xD8);//(0xF5, 0xE4, 0xA0);
|
||||
}
|
||||
|
||||
|
||||
rotable.AddCell(ROTitleCell); // put RO value and description
|
||||
}
|
||||
}
|
||||
@@ -1042,11 +1042,11 @@ namespace Volian.Print.Library
|
||||
datatable.TotalWidth = document.PageSize.Width - document.LeftMargin - document.RightMargin;
|
||||
datatable.LockedWidth = true;
|
||||
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f1 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
iTextSharp.text.Font f3 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 12, 0, Color.BLACK);
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f1 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
iTextSharp.text.Font f3 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 12, 0, Color.BLACK);
|
||||
PdfPCell cell = new PdfPCell(new Phrase(ReportTitle, f1));
|
||||
cell.HorizontalAlignment = Element.ALIGN_CENTER;
|
||||
//cell.Colspan = 2;
|
||||
@@ -1134,7 +1134,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
string dictKey = GetCurProcNum(item.SearchPath) + " " + GetCurSectionNumTitle(item);
|
||||
|
||||
if (dictKey != null && dictKey != string.Empty)
|
||||
if (!string.IsNullOrEmpty(dictKey))
|
||||
{
|
||||
if (procRoUse.ContainsKey(dictKey))
|
||||
{
|
||||
@@ -1151,9 +1151,9 @@ namespace Volian.Print.Library
|
||||
|
||||
private void PutStepListForProcedure(PdfPTable rotable, SortedDictionary<string, ItemInfo> sortedStepList)
|
||||
{
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
|
||||
foreach (ItemInfo itm in sortedStepList.Values)
|
||||
{
|
||||
@@ -1165,11 +1165,11 @@ namespace Volian.Print.Library
|
||||
sortedStepList.Clear();
|
||||
}
|
||||
|
||||
private void PutROusageForROID(PdfPTable curTable, SortedDictionary<string, List<ItemInfo>> procRoUse, float[] headerwidths, int splitAt , bool moreThanOneProcSet)
|
||||
private void PutROusageForROID(PdfPTable curTable, SortedDictionary<string, List<ItemInfo>> procRoUse, float[] headerwidths, int splitAt, bool moreThanOneProcSet)
|
||||
{
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
|
||||
SortedDictionary<string, ItemInfo> sortedStepList = new SortedDictionary<string, ItemInfo>();
|
||||
string lastProcKey = string.Empty;
|
||||
@@ -1249,14 +1249,15 @@ namespace Volian.Print.Library
|
||||
{
|
||||
string rotitle = string.Empty;
|
||||
|
||||
ROFSTLookup myrofstlookup = (itm == null)? _ROFSTLookup : itm.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(itm.MyDocVersion);
|
||||
List<string> roTitleList = myrofstlookup.GetROTitleAndGroupPath(roid,_IncludeMissingROs,_ConvertCaretToDelta);
|
||||
ROFSTLookup myrofstlookup = (itm == null) ? _ROFSTLookup : itm.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(itm.MyDocVersion);
|
||||
|
||||
List<string> roTitleList = myrofstlookup.GetROTitleAndGroupPath(roid, _IncludeMissingROs, _ConvertCaretToDelta);
|
||||
|
||||
if (roTitleList != null && roTitleList.Count > 0)
|
||||
{
|
||||
for (int cnt = 0; cnt < roTitleList.Count; cnt++)
|
||||
{
|
||||
if (cnt == roTitleList.Count - 1)
|
||||
if (cnt == roTitleList.Count - 1) // Last roTitle in list, don't add a NewLine character after the value
|
||||
rotitle += roTitleList[cnt];
|
||||
else
|
||||
rotitle += roTitleList[cnt] + "\n ";
|
||||
@@ -1269,15 +1270,15 @@ namespace Volian.Print.Library
|
||||
private void AddROHeaderGroup(PdfPTable datatable, string curROID, ItemInfo itm, Font f2, Color bgColor)
|
||||
{
|
||||
string headerText = GetROTitleAndGroup(curROID, itm);
|
||||
if (headerText != null && headerText.Length > 0)
|
||||
|
||||
if (!string.IsNullOrEmpty(headerText) && headerText.Length > 0)
|
||||
{
|
||||
PdfPCell cell = new PdfPCell(new Phrase(headerText, f2));
|
||||
|
||||
cell.Colspan = 2;
|
||||
if (headerText.StartsWith("Missing RO"))
|
||||
cell.BackgroundColor = Color.PINK;
|
||||
else
|
||||
cell.BackgroundColor = bgColor;
|
||||
cell.BackgroundColor = (headerText.StartsWith("Missing RO")) ? Color.PINK : bgColor;
|
||||
cell.BorderWidthTop = 1;
|
||||
|
||||
datatable.AddCell(cell);
|
||||
}
|
||||
}
|
||||
@@ -1285,6 +1286,7 @@ namespace Volian.Print.Library
|
||||
private void BuildROUsageTableByRO(iTextSharp.text.Document document)
|
||||
{
|
||||
SortedDictionary<string, List<ItemInfo>> procRoUse = new SortedDictionary<string, List<ItemInfo>>();
|
||||
|
||||
float[] headerwidths = { 20, 80 };
|
||||
PdfPTable datatable = new PdfPTable(1);
|
||||
PdfPTable colHeader = new PdfPTable(headerwidths);
|
||||
@@ -1292,11 +1294,11 @@ namespace Volian.Print.Library
|
||||
datatable.TotalWidth = document.PageSize.Width - document.LeftMargin - document.RightMargin;
|
||||
datatable.LockedWidth = true;
|
||||
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f1 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
iTextSharp.text.Font f3 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 12, 0, Color.BLACK);
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f1 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
iTextSharp.text.Font f3 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 12, 0, Color.BLACK);
|
||||
PdfPCell cell = new PdfPCell(new Phrase(ReportTitle, f1));
|
||||
cell.HorizontalAlignment = Element.ALIGN_CENTER;
|
||||
cell.BackgroundColor = new Color(0xD0, 0xF0, 0xF0); // light blue
|
||||
@@ -1360,9 +1362,9 @@ namespace Volian.Print.Library
|
||||
|
||||
// Check for different ROID
|
||||
string curROID = item.FoundROID;
|
||||
differentRO = lastROID != string.Empty && curROID.Substring(0, 12) != lastROID.Substring(0, 12);
|
||||
differentRO = (!string.IsNullOrEmpty(lastROID) && !string.IsNullOrEmpty(curROID) && curROID.Substring(0, 12) != lastROID.Substring(0, 12));
|
||||
|
||||
if (procRoUse.Count > 0 && (differentProcSet || differentRO))
|
||||
if (procRoUse.Count > 0 && (differentProcSet || differentRO))
|
||||
{
|
||||
if (!moreThanOneProcSet && !printedSetTitle)
|
||||
{
|
||||
@@ -1450,55 +1452,68 @@ namespace Volian.Print.Library
|
||||
|
||||
private void BuildCompleteROReport(iTextSharp.text.Document document)
|
||||
{
|
||||
CompleteROReport compRORpt = new CompleteROReport(_MyPdfWriter, document,_RODataFile, _ConvertCaretToDelta, _IncludeEmptyROFields);
|
||||
CompleteROReport compRORpt = new CompleteROReport(_MyPdfWriter, document, _RODataFile, _ConvertCaretToDelta, _IncludeEmptyROFields);
|
||||
|
||||
compRORpt.F10 = pdf.GetFont("Courier New", 10, 0, Color.BLACK);
|
||||
compRORpt.F10Bold = pdf.GetFont("Courier New", 10, 1, Color.BLACK);
|
||||
compRORpt.F12 = pdf.GetFont("Courier New", 12, 0, Color.BLACK);
|
||||
compRORpt.F12Bold = pdf.GetFont("Courier New", 12, 1, Color.BLACK);
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
compRORpt.F14 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
compRORpt.ROFstID = _ROFSTLookup.MyDocVersionInfo.DocVersionAssociations[0].MyROFst.ROFstID;
|
||||
// C2017-036 Get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
compRORpt.F14 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
|
||||
//B2022 - 083: Support Conditional RO Values
|
||||
compRORpt.ROFstID = _ROFSTLookup.RofstID;
|
||||
|
||||
compRORpt.Run();
|
||||
}
|
||||
|
||||
private string GetROTitleAndGroupsForSummary(List<string>roTitleList, List<string> prevROTitleList)
|
||||
private string GetROTitleAndGroupsForSummary(List<string> roTitleList, List<string> prevROTitleList)
|
||||
{
|
||||
string rotitle = string.Empty;
|
||||
string indent = string.Empty;
|
||||
for (int icnt = 0; icnt < roTitleList.Count; icnt++)
|
||||
|
||||
for (int icnt = 0; icnt < roTitleList.Count; icnt++)
|
||||
{
|
||||
indent += " ";
|
||||
|
||||
if (icnt == roTitleList.Count - 1)
|
||||
{
|
||||
indent += " ";
|
||||
if (icnt == roTitleList.Count - 1)
|
||||
{
|
||||
rotitle += indent + roTitleList[icnt]; // this should be the ro description
|
||||
break; //break out of for loop
|
||||
}
|
||||
if (prevROTitleList == null || (icnt < roTitleList.Count && icnt < prevROTitleList.Count && prevROTitleList[icnt] != roTitleList[icnt]))
|
||||
{
|
||||
if (rotitle == string.Empty && prevROTitleList != null)
|
||||
rotitle = "\n";
|
||||
rotitle += indent + roTitleList[icnt] + "\n";
|
||||
}
|
||||
rotitle += indent + roTitleList[icnt]; // this should be the ro description
|
||||
break; //break out of for loop
|
||||
}
|
||||
|
||||
if (prevROTitleList == null || (icnt < roTitleList.Count && icnt < prevROTitleList.Count && prevROTitleList[icnt] != roTitleList[icnt]))
|
||||
{
|
||||
if (rotitle == string.Empty && prevROTitleList != null)
|
||||
rotitle = "\n";
|
||||
|
||||
rotitle += indent + roTitleList[icnt] + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
return rotitle;
|
||||
}
|
||||
|
||||
private List<string> AddROHeaderGroupForSummary(PdfPTable datatable, string curROID,List<string> prevROTitleList, Font f2, Color bgColor)
|
||||
private List<string> AddROHeaderGroupForSummary(PdfPTable datatable, string curROID, List<string> prevROTitleList, Font f2, Color bgColor)
|
||||
{
|
||||
List<string> roTitleList = _ROFSTLookup.GetROTitleAndGroupPath(curROID,_IncludeMissingROs,_ConvertCaretToDelta);
|
||||
List<string> roTitleList = _ROFSTLookup.GetROTitleAndGroupPath(curROID, _IncludeMissingROs, _ConvertCaretToDelta);
|
||||
string headerText = GetROTitleAndGroupsForSummary(roTitleList, prevROTitleList);
|
||||
|
||||
if (headerText.Length > 0)
|
||||
{
|
||||
Paragraph pgh = new Paragraph(headerText, f2);
|
||||
PdfPCell cell = new PdfPCell(pgh);
|
||||
|
||||
cell.FollowingIndent = 72;
|
||||
cell.Colspan = 2;
|
||||
cell.BorderColor = Color.WHITE;
|
||||
cell.BackgroundColor = Color.WHITE;
|
||||
cell.BorderWidthTop = 1;
|
||||
|
||||
datatable.AddCell(cell);
|
||||
}
|
||||
|
||||
return roTitleList;
|
||||
}
|
||||
|
||||
@@ -1509,11 +1524,11 @@ namespace Volian.Print.Library
|
||||
datatable.TotalWidth = document.PageSize.Width - document.LeftMargin - document.RightMargin;
|
||||
datatable.LockedWidth = true;
|
||||
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f1 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
iTextSharp.text.Font f3 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 12, 1, Color.BLACK);
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f1 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 14, 1, Color.BLACK);
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
iTextSharp.text.Font f3 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 12, 1, Color.BLACK);
|
||||
|
||||
PdfPCell cell = new PdfPCell(new Phrase(ReportTitle, f1));
|
||||
|
||||
@@ -1527,22 +1542,22 @@ namespace Volian.Print.Library
|
||||
cell = new PdfPCell(new Phrase(roFSTDateTime, f2));
|
||||
cell.BorderColor = Color.WHITE;
|
||||
datatable.AddCell(cell);
|
||||
|
||||
|
||||
datatable.HeaderRows = 2;//3 + (ProcSetList.Count == 1 ? 1 : 0);
|
||||
datatable.DefaultCell.HorizontalAlignment = Element.ALIGN_LEFT;
|
||||
string lastROID = string.Empty;
|
||||
List<string> prevROTitleList = null;
|
||||
List<string> prevROTitleList = null;
|
||||
int lastDBindex = -1;
|
||||
|
||||
foreach (string curROID in _ROList)
|
||||
{
|
||||
string[] tmp = curROID.TrimEnd(',').Split(':'); //curROID.Split(':');// this is the RO FST id number (for plants with multiple RO FSTs)
|
||||
string rolst = (tmp.Length == 2)? tmp[1] : tmp[0];
|
||||
string rolst = (tmp.Length == 2) ? tmp[1] : tmp[0];
|
||||
string[] roIdslst = rolst.Split(',');
|
||||
|
||||
foreach (string cROID in roIdslst)
|
||||
{
|
||||
if (string.IsNullOrEmpty(cROID))
|
||||
if (string.IsNullOrEmpty(cROID))
|
||||
break;
|
||||
|
||||
if (cROID.Length == 4)
|
||||
@@ -1579,7 +1594,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessROChild(PdfPTable datatable, iTextSharp.text.Font f2, iTextSharp.text.Font f3, ref PdfPCell cell, ref string lastROID, ref List<string> prevROTitleList, ref int lastDBindex,ROFSTLookup.rochild cld)
|
||||
private void ProcessROChild(PdfPTable datatable, iTextSharp.text.Font f2, iTextSharp.text.Font f3, ref PdfPCell cell, ref string lastROID, ref List<string> prevROTitleList, ref int lastDBindex, ROFSTLookup.rochild cld)
|
||||
{
|
||||
if (cld.children == null || cld.children.Length <= 0) // leaf node
|
||||
{
|
||||
@@ -1625,7 +1640,7 @@ namespace Volian.Print.Library
|
||||
#endregion
|
||||
|
||||
#region Private Static Methods
|
||||
|
||||
|
||||
private static PdfPTable BuildSubTable(iTextSharp.text.Document document, float[] headerwidths)
|
||||
{
|
||||
PdfPTable subtable = new PdfPTable(headerwidths);
|
||||
@@ -1874,7 +1889,7 @@ namespace Volian.Print.Library
|
||||
public class MyPageHelper : PdfPageEventHelper
|
||||
{
|
||||
#region Fields
|
||||
|
||||
|
||||
private PdfPTable _HeaderTable = null;
|
||||
protected PdfTemplate total;
|
||||
protected BaseFont helv;
|
||||
@@ -1884,7 +1899,7 @@ namespace Volian.Print.Library
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
|
||||
public PdfPTable HeaderTable
|
||||
{
|
||||
get { return _HeaderTable; }
|
||||
@@ -1894,7 +1909,7 @@ namespace Volian.Print.Library
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
|
||||
public MyPageHelper(string byLine)
|
||||
{
|
||||
_ByLine = byLine;
|
||||
@@ -1903,7 +1918,7 @@ namespace Volian.Print.Library
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
|
||||
public override void OnOpenDocument(PdfWriter writer, iTextSharp.text.Document document)
|
||||
{
|
||||
total = writer.DirectContent.CreateTemplate(100, 100);
|
||||
@@ -1918,20 +1933,20 @@ namespace Volian.Print.Library
|
||||
cb.SaveState();
|
||||
|
||||
if (HeaderTable != null)
|
||||
HeaderTable.WriteSelectedRows(0, 2, 36, document.Top+44, cb);
|
||||
HeaderTable.WriteSelectedRows(0, 2, 36, document.Top + 44, cb);
|
||||
String text = "Page " + writer.PageNumber + " of ";
|
||||
float textBase = document.Bottom - 19;//20;
|
||||
cb.BeginText();
|
||||
cb.SetFontAndSize(helv, ptSize);
|
||||
|
||||
float posCenter = document.Left + ((document.Right - document.Left) / 2) - (helv.GetWidthPoint(text+"XX", ptSize) / 2);
|
||||
|
||||
float posCenter = document.Left + ((document.Right - document.Left) / 2) - (helv.GetWidthPoint(text + "XX", ptSize) / 2);
|
||||
cb.SetTextMatrix(posCenter, textBase);
|
||||
cb.ShowText(text);
|
||||
cb.EndText();
|
||||
cb.AddTemplate(total, posCenter + helv.GetWidthPoint(text, ptSize), textBase);
|
||||
cb.RestoreState();
|
||||
|
||||
AddVolianFooter(writer,document);
|
||||
AddVolianFooter(writer, document);
|
||||
AddDateFooter(writer, document);
|
||||
}
|
||||
|
||||
@@ -1949,7 +1964,7 @@ namespace Volian.Print.Library
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
|
||||
private void AddVolianFooter(PdfWriter writer, iTextSharp.text.Document document)
|
||||
{
|
||||
PdfContentByte cb = writer.DirectContent;
|
||||
|
@@ -436,7 +436,7 @@ i = 0;
|
||||
// a tabbing line - BGE wasn't using this in data at time of development. The following code may
|
||||
// need expanded to support the tabbing/column definitions if this is found in data.
|
||||
float lyoff = yOff - 4;
|
||||
plist = plist.Replace("\r", "");
|
||||
plist = plist.Replace("\r", string.Empty);
|
||||
string[] lines = plist.Split("\n".ToCharArray());
|
||||
DocStyle docstyle = MySection.MyDocStyle;
|
||||
try
|
||||
@@ -444,7 +444,7 @@ i = 0;
|
||||
foreach (string clinex in lines)
|
||||
{
|
||||
string cline = clinex.TrimEnd();
|
||||
if (cline != "")
|
||||
if (cline != string.Empty)
|
||||
{
|
||||
// xoff handles the columns. The separator between phone items is a double space. A phone
|
||||
// item may have a single space within it (this comes from 16bit implementation)
|
||||
@@ -721,7 +721,7 @@ i = 0;
|
||||
{
|
||||
PdfDestination dest =pb.PdfDestination;
|
||||
if(dest==null) dest = new PdfDestination(PdfDestination.FIT);
|
||||
PdfOutline pdo = new PdfOutline(MyPdfOutlines[lev-1], dest,Regex.Replace(pb.Title, @"\\{Prerequisite Step: .*?\\}", ""), false);
|
||||
PdfOutline pdo = new PdfOutline(MyPdfOutlines[lev-1], dest,Regex.Replace(pb.Title, @"\\{Prerequisite Step: .*?\\}", string.Empty), false);
|
||||
if (MyPdfOutlines.Count == lev)
|
||||
MyPdfOutlines.Add(pdo);
|
||||
else
|
||||
@@ -861,7 +861,7 @@ i = 0;
|
||||
set
|
||||
{
|
||||
_MySection = value;
|
||||
MySectionTitle = ((_MySection.DisplayNumber ?? "")=="" ? "" : _MySection.DisplayNumber + " - ") + _MySection.DisplayText;
|
||||
MySectionTitle = ((_MySection.DisplayNumber ?? string.Empty)==string.Empty ? string.Empty : _MySection.DisplayNumber + " - ") + _MySection.DisplayText;
|
||||
bool forceLoadSvg = false;
|
||||
if (value.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate && value.MyDocStyle.ResetFirstPageOnSection)
|
||||
DidFirstPageDocStyle = false;
|
||||
@@ -1185,7 +1185,7 @@ i = 0;
|
||||
key = key + "." + MySection.ItemID;
|
||||
break;
|
||||
case E_NumberingSequence.WithinEachSectionNumber:
|
||||
key = key + "." + ( MySection.DisplayNumber == "" ? (MySection.ActiveParent as ItemInfo).DisplayNumber : MySection.DisplayNumber);
|
||||
key = key + "." + ( MySection.DisplayNumber == string.Empty ? (MySection.ActiveParent as ItemInfo).DisplayNumber : MySection.DisplayNumber);
|
||||
break;
|
||||
case E_NumberingSequence.GroupedByLevel:
|
||||
case E_NumberingSequence.Like6_ButDoesntNeedSubsection:
|
||||
@@ -1245,7 +1245,7 @@ i = 0;
|
||||
{
|
||||
while (fibase.FormatID != fibase.ParentID) fibase = fibase.MyParent;
|
||||
sGenMacBase = fibase.GenMac;
|
||||
if (sGenMacBase != null && sGenMacBase != "")
|
||||
if (sGenMacBase != null && sGenMacBase != string.Empty)
|
||||
{
|
||||
XmlDocument xDocGenMacBase = new XmlDocument();
|
||||
xDocGenMacBase.LoadXml(sGenMacBase);
|
||||
@@ -1260,19 +1260,19 @@ i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sGenMac == null || sGenMac == "")
|
||||
if (sGenMac == null || sGenMac == string.Empty)
|
||||
{
|
||||
// If subformat and does not have its own genmac, find an inherited genmac.
|
||||
FormatInfo tmpf = FormatInfo.Get(activeFormat.ParentID);
|
||||
while (tmpf.FormatID!=1 && (sGenMac==null||sGenMac==""))
|
||||
while (tmpf.FormatID!=1 && (sGenMac==null||sGenMac==string.Empty))
|
||||
{
|
||||
sGenMac = tmpf.GenMac;
|
||||
tmpf = FormatInfo.Get(tmpf.ParentID);
|
||||
}
|
||||
if (sGenMac == null || sGenMac == "")
|
||||
if (sGenMac == null || sGenMac == string.Empty)
|
||||
sGenMac = "<svg></svg>";
|
||||
}
|
||||
if (sGenMacBase != null && sGenMacBase != "")
|
||||
if (sGenMacBase != null && sGenMacBase != string.Empty)
|
||||
{
|
||||
sGenMac = sGenMac.Replace("</svg>", sGenMacBase + "</svg>");
|
||||
}
|
||||
@@ -1338,7 +1338,7 @@ i = 0;
|
||||
//float rowAdj = 0; // = 18;
|
||||
|
||||
bool usePSIvalue = false; // C2021-065 used with ROLkUpMatch pagelist flag (Barakah Alarms)
|
||||
string otherChildUnit = ""; // C2021-065 used when OTHER applicability information is used for the ROLookUp
|
||||
string otherChildUnit = string.Empty; // C2021-065 used when OTHER applicability information is used for the ROLookUp
|
||||
foreach (VEPROMS.CSLA.Library.PageItem pageItem in pageStyle.PageItems)
|
||||
{
|
||||
if (pageItem.Token == null) continue; // can be null if token is dependent on PSI lookup!
|
||||
@@ -1401,7 +1401,7 @@ i = 0;
|
||||
parts[1] = parts[n + 1];// Get the last 2 parts
|
||||
parts[2] = parts[n + 2];
|
||||
}
|
||||
string ROLookupVal = "";
|
||||
string ROLookupVal = string.Empty;
|
||||
// parts[0] - the RO to look up - for Alarms, is usually the EOP number thus uses the "{EOPNUM}" token
|
||||
// parts[1] - Which of the multiple return value from the RO to return
|
||||
// parts[2] - the value to use if not found in ROs - usually defined in a PSI field for that Alarm procedure
|
||||
@@ -1420,7 +1420,7 @@ i = 0;
|
||||
int idx = procnum.IndexOf('-');
|
||||
otherChildUnit = procnum.Substring(0, idx); // we need to get RO info for the Other child applicability - this gets child's number
|
||||
}
|
||||
ROLookupVal = ROLookup(parts[0], parts[1], "",otherChildUnit); // will return empty string if alarm point is not found in RO database
|
||||
ROLookupVal = ROLookup(parts[0], parts[1], string.Empty,otherChildUnit); // will return empty string if alarm point is not found in RO database
|
||||
usePSIvalue = (ROLookupVal != section.MyProcedure.DisplayNumber); // use PSI value if child alarm ID not found or does not match resolved procedure number (alarm point)
|
||||
}
|
||||
// C2021-065 if usePSIvalue is true, then we know alarm point info is not in the RO database, so just use the default (PSI) value
|
||||
@@ -1437,7 +1437,7 @@ i = 0;
|
||||
ROLookupVal = dt1.StartText;
|
||||
}
|
||||
// replace the pagelist token with ROLookupVal
|
||||
pltok = pltok.Substring(0, idxstart) + ROLookupVal + ((idxstart + idxend < pltok.Length) ? pltok.Substring(idxstart + idxend + 1) : "");
|
||||
pltok = pltok.Substring(0, idxstart) + ROLookupVal + ((idxstart + idxend < pltok.Length) ? pltok.Substring(idxstart + idxend + 1) : string.Empty);
|
||||
}
|
||||
// C2021-065 (BNPP Alarms format) we are processing a paglist flag (ROLkUpMatch) to determine how to get Alarm Point information
|
||||
// Nothing else is on this page list item, so use "continue" to jump to the next pagelist item as nothing gets printed for this item
|
||||
@@ -1447,13 +1447,13 @@ i = 0;
|
||||
MatchCollection matches = regexFindToken.Matches(pltok);//(pageItem.Token);
|
||||
if (matches.Count > 0)
|
||||
{
|
||||
string plstr = "";
|
||||
string plstr = string.Empty;
|
||||
// When a pagelist line (row) has more than one token that is resolved to text, each resolved token text was place on top
|
||||
// of each other. Use a temporary string (plstr) to process the pagelist tokens for each pagelist line (row) before adding
|
||||
// it to the svgGroup.
|
||||
plstr = pltok;//pageItem.Token;
|
||||
// F2017-046: Remove the '@@' characters that were getting printed on SAMG Sup Info facing pages for Calvert (BGESAM1 format).
|
||||
if (MyPromsPrinter.DoingFacingPage && plstr.Contains("@@")) plstr = plstr.Replace("@@", "");
|
||||
if (MyPromsPrinter.DoingFacingPage && plstr.Contains("@@")) plstr = plstr.Replace("@@", string.Empty);
|
||||
foreach (Match match in matches)
|
||||
{
|
||||
string token = match.Value;
|
||||
@@ -1485,7 +1485,7 @@ i = 0;
|
||||
{
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem.Token, (float)pageItem.RelatedItem.Row, (float)pageItem.RelatedItem.Col, pageItem.RelatedItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, val, MySection));
|
||||
svgGroup.Add(PageItemToSvgText(pltok, (float)pageItem.RelatedItem.Row, (float)pageItem.RelatedItem.Col, pageItem.RelatedItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, val, MySection));
|
||||
plstr = ""; // Clear it so it isn't put out twice (used below)
|
||||
plstr = string.Empty; // Clear it so it isn't put out twice (used below)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1494,11 +1494,11 @@ i = 0;
|
||||
int eindx = token.IndexOf("}", bindx);
|
||||
val = token.Substring(bindx + 1, eindx - bindx - 1);
|
||||
}
|
||||
if (val != null && val != "" && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
||||
//if (val == null || val == "")
|
||||
if (val != null && val != string.Empty && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
||||
//if (val == null || val == string.Empty)
|
||||
//val = " ";
|
||||
if (val == null)
|
||||
val = "";
|
||||
val = string.Empty;
|
||||
plstr = plstr.Replace(token, val);
|
||||
// Get a list of Pagelist token that are inside the PS= conditional result
|
||||
// Paglist tokens inside a PS= conditional are surrounded by square brackets instead of curley
|
||||
@@ -1540,7 +1540,7 @@ i = 0;
|
||||
if (relval == "Y")
|
||||
{
|
||||
svgGroup.Add(PageItemToSvgText(pltok, (float)pageItem.RelatedItem.Row, (float)pageItem.RelatedItem.Col, pageItem.RelatedItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, val, MySection));
|
||||
plstr = ""; // Clear it so it isn't put out twice (used below)
|
||||
plstr = string.Empty; // Clear it so it isn't put out twice (used below)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1549,11 +1549,11 @@ i = 0;
|
||||
int eindx = token.IndexOf("}", bindx);
|
||||
val = token.Substring(bindx + 1, eindx - bindx - 1);
|
||||
}
|
||||
if (val != null && val != "" && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
||||
//if (val == null || val == "")
|
||||
if (val != null && val != string.Empty && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
||||
//if (val == null || val == string.Empty)
|
||||
//val = " ";
|
||||
if (val == null)
|
||||
val = "";
|
||||
val = string.Empty;
|
||||
plstr = plstr.Replace(token, val);
|
||||
// Get a list of Pagelist token that are inside the SI= conditional result
|
||||
// Paglist tokens inside a PS= conditional are surrounded by square brackets instead of curley
|
||||
@@ -1575,7 +1575,7 @@ i = 0;
|
||||
if (!ProcessPaglistToken(section, svgGroup, pageItem, ref useFontForCheckOffHeader, ref plstr, token)) break;
|
||||
}
|
||||
} // end foreach matches
|
||||
if (plstr != "")
|
||||
if (plstr != string.Empty)
|
||||
{
|
||||
if (useFontForCheckOffHeader != null)
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, useFontForCheckOffHeader, MySection));
|
||||
@@ -1604,30 +1604,36 @@ i = 0;
|
||||
else
|
||||
Volian.Base.Library.BaselineMetaFile.WriteLine("No Pagelist Information");
|
||||
}
|
||||
|
||||
private string ROLookup(string accpageid, string multiid, string deflt)
|
||||
{
|
||||
return ROLookup(accpageid, multiid, deflt, "");
|
||||
return ROLookup(accpageid, multiid, deflt, string.Empty);
|
||||
}
|
||||
|
||||
// C2021-065 pass in a override for the child unit - in this case the <u-Otherxxx> token is being used (Barakah Alarms)
|
||||
private string ROLookup(string accpageid, string multiid, string deflt, string overrideChild)
|
||||
{
|
||||
ROFSTLookup myLookup = MySection.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MySection.MyDocVersion, overrideChild);
|
||||
|
||||
string accpgid = accpageid;
|
||||
//accpgid = accpgid.Replace("-HIGH", "-HI").Replace("-LOW", "-LO").Replace("_HIGH", "-HI").Replace("_LOW", "-LO").Replace(@"\u8209?", "-");
|
||||
string val = myLookup.GetROValueByAccPagID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
|
||||
if (val == null)
|
||||
ROFSTLookup.rochild roc = myLookup.GetROChildByAccPageID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
|
||||
|
||||
if (roc.value == null)
|
||||
{
|
||||
accpgid = accpgid.Replace(@"\u8209?", "-");
|
||||
val = myLookup.GetROValueByAccPagID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
|
||||
roc = myLookup.GetROChildByAccPageID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
|
||||
}
|
||||
if (!deflt.StartsWith("[") && val != null && val.Trim().Length > 0) // don't return val if it's an empty or blank string - jsj 01-28-2019
|
||||
|
||||
if (!deflt.StartsWith("[") && !string.IsNullOrEmpty(roc.value) && roc.value.Trim().Length > 0) // don't return val if it's an empty or blank string - jsj 01-28-2019
|
||||
{
|
||||
val = val.Replace("[xB3]", "\xB3");
|
||||
val = val.Replace("[xB2]", "\xB2");
|
||||
return val;
|
||||
roc.value = roc.value.Replace("[xB3]", "\xB3");
|
||||
roc.value = roc.value.Replace("[xB2]", "\xB2");
|
||||
return roc.value;
|
||||
}
|
||||
|
||||
return deflt;
|
||||
}
|
||||
|
||||
private bool _DidHLSText = false;
|
||||
public bool DidHLSText
|
||||
{
|
||||
@@ -1640,23 +1646,23 @@ i = 0;
|
||||
get { return _HasHLSTextId; }
|
||||
set { _HasHLSTextId = value; }
|
||||
}
|
||||
private string _HLSText = "";
|
||||
private string _HLSText = string.Empty;
|
||||
public string HLSText
|
||||
{
|
||||
get { return _HLSText; }
|
||||
set
|
||||
{
|
||||
if (_HLSText == "")
|
||||
if (_HLSText == string.Empty)
|
||||
_HLSText = value;
|
||||
}
|
||||
}
|
||||
private string _HLSTAB = "";
|
||||
private string _HLSTAB = string.Empty;
|
||||
public string HLSTAB
|
||||
{
|
||||
get { return _HLSTAB; }
|
||||
set { _HLSTAB = value; }
|
||||
}
|
||||
private string _HLRNO = "";
|
||||
private string _HLRNO = string.Empty;
|
||||
public string HLRNO
|
||||
{
|
||||
get { return _HLRNO; }
|
||||
@@ -1697,11 +1703,11 @@ i = 0;
|
||||
{
|
||||
case "{!atom}":
|
||||
// Add an Atom Figure to the SVG
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
AddImage(svgGroup, 160.5f, 170.5f, 288f, 323f, "atom.bmp");
|
||||
break;
|
||||
case "{!cpllogo}":
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
AddImage(svgGroup, 10f, 10f, 78.7f, 29.8f, "cpllogo.bmp");
|
||||
break;
|
||||
//case "{!domlogo}":
|
||||
@@ -1738,7 +1744,7 @@ i = 0;
|
||||
case "[BOX8]":
|
||||
case "{BOX9}":
|
||||
case "[BOX9]":
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
svgGroup.Add(PageItemToSvgUse(pageItem, FirstAndLast(token)));
|
||||
break;
|
||||
case "{PMODEBOX}": // need to set either 1 or 2 depending on number of columns
|
||||
@@ -1751,24 +1757,24 @@ i = 0;
|
||||
else if (_MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.Two)
|
||||
box = "2";
|
||||
box = "{BOX" + box + "}";
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
svgGroup.Add(PageItemToSvgUse(pageItem, FirstAndLast(box)));
|
||||
break;
|
||||
case "{DRAFTPAGE}":
|
||||
//if (!AllowedWatermarks.Contains("Draft")) AllowedWatermarks.Add("Draft"); -- B2018-124 not needed anymore
|
||||
plstr = plstr.Replace(token, "");// Remove token since it is handled now
|
||||
plstr = plstr.Replace(token, string.Empty);// Remove token since it is handled now
|
||||
break;
|
||||
case "{REFERENCEPAGE}":
|
||||
//if (!AllowedWatermarks.Contains("Reference")) AllowedWatermarks.Add("Reference"); -- B2018-124 not needed anymore
|
||||
plstr = plstr.Replace(token, "");// Remove token since it is handled now
|
||||
plstr = plstr.Replace(token, string.Empty);// Remove token since it is handled now
|
||||
break;
|
||||
case "{MASTERPAGE}":
|
||||
//if (!AllowedWatermarks.Contains("Master")) AllowedWatermarks.Add("Master"); -- B2018-124 not needed anymore
|
||||
plstr = plstr.Replace(token, "");// Remove token since it is handled now
|
||||
plstr = plstr.Replace(token, string.Empty);// Remove token since it is handled now
|
||||
break;
|
||||
case "{SAMPLEPAGE}":
|
||||
//if (!AllowedWatermarks.Contains("Sample")) AllowedWatermarks.Add("Sample"); -- B2018-124 not needed anymore
|
||||
plstr = plstr.Replace(token, "");// Remove token since it is handled now
|
||||
plstr = plstr.Replace(token, string.Empty);// Remove token since it is handled now
|
||||
break;
|
||||
//case "{INFORMATIONPAGE}":
|
||||
// if (!AllowedWatermarks.Contains("Information Only")) AllowedWatermarks.Add("Information Only"); -- B2018-124 not needed anymore
|
||||
@@ -1788,7 +1794,7 @@ i = 0;
|
||||
float linelen = tlen * (float)pageItem.Font.CPI / 12;
|
||||
string title = section.MyProcedure.MyContent.Text;
|
||||
if (title.Contains("<NO TITLE>") && !section.ActiveFormat.PlantFormat.FormatData.ProcData.PrintNoTitle)
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
else
|
||||
{
|
||||
if (section.ActiveFormat.PlantFormat.FormatData.ProcData.CapitalizeTitle) title = title.ToUpper();
|
||||
@@ -1833,7 +1839,7 @@ i = 0;
|
||||
if (OldTemplateContMsg)
|
||||
plstr = plstr.Replace("{CM:(Cont)}", "(Cont)");
|
||||
else
|
||||
plstr = plstr.Replace("{CM:(Cont)}", "");
|
||||
plstr = plstr.Replace("{CM:(Cont)}", string.Empty);
|
||||
break;
|
||||
case "{RF:REFERENCE}":
|
||||
// This token is used by IP2. In 16bit it is processed when the PO_DISTRIBUTEAPPROVED
|
||||
@@ -1842,13 +1848,13 @@ i = 0;
|
||||
// unless/until it is determined that it is used (no data that Volian currently has
|
||||
// contains this file). To implement it requires a config item off of the procedure level,
|
||||
// user interface support on the Procedure Properties dialog and print support.
|
||||
plstr = plstr.Replace("{RF:REFERENCE}", "");
|
||||
plstr = plstr.Replace("{RF:REFERENCE}", string.Empty);
|
||||
break;
|
||||
case "{NULLDOCCURPAGE}":
|
||||
// This token is used by IP2. There was no support for it in 16bit and the 16bit to 32bit
|
||||
// output compared so it is just removed here so that a pagelist token error is not output
|
||||
// in error log.
|
||||
plstr = plstr.Replace("{NULLDOCCURPAGE}", "");
|
||||
plstr = plstr.Replace("{NULLDOCCURPAGE}", string.Empty);
|
||||
break;
|
||||
case "{PDFDate}":
|
||||
plstr = plstr.Replace("{PDFDate}", DateTime.Now.ToString("MM/dd/yyyy"));
|
||||
@@ -1882,16 +1888,16 @@ i = 0;
|
||||
{
|
||||
// copied Rgex from DisplayText and modifed to remove the Parent/Child Unit information
|
||||
// i.e. <U>, <U-ID>, <U-NAME>, <U-TEXT>, <U-NUMBER>, <U-OTHERID>, <U-OTHERNAME>, <U-OTHERTEXT>, <U-OTHERNUMBER>
|
||||
eopnum = Regex.Replace(eopnum, @"\<U\>", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)ID)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)NAME)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)TEXT)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)NUMBER)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<U\>", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)ID)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)NAME)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)TEXT)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)NUMBER)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
// B2021-148 remove space character after "OTHER"
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERID)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERNAME)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERTEXT)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERNUMBER)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERID)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERNAME)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERTEXT)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERNUMBER)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
}
|
||||
else
|
||||
eopnum = section.MyProcedure.DisplayNumber;// B2021-066: found and fixed during proc pc/pc work
|
||||
@@ -1933,7 +1939,7 @@ i = 0;
|
||||
&& token.Contains("ATTACHTITLECONT") && DidFirstPageDocStyle)
|
||||
{
|
||||
string myMsg = section.MyDocStyle.Continue.Top.Message;
|
||||
if (myMsg != null && myMsg != "")stitle = stitle + myMsg;
|
||||
if (myMsg != null && myMsg != string.Empty)stitle = stitle + myMsg;
|
||||
}
|
||||
// B2021-119: large titles on Landscape Word Attachments are printing on 2 lines.
|
||||
int? stl = (int)section.ActiveFormat.PlantFormat.FormatData.SectData.SectionNumberAndTitleLength;
|
||||
@@ -1945,7 +1951,7 @@ i = 0;
|
||||
PrintedSectionPage = (int)pageItem.Row - _sectLevelNumTtlDiff;
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem, section.DisplayText));
|
||||
break;
|
||||
case "{METASECTIONTITLE}": // This will print the top level section title (versus level above current)
|
||||
@@ -1961,7 +1967,7 @@ i = 0;
|
||||
plstr = SplitTitle(svgGroup, pageItem, top.DisplayText, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionTitleLength, token, plstr, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionNumberAndTitleLength);
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
case "{SECTIONLEVELNUMBER}":
|
||||
case "[SECTIONLEVELNUMBER]":
|
||||
@@ -1972,7 +1978,7 @@ i = 0;
|
||||
_sectLevelNumTtlDiff = (int)pageItem.Row;
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
// B2020-040: pagelist was {SECTIONLEVELNUMBER}, {SECTIONLEVELTITLE} and if no SECTIONLEVELNUMBER exists, printed
|
||||
// text starts with a ', ' - remove it.
|
||||
if (plstr.StartsWith(", ") && plstr.IndexOf("{SECTIONLEVELTITLE}") == 2)
|
||||
@@ -1996,7 +2002,7 @@ i = 0;
|
||||
plstr = plstr.Replace(token, top.DisplayNumber);
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
case "{UNITTEXT}":
|
||||
case "[UNITTEXT]":
|
||||
@@ -2069,12 +2075,12 @@ i = 0;
|
||||
plstr = plstr.Replace(token, "BREAKER");
|
||||
break;
|
||||
default:
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
case "{STARTUP}":
|
||||
ItemInfo firstHighs = ValveGetFirstStep(section);
|
||||
@@ -2092,12 +2098,12 @@ i = 0;
|
||||
plstr = plstr.Replace(token, "STARTUP/");
|
||||
break;
|
||||
default:
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
case "{PROCDES}":
|
||||
ProcDescrList pdl = section.ActiveFormat.PlantFormat.FormatData.PrintData.ProcDescrList;
|
||||
@@ -2112,7 +2118,7 @@ i = 0;
|
||||
if (procnum.Contains(matchStr))
|
||||
{
|
||||
if (pd.ProcDescr1 == "{null}") // used to override fmt file inheritance & set null/empty string
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
else
|
||||
plstr = pd.ProcDescr1;
|
||||
break;
|
||||
@@ -2127,13 +2133,13 @@ i = 0;
|
||||
if (Regex.IsMatch(procnum.Substring(0,1),"[A-Za-z]"))
|
||||
plstr = pd.ProcDescr1;
|
||||
else
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
break;
|
||||
}
|
||||
if (Regex.IsMatch(procnum, "^[A-Za-z]+$"))
|
||||
plstr = pd.ProcDescr1;
|
||||
else
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2162,7 +2168,7 @@ i = 0;
|
||||
if (Regex.IsMatch(procnum, "^[A-Za-z]+$"))
|
||||
plstr = pd.ProcDescr2;
|
||||
else
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2180,7 +2186,7 @@ i = 0;
|
||||
plstr = plstr.Replace(token, thisDate2.ToString("H:mm"));
|
||||
break;
|
||||
case "{HLRNO}":
|
||||
plstr = HLRNO==null?"":plstr.Replace(token, HLRNO);
|
||||
plstr = HLRNO==null?string.Empty:plstr.Replace(token, HLRNO);
|
||||
break;
|
||||
case "{HLSTAB}":
|
||||
plstr = plstr.Replace(token, HLSTAB);
|
||||
@@ -2204,14 +2210,14 @@ i = 0;
|
||||
//int sc = sectCfg.Section_CheckoffListSelection;
|
||||
if (!MySection.HasInitials)
|
||||
{
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
//PIInitials = pageItem;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pageItem.Row == -MySection.MyDocStyle.Layout.TopMargin)
|
||||
{
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
PIInitials = pageItem;
|
||||
}
|
||||
else
|
||||
@@ -2222,7 +2228,7 @@ i = 0;
|
||||
// copied from 16bit's pagelist.cs for BGE:
|
||||
string revUnit = null;
|
||||
string unitNum = MySection.MyDocVersion.DocVersionConfig.Print_UnitNumberForPageList;
|
||||
if (Rev != null && Rev != "")
|
||||
if (Rev != null && Rev != string.Empty)
|
||||
{
|
||||
revUnit = Rev;
|
||||
int indxs = Rev.IndexOf(MySection.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash ? '\\' : '/');
|
||||
@@ -2262,7 +2268,7 @@ i = 0;
|
||||
if (val.ToUpper().Contains("<U>") || val.ToUpper().Contains("<U-")) // Replace token with the applicable unit information
|
||||
{
|
||||
string unbr3 = ResolveUnitApp(MySection.MyDocVersion, val);
|
||||
plstr = unbr3 ?? "";
|
||||
plstr = unbr3 ?? string.Empty;
|
||||
}
|
||||
plstr = plstr.Replace(token, val);
|
||||
break; // B2019-134 break out of switch statement after processing the <SI- token so that it can loop and handle any other tokens on the same line
|
||||
@@ -2275,7 +2281,7 @@ i = 0;
|
||||
if (plstr.ToUpper().Contains("<U>") || val.ToUpper().Contains("<U-")) // Replace token with the applicable unit information
|
||||
{
|
||||
string unbr3 = ResolveUnitApp(MySection.MyDocVersion, val);
|
||||
plstr = unbr3 ?? "";
|
||||
plstr = unbr3 ?? string.Empty;
|
||||
}
|
||||
// the first part of the string between the ? and ' ' is the other logical
|
||||
// to see if it's on. If on, just use col and/or row as defined. Otherwise use
|
||||
@@ -2292,14 +2298,14 @@ i = 0;
|
||||
col = System.Convert.ToInt32(newval.Substring(4));
|
||||
}
|
||||
svgGroup.Add(PageItemToSvgText(pageItem.Token, pageItem.Row ?? 0, col, pageItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, plstr, MySection));
|
||||
plstr = ""; // clear so it doesn't get added twice, i.e. in the method that calls this.
|
||||
plstr = string.Empty; // clear so it doesn't get added twice, i.e. in the method that calls this.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (token.Contains(@"RO-"))
|
||||
{
|
||||
plstr = token.Replace("{","").Replace("}","");
|
||||
plstr = token.Replace("{",string.Empty).Replace("}",string.Empty);
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, MySection));
|
||||
}
|
||||
if (token.Contains(@"PS-"))
|
||||
@@ -2317,7 +2323,7 @@ i = 0;
|
||||
if(val.ToUpper().Contains("<U>") || val.ToUpper().Contains("<U-")) // Replace token with the applicable unit information
|
||||
{
|
||||
string unbr3 = ResolveUnitApp(MySection.MyDocVersion, val);
|
||||
val = unbr3 ?? "";
|
||||
val = unbr3 ?? string.Empty;
|
||||
}
|
||||
// MaxWidth is used to define width that the PSI text spans x-direction on page. If it is
|
||||
// defined, see if the text is too wide for a single line (SplitTextMaxWidth). The
|
||||
@@ -2352,22 +2358,22 @@ i = 0;
|
||||
col = System.Convert.ToInt32(newval.Substring(4));
|
||||
}
|
||||
svgGroup.Add(PageItemToSvgText(pageItem.Token, pageItem.Row ?? 0, col, pageItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, plstr, MySection));
|
||||
plstr = ""; // clear so it doesn't get added twice, i.e. in the method that calls this.
|
||||
plstr = string.Empty; // clear so it doesn't get added twice, i.e. in the method that calls this.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (plstr != "")
|
||||
if (plstr != string.Empty)
|
||||
{
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, MySection));
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
}
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token));
|
||||
}
|
||||
//_MyLog.InfoFormat("Token not processed {0}", token);
|
||||
if (plstr == "") retval = false;
|
||||
if (plstr == string.Empty) retval = false;
|
||||
break;
|
||||
}
|
||||
return retval;
|
||||
@@ -2409,7 +2415,7 @@ i = 0;
|
||||
// if (dvConfig != null)
|
||||
// {
|
||||
// val = dvConfig.GetValue("SI", fieldName);
|
||||
// if (val != null && val != "") return val; // the value exists within the docversion level
|
||||
// if (val != null && val != string.Empty) return val; // the value exists within the docversion level
|
||||
// }
|
||||
// FolderInfo fi = pi.MyDocVersion.MyFolder;
|
||||
// while (fi != null)
|
||||
@@ -2418,7 +2424,7 @@ i = 0;
|
||||
// if (folderConfig != null)
|
||||
// {
|
||||
// val = folderConfig.GetValue("SI", fieldName);
|
||||
// if (val != null && val != "") return val; // the value exists within this folder
|
||||
// if (val != null && val != string.Empty) return val; // the value exists within this folder
|
||||
// }
|
||||
// fi = fi.ActiveParent as FolderInfo;
|
||||
// }
|
||||
@@ -2476,11 +2482,11 @@ i = 0;
|
||||
{
|
||||
plstr = plstr.Replace(match, line); // include preceeding text with the first line v.c. summer
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, yOffset));
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
}
|
||||
else
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, line, yOffset));
|
||||
plstr = plstr.Replace(match, "");
|
||||
plstr = plstr.Replace(match, string.Empty);
|
||||
}
|
||||
yOffset += (float)((pageItem.Font.Size > 14) ? pageItem.Font.Size : 12);
|
||||
}
|
||||
@@ -2489,7 +2495,7 @@ i = 0;
|
||||
private string SplitTitle(SvgGroup svgGroup, VEPROMS.CSLA.Library.PageItem pageItem, string title, int? len, string match, string plstr,int? numAndTitleLen)
|
||||
{
|
||||
bool includePrecedingText = false;
|
||||
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, "");
|
||||
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, string.Empty);
|
||||
// F2017-013 - Ginna (RGESAM1) this handles when you have {SECTIONLEVELNUMBER} and {SECTIONLEVELTITLE} on the same line.
|
||||
// The section number was already replaced in plstr so when determining where to split the title,
|
||||
// include the section number (and anything before the title) in the calculation of where to split.
|
||||
@@ -2508,9 +2514,9 @@ i = 0;
|
||||
if ((len == null || len == 0 || ItemInfo.StripRtfFormatting(title).Length < len) && (!includePrecedingText || ItemInfo.StripRtfFormatting(title).Length < numAndTitleLen))
|
||||
{
|
||||
// B2022-061: don't print '\line' as part of procedure title in pagelist items.
|
||||
if (match == "{PROCTITLE}") title = title.Replace("\\line ", "");
|
||||
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, ""); // this would have been done in proctitle1
|
||||
plstr = plstr.Replace(match, title).Replace("@@","");
|
||||
if (match == "{PROCTITLE}") title = title.Replace("\\line ", string.Empty);
|
||||
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, string.Empty); // this would have been done in proctitle1
|
||||
plstr = plstr.Replace(match, title).Replace("@@",string.Empty);
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem, title));
|
||||
return plstr;
|
||||
}
|
||||
@@ -2520,7 +2526,7 @@ i = 0;
|
||||
if (plstr.Contains("@@"))
|
||||
{
|
||||
DoSpecialSectNumTitle(svgGroup, pageItem, title, len, match, plstr);
|
||||
return ""; // all resolved pagelist items were already added to svgGroup for printing.
|
||||
return string.Empty; // all resolved pagelist items were already added to svgGroup for printing.
|
||||
}
|
||||
// Otherwise determine how many line to split the text into
|
||||
List<string>titleLines = Volian.Base.Library.RtfTools.SplitText(title,(includePrecedingText)?(int)numAndTitleLen: (int)len);
|
||||
@@ -2555,11 +2561,11 @@ i = 0;
|
||||
{
|
||||
plstr = plstr.Replace(match, line); // include preceeding text with the first line v.c. summer
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, yOffset));
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
}
|
||||
else
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, line, yOffset));
|
||||
plstr = plstr.Replace(match, "");
|
||||
plstr = plstr.Replace(match, string.Empty);
|
||||
}
|
||||
yOffset += (float)((pageItem.Font.Size > 14) ? pageItem.Font.Size : 12);
|
||||
}
|
||||
@@ -2632,7 +2638,7 @@ i = 0;
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, line, yOffset));
|
||||
yOffset += (float)((pageItem.Font.Size > 14) ? pageItem.Font.Size : 12);
|
||||
}
|
||||
return plstr.Replace(token, "");
|
||||
return plstr.Replace(token, string.Empty);
|
||||
}
|
||||
private string SplitEOPNumber(SvgGroup svgGroup, PageItem pageItem, string eopnum, string token, string plstr)
|
||||
{
|
||||
@@ -2643,7 +2649,7 @@ i = 0;
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, line, yOffset));
|
||||
yOffset += (float)((pageItem.Font.Size > 14) ? pageItem.Font.Size : 12);
|
||||
}
|
||||
return plstr.Replace(token, "");
|
||||
return plstr.Replace(token, string.Empty);
|
||||
}
|
||||
//private string symblsStr = "\u25CF\u0394"; // string of possible symbol character in a tab
|
||||
//// add symbol characters as needed
|
||||
@@ -2697,7 +2703,7 @@ i = 0;
|
||||
if (lnCnt == 1) continue;
|
||||
plstr = plstr.Replace(match, line);
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, yOffset));
|
||||
plstr = ""; // clear it because it was added into the list in the line above this, i.e. don't duplicate
|
||||
plstr = string.Empty; // clear it because it was added into the list in the line above this, i.e. don't duplicate
|
||||
yOffset += 12;
|
||||
}
|
||||
return plstr;
|
||||
@@ -2815,7 +2821,7 @@ i = 0;
|
||||
// there is a message in format file to use instead of text, then use it.
|
||||
if (tmpi == 8 && mySize.Width > fontShrinkAftLen)
|
||||
{
|
||||
if (reptext != null && reptext != "")
|
||||
if (reptext != null && reptext != string.Empty)
|
||||
text = reptext;
|
||||
else // As per PAL (11/15/21) have default message and highlight by italics (text was already bolded)
|
||||
{
|
||||
@@ -2939,7 +2945,7 @@ i = 0;
|
||||
// that are used.
|
||||
|
||||
// 16-bit had code to string preceeding blanks.
|
||||
if (Rev != null && Rev != "") Rev = Rev.TrimStart(" ".ToCharArray());
|
||||
if (Rev != null && Rev != string.Empty) Rev = Rev.TrimStart(" ".ToCharArray());
|
||||
|
||||
// Now check the format flags to determine if/how the Rev string should be parsed.
|
||||
if ((MySection.ActiveFormat.PlantFormat.FormatData.PrintData.DoRevDate && Rev.Contains("/"))
|
||||
@@ -2958,14 +2964,14 @@ i = 0;
|
||||
case "{SETREV}":
|
||||
return MySection.MyDocVersion.DocVersionConfig.ProcedureSetRev;
|
||||
case "{NULLDOCCURPAGE}":
|
||||
return "";
|
||||
return string.Empty;
|
||||
}
|
||||
if (!_MissingTokens.Contains(match.Value))
|
||||
{
|
||||
_MissingTokens.Add(match.Value);
|
||||
_MyLog.InfoFormat("Unhandled token {0}", match.Value);
|
||||
}
|
||||
return "";
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
public class ChkListBoxesHelper : List<ChkListBoxHelper>
|
||||
|
Reference in New Issue
Block a user