This commit is contained in:
Kathy Ruffing 2010-10-07 12:22:37 +00:00
parent 3fb96a9477
commit 3560fad9ea

View File

@ -79,10 +79,8 @@ namespace DataLoader
{
Status = string.Format("Processing {0} of {1} steps", ++i, myList.Count);
MyStepRTB.ViewRTB = false;
//string originalText = item.MyContent.Text;
string originalText = item.MyContent.Text;
string updatedText = item.MyContent.Text;
//if (item.ItemID == 1850)
// Console.WriteLine("HERE");
if (item.ItemDocVersionCount != 0 || item.MyPrevious != null || item.MyParent != null)
{
if (item.MyContent.ContentTransitionCount > 0)
@ -100,18 +98,18 @@ namespace DataLoader
}
}
}
if (updatedText.EndsWith(" ")) updatedText = updatedText.Substring(0, updatedText.Length - 1);
using (Content c = item.MyContent.Get())
{
c.Text = updatedText;
c.Save();
}
//MyStepRTB.MyItemInfo = item;
//MyStepRTB.SaveText();
//string afterText = item.MyContent.Text;
//updatedText = updatedText.Replace(@"\u160?", @"\'a0");
MyStepRTB.MyItemInfo = item;
MyStepRTB.SaveText();
string afterText = item.MyContent.Text;
// aftertext is 'newrtf'
//if (updatedText != afterText)//|| newStripped != afterText)
// myProblems.RTBProblems.Add(item.ItemID, item.MyContent.ContentID, originalText, updatedText, MyStepRTB.Rtf, afterText, item.Path);
if (afterText != updatedText)
myProblems.RTBProblems.Add(item.ItemID, item.MyContent.ContentID, originalText, updatedText, MyStepRTB.Rtf, afterText, item.Path);
}
//#if DEBUG
else if (VlnSettings.DebugMode)
@ -123,7 +121,7 @@ namespace DataLoader
//Status = "Saving problems";
//ErrorCount = myProblems.RTBProblems.Count;
////myProblems.Save(@"C:\temp\RTBProblems.xml");
//myProblems.Save(_LogPath + @"\RTBProblems.xml");
myProblems.Save(_LogPath + @"\RTBProblems.xml");
Status = "Done comparing";
}