C2026-041-invisible-position-changes-as-differences #807
No files matched your search
@@ -712,7 +712,16 @@ namespace Baseline
|
||||
// Perform code to find DebugMeta files with diffences
|
||||
if (cbUseTruncatedData.Checked)
|
||||
{
|
||||
fnd = new FindFiles(cbFile1.Text, cbFile2.Text, "DebugMeta_Truncate.txt", MyIgnore);
|
||||
string filename;
|
||||
if (File.Exists(cbFile1.Text + "\\VEPROMS_BGE\\DebugMeta_Truncate.txt"))
|
||||
{
|
||||
filename = "DebugMeta_Truncate.txt";
|
||||
}
|
||||
else
|
||||
{
|
||||
filename = "DebugMeta.txt";
|
||||
}
|
||||
fnd = new FindFiles(cbFile1.Text, cbFile2.Text, filename, MyIgnore);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -743,7 +752,16 @@ namespace Baseline
|
||||
//Perform Search
|
||||
if (cbUseTruncatedData.Checked)
|
||||
{
|
||||
fnd = new FindFiles(cbFile1.Text, cbFile2.Text, "DebugMeta_Truncate.txt", tbSearch.Text, SearchType.Contains, cbCaseSensitive.Checked);
|
||||
string filename;
|
||||
if (File.Exists(cbFile1.Text + "\\VEPROMS_BGE\\DebugMeta_Truncate.txt"))
|
||||
{
|
||||
filename = "DebugMeta_Truncate.txt";
|
||||
}
|
||||
else
|
||||
{
|
||||
filename = "DebugMeta.txt";
|
||||
}
|
||||
fnd = new FindFiles(cbFile1.Text, cbFile2.Text, filename, tbSearch.Text, SearchType.Contains, cbCaseSensitive.Checked);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using DevComponents.DotNetBar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Volian.Base.Library
|
||||
{
|
||||
@@ -155,65 +155,58 @@ namespace Volian.Base.Library
|
||||
_MyDebugPrint_Truncated.Open(fileName.Replace(".txt", "_Truncated.txt"));
|
||||
}
|
||||
public static void Close()
|
||||
{ _MyDebugPrint.Close();
|
||||
_MyDebugPrint_Truncated.Close(); }
|
||||
{
|
||||
_MyDebugPrint.Close();
|
||||
_MyDebugPrint_Truncated.Close();
|
||||
}
|
||||
public static void Write(string format, params object[] args)
|
||||
|
mschill marked this conversation as resolved
|
||||
{
|
||||
if (args[args.GetUpperBound(0)] == "truncate_false" || args[args.GetUpperBound(0)] == "truncate_true") // if there is a 9th element test the value for truncated data.
|
||||
{
|
||||
// test and save untruncated and truncated version of the data.
|
||||
if (args[args.GetUpperBound(0)] == "truncate_false")// when untruncated data is being saved
|
||||
{
|
||||
_MyDebugPrint.Write(format, args);
|
||||
}
|
||||
else // when truncated data is being saved
|
||||
{
|
||||
_MyDebugPrint_Truncated.Write(format, args);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_MyDebugPrint_Truncated.Write(format, args);
|
||||
_MyDebugPrint.Write(format, args); // there is a 9th element, but not for truncated data
|
||||
|
||||
}
|
||||
}
|
||||
public static void WriteLine(string format, params object[] args)
|
||||
if (args.GetUpperBound(0) != -1) // are there arguments?
|
||||
{
|
||||
if(args.Length > 8)
|
||||
if (args[args.GetUpperBound(0)] == "truncate_false") // if there is a 9th element test the value for truncated data.
|
||||
{
|
||||
if (args[8] == "truncate_false" || args[8] == "truncate_true") // if there is a 9th element test the value for truncated data.
|
||||
{
|
||||
// test and save untruncated and truncated version of the data.
|
||||
if (args[8] == "truncate_false")// when untruncated data is being saved
|
||||
{
|
||||
_MyDebugPrint.WriteLine(format, args);
|
||||
}
|
||||
else // when truncated data is being saved
|
||||
{
|
||||
_MyDebugPrint_Truncated.WriteLine(format, args);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_MyDebugPrint.WriteLine(format, args); // there is a 9th element, but not for truncated data
|
||||
_MyDebugPrint_Truncated.WriteLine(format, args);
|
||||
}
|
||||
_MyDebugPrint.Write(format, args); // only save to DebugMeta.txt if there is different truncate data.
|
||||
}
|
||||
else // test if asgs does not have a 9th element save data (no truncate data is available)
|
||||
else
|
||||
{
|
||||
_MyDebugPrint.WriteLine(format, args);
|
||||
_MyDebugPrint_Truncated.WriteLine(format, args);
|
||||
_MyDebugPrint_Truncated.Write(format, args); // Save to both files if there is no special truncate data.
|
||||
_MyDebugPrint.Write(format, args);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
_MyDebugPrint_Truncated.Write(format, args);
|
||||
_MyDebugPrint.Write(format, args);
|
||||
}
|
||||
}
|
||||
public static void WriteLine(string format, params object[] args)
|
||||
{
|
||||
if (args.GetUpperBound(0) != -1) // are there arguments?
|
||||
{
|
||||
if (args[args.GetUpperBound(0)] == "truncate_false") // if there is a 9th element test the value for truncated data.
|
||||
{
|
||||
_MyDebugPrint.WriteLine(format, args); // only save to DebugMeta.txt if there is different truncate data.
|
||||
}
|
||||
else
|
||||
{
|
||||
_MyDebugPrint_Truncated.WriteLine(format, args); // Save to both files if there is no special truncate data.
|
||||
_MyDebugPrint.WriteLine(format, args);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_MyDebugPrint_Truncated.WriteLine(format, args);
|
||||
_MyDebugPrint.WriteLine(format, args);
|
||||
}
|
||||
}
|
||||
public static void TruncateWriteLine(string format, params object[] args)
|
||||
{
|
||||
_MyDebugPrint_Truncated.WriteLine(format, args);
|
||||
|
||||
}
|
||||
public static void TruncateWrite(string format, params object[] args)
|
||||
{
|
||||
_MyDebugPrint_Truncated.Write(format, args);
|
||||
_MyDebugPrint_Truncated.Write(format, args); // SaveFileDialog special truncate data
|
||||
}
|
||||
public static void Show()
|
||||
{ _MyDebugPrint.Show();
|
||||
|
||||
@@ -1421,7 +1421,7 @@ namespace Volian.Print.Library
|
||||
|
||||
|
mschill marked this conversation as resolved
mschill
commented
Suggest to add a program switch to generate (at the same time - in a separate file) a DebugMeta as it was along with the new DebugMeta. That way one run of printing can generate both. The next time baselines are run, the Baseline.exe program can compare the older run - there really should not be any differences. If all good that we can move forward with using the new version of the DebugMeta file. Otherwise comparing the new DebugMeta would generate even more false - differences. Having a program switch to also generate the old style DebugMeta would keep Baseline testing backward compatible, should we find a need in the future. 1. Per John's email:
Suggest to add a program switch to generate (at the same time - in a separate file) a DebugMeta as it was along with the new DebugMeta.
That way one run of printing can generate both. The next time baselines are run, the Baseline.exe program can compare the older run - there really should not be any differences. If all good that we can move forward with using the new version of the DebugMeta file.
Otherwise comparing the new DebugMeta would generate even more false - differences.
Having a program switch to also generate the old style DebugMeta would keep Baseline testing backward compatible, should we find a need in the future.
plarsen
commented
For the program switch are you referring to the new checkbox in the baseline program or a PROMS switch? I added the new checkbox to baseline. For the program switch are you referring to the new checkbox in the baseline program or a PROMS switch? I added the new checkbox to baseline.
mschill
commented
this is an old item from a week or two ago. outstanding items include: 1 performance item --- passing strings and if statements added to BaselineMetaFile.WriteLine this is an old item from a week or two ago.
outstanding items include:
1 performance item --- passing strings and if statements added to BaselineMetaFile.WriteLine
1 cleanup unnecessary usings
1 change to finding debug file ---- should check inside findfiles on an individual file basis whether to use truncated or not. also, should not concatinate strings --- should use path.combine or interpolated strings
|
||||
Volian.Base.Library.BaselineMetaFile.WriteLine("WD Height={0} Width={1} scPgCnt={2} locEnd={3} pdfSz={4} xOff={5} yOff={6} ScPgNum {7}", fgPage.Height, fgPage.Width, sectPageCount, locEndOfWordDoc, pdfSize, (float)(mySection.MyDocStyle.Layout.MSWordXAdj ?? 0.0), (float)(mySection.MyDocStyle.Layout.MSWordYAdj ?? 0.0) + yoff, pageNumber, "truncate_false");
|
||||
|
||||
Volian.Base.Library.BaselineMetaFile.TruncateWriteLine("WD Height={0} Width={1} scPgCnt={2} locEnd={3} pdfSz={4} xOff={5} yOff={6} ScPgNum {7}", fgPage.Height, fgPage.Width, sectPageCount, Truncate(locEndOfWordDoc, 2), Truncate(pdfSize, 2), (float)(mySection.MyDocStyle.Layout.MSWordXAdj ?? 0.0), (float)(mySection.MyDocStyle.Layout.MSWordYAdj ?? 0.0) + yoff, pageNumber, "truncate_true");
|
||||
Volian.Base.Library.BaselineMetaFile.TruncateWriteLine("WD Height={0} Width={1} scPgCnt={2} locEnd={3} pdfSz={4} xOff={5} yOff={6} ScPgNum {7}", fgPage.Height, fgPage.Width, sectPageCount, Truncate(locEndOfWordDoc, 2), Truncate(pdfSize, 2), (float)(mySection.MyDocStyle.Layout.MSWordXAdj ?? 0.0), (float)(mySection.MyDocStyle.Layout.MSWordYAdj ?? 0.0) + yoff, pageNumber);
|
||||
|
||||
AddImportedPageToLayer(cb.PdfWriter.DirectContent, _MSWordLayer, fgPage, (float)(mySection.MyDocStyle.Layout.MSWordXAdj ?? 0), (float)(mySection.MyDocStyle.Layout.MSWordYAdj ?? 0) + yoff);
|
||||
// B2019-102 Handle PDF Destinations for Word Sections
|
||||
|
||||
Write should be removed - it is not called from anywhere.