This commit is contained in:
John Jenko 2011-03-10 13:30:13 +00:00
parent 579f1c9af5
commit a67f3dc6c7
2 changed files with 11 additions and 8 deletions

View File

@ -25,7 +25,7 @@ namespace DataLoader
{ {
public partial class Loader public partial class Loader
{ {
private string MigrateRos(OleDbConnection cn, string textm, string seqcvt, Content content, DocVersion docver, bool conv_caret) private string MigrateRos(OleDbConnection cn, string textm, string seqcvt, Content content, DocVersion docver, bool conv_caret,ref int rotype)
{ {
StringBuilder rotxt = new StringBuilder(); StringBuilder rotxt = new StringBuilder();
int instance = 0; int instance = 0;
@ -73,6 +73,8 @@ namespace DataLoader
try try
{ {
string rov = rofstinfo.ROFSTLookup.GetRoValue(ROID.ToUpper()); string rov = rofstinfo.ROFSTLookup.GetRoValue(ROID.ToUpper());
ROFSTLookup.rochild myro = rofstinfo.ROFSTLookup.GetRoChild12(ROID.ToUpper());
rotype = Math.Max(rotype, myro.type);
//jsj string rov = TextConvert.ConvertText(rofstinfo.ROFSTLookup.GetRoValue(ROID.Substring(0, 12).ToUpper())); //jsj string rov = TextConvert.ConvertText(rofstinfo.ROFSTLookup.GetRoValue(ROID.Substring(0, 12).ToUpper()));
//string results = string.Format(@"{0}{1}\v #Link:ReferencedObject:{2} {3} {4}\v0", //string results = string.Format(@"{0}{1}\v #Link:ReferencedObject:{2} {3} {4}\v0",
// '\x15', rofstinfo.ROFSTLookup.GetRoValue(ROID.Substring(0, 12).ToUpper()), ro.ROUsageID, ROID, rodb.RODbID); // '\x15', rofstinfo.ROFSTLookup.GetRoValue(ROID.Substring(0, 12).ToUpper()), ro.ROUsageID, ROID, rodb.RODbID);

View File

@ -46,7 +46,7 @@ namespace DataLoader
stptext = TextConvert.ConvertText(Textm, conv_caret); stptext = TextConvert.ConvertText(Textm, conv_caret);
else else
stptext = TextConvert.ConvertText(Textm.Substring(0, tok), conv_caret); stptext = TextConvert.ConvertText(Textm.Substring(0, tok), conv_caret);
//string stpTextOrg = stptext;
string seqcvt = TextConvert.ConvertSeq(stpseq); string seqcvt = TextConvert.ConvertSeq(stpseq);
string newstptyp = null; string newstptyp = null;
@ -74,20 +74,21 @@ namespace DataLoader
// Before we save it, handle RO & Transitions tokens. // Before we save it, handle RO & Transitions tokens.
int tokrt = Textm.IndexOf('\x15'); int tokrt = Textm.IndexOf('\x15');
bool txtdirty = false; bool txtdirty = false;
bool bIsROTable = false; bool isROTable = false;
int rotype = 0;
if (tokrt > -1) if (tokrt > -1)
{ {
txtdirty = true; txtdirty = true;
stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret); stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret, ref rotype);
stptext = stptext.TrimEnd(" ".ToCharArray()); stptext = stptext.TrimEnd(" ".ToCharArray());
// if this is a table RO, then save a flag in the config // if this is a table RO, then save a flag in the config
bIsROTable = (Textm.Length == 1); isROTable = (rotype == 2);
} }
tokrt = Textm.IndexOf('\x3a6'); tokrt = Textm.IndexOf('\x3a6');
if (tokrt > -1) if (tokrt > -1)
{ {
txtdirty = true; txtdirty = true;
stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret); stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret, ref rotype);
stptext = stptext.TrimEnd(" ".ToCharArray()); stptext = stptext.TrimEnd(" ".ToCharArray());
} }
@ -108,7 +109,7 @@ namespace DataLoader
//string fixStpText = FixStepText(stptext,content.Type); //string fixStpText = FixStepText(stptext,content.Type);
string fixStpText = ""; string fixStpText = "";
if (IsATable(content.Type)) if (IsATable(content.Type))
fixStpText = ConvertTableToGrid(stptext, content, fmt, bIsROTable); fixStpText = ConvertTableToGrid(stptext, content, fmt, isROTable);
else else
fixStpText = FixStepText(stptext); fixStpText = FixStepText(stptext);
if (fixStpText != stptext) if (fixStpText != stptext)