Only convert Page and Document formats is the related Format file exists.

Skip commented lines in INI file.
Remove inline comments before processing INI file.
Use more explicit comparisons to determine type of command.
Replace spaces with {sp}.
This commit is contained in:
Rich
2011-06-23 21:29:00 +00:00
parent a9d012651a
commit 5a7af006a8
3 changed files with 49 additions and 24 deletions

View File

@@ -488,20 +488,22 @@ namespace fmtxml
try
{
// get the default base & plant files to use when figuring out inheritance.
GetPlantBaseDefaultFonts();
if (GetPlantBaseDefaultFonts())
{
// will have entire name, such as aep.x01 - use number to differentiate it.
int indx = nm.IndexOf('.');
if (indx > 0)
{
LoadPageFile(nm);
LoadDocFile(nm);
}
else
{
LoadPageFile(nm + ".pag");
LoadDocFile(nm + ".doc");
}
// will have entire name, such as aep.x01 - use number to differentiate it.
int indx = nm.IndexOf('.');
if (indx > 0)
{
LoadPageFile(nm);
LoadDocFile(nm);
}
else
{
LoadPageFile(nm + ".pag");
LoadDocFile(nm + ".doc");
}
}
}
catch (Exception ex)
{
@@ -1144,7 +1146,9 @@ namespace fmtxml
int indx = fmtName.IndexOf('.');
if (indx > 0)
lfmtName = fmtName.Substring(0, fmtName.Length - 4) + "_" + fmtName.Substring(fmtName.Length - 2, 2);
xdoc.Load("fmt_xml\\" + lfmtName + "f.xml");
string fName = "fmt_xml\\" + lfmtName + "f.xml";
if (!File.Exists(fName)) return false;
xdoc.Load(fName);
xfont = xdoc.SelectSingleNode("FormatData/Font");
if (xfont!=null)DefPlantFont = new VE_Font(xfont);
}