From e9cce23bf1149b7603aea52f8920f305037aba9d Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 16 Jan 2014 12:06:08 +0000 Subject: [PATCH] Support centering of section title as defined in format files --- PROMS/Volian.Print.Library/vlnParagraph.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index f3c4c6fe..6bff89d6 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2649,6 +2649,12 @@ namespace Volian.Print.Library XOffset -= xMetaAdj; } } + else if (formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Just == "PSCenter") + { + float hdrWidth = itemInfo.MyContent.Text.Length * 6; + float ctr = (((float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin)) / 2; + XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + ctr - (hdrWidth / 2); + } return; } int typ = ((int)itemInfo.MyContent.Type) % 10000;