F2017-039: Supplemental information title printing if section’s font is null.
F2017-039: SAMG Supplemental information and associated Facing page printing support
This commit is contained in:
parent
2aa7db1c76
commit
c630da8c92
Binary file not shown.
@ -2298,7 +2298,10 @@ namespace Volian.Print.Library
|
|||||||
float ctrs = ((float)MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyItemInfo.MyDocStyle.Layout.LeftMargin) / 2;
|
float ctrs = ((float)MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyItemInfo.MyDocStyle.Layout.LeftMargin) / 2;
|
||||||
float sctcntrXs = (float)MyItemInfo.MyDocStyle.Layout.LeftMargin + ctrs - (scttopWidths / 2);
|
float sctcntrXs = (float)MyItemInfo.MyDocStyle.Layout.LeftMargin + ctrs - (scttopWidths / 2);
|
||||||
VE_Font vf = MyItemInfo.MyDocStyle.Font;
|
VE_Font vf = MyItemInfo.MyDocStyle.Font;
|
||||||
E_Style sty = (E_Style)(vf.Style | E_Style.Underline);
|
// F2017-039: The following null check was added in case the format's doc style does not have a font defined:
|
||||||
|
if (vf == null || vf.Style == null || vf.Family == null || vf.Size == null || vf.CPI == null) vf = MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font;
|
||||||
|
E_Style sty = E_Style.Underline;
|
||||||
|
if (vf != null && vf.Style != null) sty = (E_Style)(vf.Style | E_Style.Underline);
|
||||||
vf = new VE_Font(vf.Family, (int)vf.Size, sty, (float)vf.CPI);
|
vf = new VE_Font(vf.Family, (int)vf.Size, sty, (float)vf.CPI);
|
||||||
MyPageHelper.TopMessage = new vlnText(cb, this, "Supplemental Information", "Supplemental Information", sctcntrXs, yTopMargin + 0.1F, vf);
|
MyPageHelper.TopMessage = new vlnText(cb, this, "Supplemental Information", "Supplemental Information", sctcntrXs, yTopMargin + 0.1F, vf);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user