This commit is contained in:
		@@ -139,6 +139,22 @@ namespace Volian.Controls.Library
 | 
			
		||||
			TextFont = vFont;
 | 
			
		||||
			StartText = CreateRtf(colorLinks, text, false, false, false, false, false);
 | 
			
		||||
		}
 | 
			
		||||
		public DisplayText(ItemInfo itemInfo, string text, bool colorLinks)
 | 
			
		||||
		{
 | 
			
		||||
			_FieldToEdit = E_FieldToEdit.Text;
 | 
			
		||||
			_MyItemInfo = itemInfo;
 | 
			
		||||
			OriginalText = text;
 | 
			
		||||
			TextFont = itemInfo.GetItemFont();
 | 
			
		||||
			_MyFormat = itemInfo.ActiveFormat;
 | 
			
		||||
 | 
			
		||||
			bool wordsShouldBeReplaced = true;
 | 
			
		||||
			bool numbersShouldBeFormated = !_MyFormat.PlantFormat.FormatData.SectData.StepSectionData.FortranFormatNumbers;
 | 
			
		||||
			int typ = ((int)itemInfo.MyContent.Type) % 10000;
 | 
			
		||||
			bool ROsShouldBeAdjusted = wordsShouldBeReplaced; // same logical value
 | 
			
		||||
 | 
			
		||||
			text = CreateRtf(colorLinks, text, false, wordsShouldBeReplaced, numbersShouldBeFormated, false, ROsShouldBeAdjusted);
 | 
			
		||||
			StartText = text;
 | 
			
		||||
		}
 | 
			
		||||
		private string CreateRtf(bool colorLinks, string text, bool tableShouldBeOutlined, bool wordsShouldBeReplaced, bool numbersShouldBeFormated, bool tableHasBorder, bool ROsShouldBeAdjusted)
 | 
			
		||||
		{
 | 
			
		||||
			// Adjust RO display
 | 
			
		||||
@@ -170,12 +186,15 @@ namespace Volian.Controls.Library
 | 
			
		||||
 | 
			
		||||
			// as a precaution, convert any \~ to \u160?. This is for Hard spaces. see the commentary in the
 | 
			
		||||
			// save portion of this code for an explanation.
 | 
			
		||||
			if (!text.StartsWith(@"{\rtf"))
 | 
			
		||||
			{
 | 
			
		||||
				text = text.Replace(@"\~", @"\u160?");
 | 
			
		||||
				text = text.Replace("\r\n", @"\par ");
 | 
			
		||||
				//if (text.IndexOf(@"\line") > -1)
 | 
			
		||||
				//    MessageBox.Show("Found rtf line");
 | 
			
		||||
				text = text.Replace(@"\line", @"\par");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
				// Now put symbol (for fixed fonts) or unicode font (proportional) around symbols
 | 
			
		||||
				// These fonts are VESymbFix & Arial Unicode MS respectively, and the font table
 | 
			
		||||
				// is actually defined in the StepRTB code.
 | 
			
		||||
@@ -198,6 +217,7 @@ namespace Volian.Controls.Library
 | 
			
		||||
					}
 | 
			
		||||
					indxsym = NextUnicode(text, indxsym + incrindx);//text.IndexOf(@"\u", indxsym + incrindx);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			return text;
 | 
			
		||||
		}
 | 
			
		||||
		private static string DoColorLinks(string text)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user