RO table was failing in DoCOlorLink. This does not fix the problem.
More fixes to support 7LPI when printing grids.
This commit is contained in:
@@ -10,6 +10,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
public class DisplayText
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Properties
|
||||
private E_FieldToEdit _FieldToEdit;
|
||||
public E_FieldToEdit FieldToEdit
|
||||
@@ -222,14 +223,32 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
private static string DoColorLinks(string text)
|
||||
{
|
||||
string origtext = text;
|
||||
text = Regex.Replace(text, @"(<START\](\\[^v \\]+)*\\v0)((?= |\\))", @"$1\cf1");
|
||||
//text = Regex.Replace(text, @"<START]\b0\v0 ", @"<START]\b0\v0\cf1 ");
|
||||
int indxcf = text.IndexOf("cf1");
|
||||
while (indxcf != -1)
|
||||
int indxcf = text.IndexOf(@"\v0\cf1");
|
||||
int indxend = 0;
|
||||
try
|
||||
{
|
||||
int indxend = text.IndexOf(@"\v", indxcf);
|
||||
text = text.Insert(indxend, @"\cf0");
|
||||
indxcf = text.IndexOf(@"cf1", indxend);
|
||||
while (indxcf != -1)
|
||||
{
|
||||
indxcf += 4;
|
||||
indxend = text.IndexOf(@"\v", indxcf);
|
||||
if (indxend > -1)
|
||||
{
|
||||
text = text.Insert(indxend, @"\cf0");
|
||||
indxcf = text.IndexOf(@"\v0\cf1", indxend);
|
||||
}
|
||||
else
|
||||
{
|
||||
indxcf = -1;
|
||||
_MyLog.WarnFormat("DisplayText.DoColorLinks Failed\r\norgitext:'{0}'\r\ntext'{1}'", origtext, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_MyLog.WarnFormat("DisplayText.DoColorLinks Failed\r\norgitext:'{0}'\r\ntext'{1}'", origtext, text);
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
Reference in New Issue
Block a user