This commit is contained in:
parent
161bb92059
commit
f1d48204c6
@ -569,6 +569,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
//rtnstr = rtnstr.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
|
||||
rtnstr = ProcessMacros(rtnstr);
|
||||
return rtnstr;
|
||||
}
|
||||
|
||||
//
|
||||
// Takes the ro text value and sees if a macro has been used. If so it will perform the macro
|
||||
// operation on the substring in the text value
|
||||
//
|
||||
// right now the only macro is @HSP(), where every space between the "(" and ")" will be replaced with a hardspace
|
||||
//
|
||||
private string ProcessMacros(string str)
|
||||
{
|
||||
if( str == null || str == "" ) return str;
|
||||
string rtnstr = str;
|
||||
int indx = -1;
|
||||
while ((indx = rtnstr.ToUpper().IndexOf("@HSP("))>-1)
|
||||
{
|
||||
string resstr = rtnstr.Substring(0,indx);
|
||||
int endHsp = rtnstr.IndexOf(")",indx);
|
||||
string tmpstr = rtnstr.Substring(indx+5,endHsp-indx-5);
|
||||
tmpstr = tmpstr.Replace(" ", @"\u160?");
|
||||
resstr = resstr + tmpstr;
|
||||
rtnstr = resstr + rtnstr.Substring(endHsp+1);
|
||||
}
|
||||
return rtnstr;
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,8 @@ namespace VEPROMS.CSLA.Library
|
||||
SectionInfo sectionInfo = SectionInfo.Get(_Section.ItemID);
|
||||
return sectionInfo.LocalFormat;
|
||||
}
|
||||
return _SectionInfo.LocalFormat;
|
||||
if (_SectionInfo != null)return _SectionInfo.LocalFormat;
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user