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:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user