default to the DocStyle font (if needed) for PageStyles (pagelist)
This commit is contained in:
parent
f41b211187
commit
b7270782e6
@ -80,6 +80,17 @@ namespace VEPROMS.CSLA.Library
|
||||
// RHM 2008-12-15 - Added logic to keep looking if a blank attribute is found
|
||||
while (xn == null || (xn is XmlAttribute && (xn as XmlAttribute).Value == ""))//Walk-up the format tree to find a font node
|
||||
{
|
||||
// if the font is not specified in the PageStyle (PageList), then see if oneis set in the DocStyle (default for that section)
|
||||
//
|
||||
if (xmlNode.Name == "PageStyle")
|
||||
{
|
||||
string psIdx = (xmlNode.Attributes.GetNamedItem("Index") as XmlAttribute).Value;
|
||||
XmlNode docStyle = xmlNode.OwnerDocument.SelectSingleNode(string.Format("//DocStyle[@PageStyle='{0}']",psIdx));
|
||||
xn = docStyle.SelectSingleNode(path);
|
||||
if (xn != null) return xn;
|
||||
// could not find a font in the DocStyle, so use the format default
|
||||
return LookupSingleNode(tmpNode.OwnerDocument.DocumentElement, "/PlantFormat/FormatData/" + path);
|
||||
}
|
||||
if (xmlNode.NodeType == XmlNodeType.Document)
|
||||
{
|
||||
//if (path.Contains("Font")) Console.WriteLine("vlnFormatDocument.LookupSingleFontNode {0},{1}", tmpNode.Name == "Step" ? "Step." + tmpNode.Attributes["Type"].Value : tmpNode.Name, path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user