Added Headings to clipboard for PROMS QA process

Limit Word-Wrap fix to paragraphs that have Prestige Elite Tall font
This commit is contained in:
Rich 2012-05-29 10:42:33 +00:00
parent 3f113dc9c5
commit 604c39a5c0
3 changed files with 22 additions and 11 deletions

View File

@ -451,6 +451,10 @@ namespace Sync
}
try
{
sb.Append("\r\nInternal Release:\r\n");
sb.Append("\r\nExternal Release:\r\n");
sb.Append("\r\nTesting Performed:\r\n");
sb.Append("\r\nTesting Requirements:\r\n");
Clipboard.Clear();
Clipboard.SetText(sb.ToString());
MessageBox.Show(sb.ToString(), "Copied to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);

View File

@ -171,8 +171,8 @@ namespace Volian.Print.Library
}
myparagraph.Alignment = MessageAlignment;
myparagraph.Leading = iFont.Size;
float w = vlnPrintObject.GetTableWidth(cb, myparagraph, MyParent.MyItemInfo.MyDocStyle.Layout.PageWidth);
float h = vlnPrintObject.GetParagraphHeight(cb, myparagraph, w);
float w = GetTableWidth(cb, myparagraph, MyParent.MyItemInfo.MyDocStyle.Layout.PageWidth);
float h = GetParagraphHeight(cb, myparagraph, w);
cb.SetColorFill(changeBarColor);
Rtf2Pdf.TextAt(cb, myparagraph, XOffset + xAdj - Rtf2Pdf.Offset.X + 3, yBottom + h - Rtf2Pdf.Offset.Y + 2.7F, w, h, "", yBottomMargin);
lastMsg = vcbm.Message;

View File

@ -107,23 +107,30 @@ namespace Volian.Print.Library
}
set { _Height = value; }
}
public static float GetParagraphHeight(PdfContentByte cb, Paragraph iParagraph, float width)
public float GetParagraphHeight(PdfContentByte cb, Paragraph iParagraph, float width)
{
return GetParagraphHeight(cb, iParagraph, width, true);
}
public static float GetParagraphHeight(PdfContentByte cb, Paragraph iParagraph, float width, bool throwException)
public float GetParagraphHeight(PdfContentByte cb, Paragraph iParagraph, float width, bool throwException)
{
VlnSvgPageHelper ph = null;
if(cb != null) ph = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
float heightAll = GetHeight(cb, iParagraph, width, throwException);
if (ph != null && ph.MyPromsPrinter.DebugOutput)
{
Chunk chk = RemoveLastCharacter(iParagraph);
float heightAllButOne = GetHeight(cb, iParagraph, width, throwException);
if (heightAll != heightAllButOne)
return heightAllButOne;
if (chk != null)
RestoreLastCharacter(iParagraph, chk);
vlnParagraph myParagraph = this as vlnParagraph;
if (myParagraph != null)
{
if (myParagraph.MyItemInfo.FormatStepData.Font.Family == "Prestige Elite Tall")
{
Chunk chk = RemoveLastCharacter(iParagraph);
float heightAllButOne = GetHeight(cb, iParagraph, width, throwException);
if (heightAll != heightAllButOne)
return heightAllButOne;
if (chk != null)
RestoreLastCharacter(iParagraph, chk);
}
}
}
return heightAll;
}
@ -158,7 +165,7 @@ namespace Volian.Print.Library
Console.WriteLine("Paragraph longer than a page");
return 792F - myColumnText.YLine; // This gives the height of the Paragraph
}
public static float GetTableWidth(PdfContentByte cb, Paragraph iParagraph, float? maxWidth)
public float GetTableWidth(PdfContentByte cb, Paragraph iParagraph, float? maxWidth)
{
int iWidth = (int)(maxWidth ?? 72 * 8.5F);
float h = GetParagraphHeight(cb, iParagraph, iWidth);