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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user