Check for index in range before selecting range in DataGridView.

Replace {sp} with space when svgText elements are deserialized.
Added error handling for missing genmac macros.
Changed lookup to internal to check for missing genmac macros.
This commit is contained in:
Rich
2011-06-23 21:30:38 +00:00
parent 5a7af006a8
commit 595db08cc7
4 changed files with 10 additions and 4 deletions

View File

@@ -346,11 +346,17 @@ namespace Volian.Svg.Library
}
public partial class SvgUse : SvgPartInheritance
{
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public override void Draw(PdfContentByte cb, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
{
// TODO: Could I use the template
SetupInheritance(myParent.MyInheritedSettings);
mySvg[_UseID].Draw(cb, scale.AdjustOrigin(X, Y), mySvg, this);
if (mySvg.LookUp.ContainsKey(_UseID))
mySvg[_UseID].Draw(cb, scale.AdjustOrigin(X, Y), mySvg, this);
else
{
_MyLog.WarnFormat("Missing Macro '{0}'", _UseID);
}
//cb.AddTemplate(mySvg.GetTemplate(_UseID.Substring(1),cb), scale.X(X), scale.Y(cb, Y));
}
public override void Draw(PdfTemplate tmp, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)