//--------------------------------------------------------------------// // M e t h o d // // r e p o r t H e a d e r // //--------------------------------------------------------------------// // // // Write report header. // // // //--------------------------------------------------------------------// private static void reportHeader( ReportCore.eRptFileFmt rptFileFmt, Object writer, String prnFilename, String ovlFilename) { Int32 maxLineLen = 0; String title = ""; title = "*** Make Overlay report ***:"; maxLineLen = PrnParseConstants.cRptA_colMax_Action + PrnParseConstants.cRptA_colMax_Offset + PrnParseConstants.cRptA_colMax_Type + PrnParseConstants.cRptA_colMax_Seq + PrnParseConstants.cRptA_colMax_Desc + (PrnParseConstants.cColSeparatorLen * 4) - 15; //----------------------------------------------------------------// // // // Write out the title. // // // //----------------------------------------------------------------// ReportCore.hddrTitle(writer, rptFileFmt, false, title); //----------------------------------------------------------------// // // // Write out the date, time, input file identity, and // // count of report rows. // // // //----------------------------------------------------------------// ReportCore.tableHddrPair(writer, rptFileFmt); ReportCore.tableRowPair(writer, rptFileFmt, "Date_time", DateTime.Now.ToString(), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "Print_file", prnFilename, _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "Overlay_file", ovlFilename, _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableClose(writer, rptFileFmt); }
//--------------------------------------------------------------------// // M e t h o d // // r e p o r t H d d r // //--------------------------------------------------------------------// // // // Write main report header. // // // //--------------------------------------------------------------------// private static void reportHddr(ReportCore.eRptFileFmt rptFileFmt, Object writer, String fontNameTTF, String fontFilenameTTF, String fontFilenamePCL) { Int32 maxLineLen = 80; String title = "*** Soft Font Generator ***"; //----------------------------------------------------------------// // // // Write out the title. // // // //----------------------------------------------------------------// ReportCore.hddrTitle(writer, rptFileFmt, false, title); //----------------------------------------------------------------// // // // Write out the date, time, input file identity and size, and // // count of report rows. // // // //----------------------------------------------------------------// ReportCore.tableHddrPair(writer, rptFileFmt); ReportCore.tableRowPair(writer, rptFileFmt, "Date_time", DateTime.Now.ToString(), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "Target_PCL_font_file", fontFilenamePCL, _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "Donor_TTF_name", fontNameTTF, _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "Donor_TTF_file", fontFilenameTTF, _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableClose(writer, rptFileFmt); }
//--------------------------------------------------------------------// // M e t h o d // // r e p o r t H d d r // //--------------------------------------------------------------------// // // // Write main report header. // // // //--------------------------------------------------------------------// private static void reportHddr(ReportCore.eRptFileFmt rptFileFmt, Object writer, String symSetFilename) { Int32 maxLineLen = 80; String title = "*** Symbol Set Generator ***"; //----------------------------------------------------------------// // // // Write out the title. // // // //----------------------------------------------------------------// ReportCore.hddrTitle(writer, rptFileFmt, false, title); //----------------------------------------------------------------// // // // Open the table and Write Write out the date, time and input // // file identity. // // // //----------------------------------------------------------------// ReportCore.tableHddrPair(writer, rptFileFmt); ReportCore.tableRowPair(writer, rptFileFmt, "Date_time", DateTime.Now.ToString(), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "Symbol set file", symSetFilename, _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableClose(writer, rptFileFmt); }
//--------------------------------------------------------------------// // M e t h o d // // r e p o r t H e a d e r // //--------------------------------------------------------------------// // // // Write report header. // // // //--------------------------------------------------------------------// private static void reportHeader( ToolPrnAnalyse.eInfoType indxInfoType, ReportCore.eRptFileFmt rptFileFmt, Object writer, String prnFilename, Int64 fileSize, Int32 reportSize) { Int32 maxLineLen = 0; String title = ""; if (indxInfoType == ToolPrnAnalyse.eInfoType.Analysis) { title = "*** Prn Analysis ***"; maxLineLen = PrnParseConstants.cRptA_colMax_Offset + PrnParseConstants.cRptA_colMax_Type + PrnParseConstants.cRptA_colMax_Seq + PrnParseConstants.cRptA_colMax_Desc + (PrnParseConstants.cColSeparatorLen * 3) - 12; } else if (indxInfoType == ToolPrnAnalyse.eInfoType.Content) { title = "*** Prn Content ***"; maxLineLen = PrnParseConstants.cRptC_colMax_Offset + PrnParseConstants.cRptC_colMax_Hex + PrnParseConstants.cRptC_colMax_Text + (PrnParseConstants.cColSeparatorLen * 2) - 12; } else if (indxInfoType == ToolPrnAnalyse.eInfoType.Statistics) { title = "*** Prn Analysis Statistics ***"; maxLineLen = PrnParseConstants.cRptS_colMax_Seq + PrnParseConstants.cRptS_colMax_Desc + PrnParseConstants.cRptS_colMax_CtP + PrnParseConstants.cRptS_colMax_CtE + PrnParseConstants.cRptS_colMax_CtT + (PrnParseConstants.cColSeparatorLen * 4) - 12; } //----------------------------------------------------------------// // // // Write out the title. // // // //----------------------------------------------------------------// ReportCore.hddrTitle(writer, rptFileFmt, false, title); //----------------------------------------------------------------// // // // Open the table and Write Write out the date, time, input file // // identity and size, and count of report rows. // // // //----------------------------------------------------------------// ReportCore.tableHddrPair(writer, rptFileFmt); ReportCore.tableRowPair(writer, rptFileFmt, "Date_time", DateTime.Now.ToString(), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "Filename", prnFilename, _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "Filesize", fileSize.ToString() + " bytes", _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "Report_size", reportSize + " rows (excluding header and trailer lines)", _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableClose(writer, rptFileFmt); }
//--------------------------------------------------------------------// // M e t h o d // // r e p o r t B o d y M a p // //--------------------------------------------------------------------// // // // Write details of mapping to report file. // // // //--------------------------------------------------------------------// private static void reportBodyMap( ReportCore.eRptFileFmt rptFileFmt, Object writer, UInt16[] symSetMap, UInt16 codeMin, UInt16 codeMax, Boolean flagIgnoreC0, Boolean flagIgnoreC1, Boolean flagMapHex) { const Int32 maxLineLen = 80; // ***************** constant elsewhere ??????????????? const Int32 lcDec = 5; const Int32 lcHex = 4; const Int32 lrDec = 5; const Int32 lrHex = 4; const Int32 colCt = 17; Int32 lcCol, lrHddr; String fmtHddr, fmtVal; Int32 mapIndx, rowIndx; String[] colHddrs = new String [colCt]; String[] colNames = new String [colCt]; Int32[] colSizes = new Int32 [colCt]; Int32 ctItems; ctItems = symSetMap.Length; //----------------------------------------------------------------// // // // Write out the header. // // // //----------------------------------------------------------------// ReportCore.hddrTitle(writer, rptFileFmt, true, "Mapping detail:"); ReportCore.tableHddrPair(writer, rptFileFmt); ReportCore.tableRowPair(writer, rptFileFmt, "Format", (flagMapHex ? "hexadecimal" : "decimal"), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableClose(writer, rptFileFmt); //----------------------------------------------------------------// // // // Open the table and write the column header text. // // // //----------------------------------------------------------------// if (flagMapHex) { lcCol = lcHex; lrHddr = lrHex; fmtHddr = "x4"; fmtVal = "x4"; colSizes[0] = lrHex; colNames[0] = "row"; colHddrs[0] = ""; for (Int32 i = 1; i < colCt; i++) { colSizes[i] = lcHex; colNames[i] = "col" + (i - 1).ToString("D2"); colHddrs[i] = "_" + (i - 1).ToString("x"); } } else { lcCol = lcDec; lrHddr = lrDec; fmtHddr = ""; fmtVal = ""; colSizes[0] = lrDec; colNames[0] = "row"; colHddrs[0] = ""; for (Int32 i = 1; i < colCt; i++) { colSizes[i] = lcDec; colNames[i] = "col" + (i - 1).ToString("D2"); colHddrs[i] = "+" + (i - 1).ToString("d"); } } ReportCore.tableHddrData(writer, rptFileFmt, true, colCt, colHddrs, colSizes); //----------------------------------------------------------------// // // // Write the data rows. // // // //----------------------------------------------------------------// Int32 colCtData = colCt - 1; mapIndx = 0; rowIndx = codeMin / colCtData; for (Int32 i = rowIndx; mapIndx < codeMax; i++) { String[] rowData = new String [colCt]; rowIndx = (i * colCtData); if (flagMapHex) { rowData[0] = (rowIndx.ToString(fmtHddr). Substring(0, 3) + "_"). PadLeft(lrHddr, ' '); } else { rowData[0] = rowIndx.ToString(fmtHddr). PadLeft(lrHddr, ' '); } for (Int32 j = 0; j < colCtData; j++) { String val; mapIndx = rowIndx + j; if ((mapIndx < codeMin) || (mapIndx > codeMax)) { val = " ".PadLeft(lcCol, ' '); } else if ((flagIgnoreC1) && ((mapIndx >= cCodePointC1Min) && (mapIndx <= cCodePointC1Max))) { val = cCodePointUnused. ToString(fmtVal).PadLeft(lcCol, ' '); } else { val = symSetMap[mapIndx]. ToString(fmtVal).PadLeft(lcCol, ' '); } rowData[j + 1] = val; } ReportCore.tableRowText(writer, rptFileFmt, colCt, rowData, colNames, colSizes); } //----------------------------------------------------------------// // // // Write any required end tags. // // // //----------------------------------------------------------------// ReportCore.tableClose(writer, rptFileFmt); }
//--------------------------------------------------------------------// // M e t h o d // // r e p o r t B o d y M a i n // //--------------------------------------------------------------------// // // // Write report header. // // // //--------------------------------------------------------------------// private static void reportBodyMain( ReportCore.eRptFileFmt rptFileFmt, Object writer, // String symSetFilename, UInt16 symSetNo, UInt16 codeMin, UInt16 codeMax, UInt16 codeCt, UInt64 charCollReq, Boolean flagIgnoreC0, Boolean flagIgnoreC1, Boolean flagMapHex, PCLSymSetTypes.eIndex symSetType) { const Int32 maxLineLen = 80; // ***************** constant elsewhere ??????????????? //----------------------------------------------------------------// // // // Write out the title. // // // //----------------------------------------------------------------// ReportCore.hddrTitle(writer, rptFileFmt, true, "Symbol set details:"); //----------------------------------------------------------------// // // // Write out the symbol set basic details. // // // //----------------------------------------------------------------// ReportCore.tableHddrPair(writer, rptFileFmt); ReportCore.tableRowPair(writer, rptFileFmt, "SymSetNo", symSetNo.ToString(), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "SymSetId", PCLSymbolSets.translateKind1ToId(symSetNo).ToString(), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "IgnoreC0Codes", (flagIgnoreC0 ? "true" : "false"), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "IgnoreC1Codes", (flagIgnoreC1 ? "true" : "false"), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "FirstCode", (flagMapHex ? "0x" + codeMin.ToString("x4") : codeMin.ToString()), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "Lastcode", (flagMapHex ? "0x" + codeMax.ToString("x4") : codeMax.ToString()), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "CharCount", (flagMapHex ? "0x" + codeCt.ToString("x4") : codeCt.ToString()), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableRowPair(writer, rptFileFmt, "CharReqBits", "0x" + charCollReq.ToString("x16"), _colSpanNone, _colSpanNone, _maxSizeNameTag, maxLineLen, _flagNone, _flagNone, _flagNone); ReportCore.tableClose(writer, rptFileFmt); }