B2019-144 Set the document text color to Red (overlay) or Black (normal)
This commit is contained in:
parent
7ece7ff5ba
commit
836f143d87
@ -748,9 +748,13 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
public static bool UpdateDocPdf(DocumentInfo mydoc, Color overrideColor, ItemInfo sect)
|
||||
{
|
||||
MSWordToPDF.OverrideColor = overrideColor;
|
||||
//B2019-144 Set the document text color to Red (overlay) or Black (normal)
|
||||
Color lastColor = MSWordToPDF.OverrideColor;// Remember last override color
|
||||
if(MSWordToPDF.OverrideColor != overrideColor) MSWordToPDF.OverrideColor = overrideColor;
|
||||
PdfInfo myPdf = PdfInfo.Get(sect, DocReplace != null);
|
||||
MSWordToPDF.OverrideColor = Color.Black; // B2019-090 reset to black text (when a Complete RO Report was created after printing procedure, X/Y Plot was in red text)
|
||||
//B2019-144 Set the document text color to Red (overlay) or Black (normal)
|
||||
if (MSWordToPDF.OverrideColor != lastColor) MSWordToPDF.OverrideColor = lastColor; // Restore last override color
|
||||
//MSWordToPDF.OverrideColor = Color.Black; // B2019-090 reset to black text (when a Complete RO Report was created after printing procedure, X/Y Plot was in red text)
|
||||
return true;
|
||||
}
|
||||
// B2018-071 Save list of DocIDs for invalid document so that error log messages are not repeated
|
||||
@ -1147,7 +1151,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (Volian.Base.Library.BaselineMetaFile.IsOpen && Volian.Base.Library.BaselineMetaFile.IncludeWordSecText) Volian.Base.Library.BaselineMetaFile.WriteLine("{0}", TextForBaseline.FixText(txtForBaseline, true));
|
||||
//sel.Range.Font.Color = (LBWdColor)WordColor(PrintOverride.OverrideTextColor(System.Drawing.Color.Black));
|
||||
//Console.WriteLine("'{0}' Colors Sel '{1}' Override '{2}' Transparent '{3}' Black '{4}' Red '{5}'", sect.DisplayNumber, sel.Range.Font.Color, OverrideColor, System.Drawing.Color.Transparent, System.Drawing.Color.Black, System.Drawing.Color.Red);
|
||||
if(sel.Range.Font.Color != (LBWdColor)9999999 || OverrideColor == System.Drawing.Color.Red)// B2017-144 If the font color is 9999999 then the color is mixed, and if the override color isn't red, don't change the color.
|
||||
if (sel.Range.Font.Color != (LBWdColor)9999999 || OverrideColor == System.Drawing.Color.Red)// B2017-144 If the font color is 9999999 then the color is mixed, and if the override color isn't red, don't change the color.
|
||||
sel.Range.Font.Color = (LBWdColor)WordColor(OverrideColor == System.Drawing.Color.Transparent ? System.Drawing.Color.Black : OverrideColor);
|
||||
sect.MSWordPageCount = myDoc.Length;
|
||||
fileName = CreatePDF(fileName, openPdf,MSWordToPDF.DebugStatus);
|
||||
|
@ -952,6 +952,10 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
private void btnPrintReport_Click(object sender, EventArgs e)
|
||||
{
|
||||
//B2019-144 Set the document text color to Red (overlay) or Black (normal)
|
||||
Color lastColor = MSWordToPDF.OverrideColor;// B2019-144 Remember override color
|
||||
if (MSWordToPDF.OverrideColor != Color.Black)
|
||||
MSWordToPDF.OverrideColor = Color.Black;
|
||||
Cursor curcur = Cursor;
|
||||
Cursor = Cursors.WaitCursor;
|
||||
if (cbxSummary.Checked) // RO Summary Report
|
||||
@ -994,6 +998,10 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
}
|
||||
Cursor = curcur;
|
||||
//B2019-144 Set the document text color to Red (overlay) or Black (normal)
|
||||
if (MSWordToPDF.OverrideColor != lastColor)// B2019-144 Restore override color
|
||||
MSWordToPDF.OverrideColor = lastColor;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user