This commit is contained in:
Kathy Ruffing 2011-07-14 15:55:00 +00:00
parent d9afe189ca
commit bf9743b0c3

View File

@ -52,18 +52,24 @@ namespace DataLoader
string newstptyp = null;
bool ManualPagebreak = false;
char cbittst = StepType.PadRight(2)[0];
byte cbittstb = (byte) StepType.PadRight(2)[0];
//Console.WriteLine(string.Format("AddStep() StepType {0} cbitst = {1} OR'd 0x80 = {2}",StepType,Convert.ToInt16(cbittst),(cbittst & 0x80)));
if (cbittst != ' ' && (cbittst & 0xFF80) > 1)//(cbittst & 0x80) > 1)
{
ManualPagebreak = true;
//if (ci == null) ci = new ConfigInfo(null);
ci.AddItem("Step", "ManualPagebreak", "True");
// conversion from 16bit characters to 32bit strings handles the higher bits differently.
// Thus we cannot do normal 'or'ing/'and'/ing of 0x7f & 0x80 to just get the step
// type without the pagebreak bit. The following two cases 'hardcode' the steptype
// based on that problem.
if ((Convert.ToInt16(cbittst)) == 9508) //page break on HIGH5 step type (40)
newstptyp = "40";
else if ((Convert.ToInt16(cbittst)) == 9618) //page break on LOSS OF AC type
newstptyp = "17";
else
newstptyp = StepType.Substring(1, 1);
}
// Need the content record for the RO & transitions.
//content = Content.MakeContent(null, stptext, 20000 + int.Parse(newstptyp!=null?newstptyp:StepType),null, ManualPagebreak?ci.ToString():null, dts, userid);
// 20000 flags step type item & 1 adjusts for 'base' in format files.
@ -79,6 +85,7 @@ namespace DataLoader
if (tokrt > -1)
{
txtdirty = true;
InvalidROs.Clear();
stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret, ref rotype);
stptext = stptext.TrimEnd(" ".ToCharArray());
// if this is a table RO, then save a flag in the config
@ -88,6 +95,7 @@ namespace DataLoader
if (tokrt > -1)
{
txtdirty = true;
InvalidROs.Clear();
stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret, ref rotype);
stptext = stptext.TrimEnd(" ".ToCharArray());
}
@ -156,7 +164,16 @@ namespace DataLoader
ia.UserID = "Migration";
item.Save();
}
if (InvalidROs.Count > 0)
{
foreach (string str in InvalidROs)
{
ItemAnnotation iaro = item.ItemAnnotations.Add(MigrationErrorType);
iaro.SearchText = str;
iaro.UserID = "Migration";
}
item.Save();
}
if (frType > 0)
{
parentItem.MyContent.ContentParts.Add(frType, item);