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