This commit is contained in:
parent
e45eb154ea
commit
d58cbfb089
@ -13,6 +13,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
public class VlnSvgPageHelper:SvgPageHelper
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// This handles Page Breaks within a Step
|
||||
private List<vlnParagraph> _ParaBreaks = new List<vlnParagraph>();
|
||||
public List<vlnParagraph> ParaBreaks
|
||||
@ -350,6 +351,7 @@ namespace Volian.Print.Library
|
||||
private static Regex regexFindToken = new Regex("{[^{}]*}");
|
||||
private string mySvg_ProcessText(object sender, SvgProcessTextArgs args)
|
||||
{
|
||||
if (args.MyText == null) return string.Empty; // KBR needed for WCN crash
|
||||
if (!args.MyText.Contains("{"))
|
||||
return args.MyText;
|
||||
/*
|
||||
@ -408,6 +410,17 @@ namespace Volian.Print.Library
|
||||
private string BuildMyText(VEPROMS.CSLA.Library.FormatInfo activeFormat)
|
||||
{
|
||||
string sGenMac = activeFormat.GenMac;
|
||||
if (sGenMac == null || sGenMac == "")
|
||||
{
|
||||
// If subformat and does not have its own genmac, find an inherited genmac.
|
||||
FormatInfo tmpf = FormatInfo.Get(activeFormat.ParentID);
|
||||
while (tmpf.FormatID!=1 && (sGenMac==null||sGenMac==""))
|
||||
{
|
||||
sGenMac = tmpf.GenMac;
|
||||
tmpf = FormatInfo.Get(tmpf.ParentID);
|
||||
}
|
||||
if (sGenMac == null || sGenMac == "") return "";
|
||||
}
|
||||
if (!sGenMac.Contains("xmlns"))
|
||||
sGenMac = sGenMac.Replace("<svg ", "<svg xmlns='http://www.w3.org/2000/svg' ");
|
||||
XmlDocument xDocGenMac = new XmlDocument();
|
||||
@ -479,7 +492,8 @@ namespace Volian.Print.Library
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, section.DisplayNumber));
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("Token not processed {0}", token);
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token));
|
||||
//_MyLog.InfoFormat("Token not processed {0}", token);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -598,7 +612,7 @@ namespace Volian.Print.Library
|
||||
if (!_MissingTokens.Contains(match.Value))
|
||||
{
|
||||
_MissingTokens.Add(match.Value);
|
||||
Console.WriteLine("\t\t\t\tcase \"{0}\": // Unhandled Token\r\n\t\t\t\t\treturn \"\";", match.Value);
|
||||
_MyLog.InfoFormat("Unhandled token {0}", match.Value);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user