Added code to provide information regarding transitions that are being fixed using the Fix Transitions menu item.
Added code to fix transitions that involve Section, SubSections and Steps as part of the path to the transition and how this is rendered in the step's text.
This commit is contained in:
@@ -70,9 +70,16 @@ namespace DataLoader
|
||||
public TimeSpan Process(bool checkRTF)
|
||||
{
|
||||
DateTime tstart = DateTime.Now;
|
||||
ContentInfo.StaticContentInfoChange += new StaticContentInfoEvent(ContentInfo_StaticContentInfoChange);
|
||||
ProcessTransitions(checkRTF);
|
||||
ContentInfo.StaticContentInfoChange -= new StaticContentInfoEvent(ContentInfo_StaticContentInfoChange);
|
||||
return DateTime.Now - tstart;
|
||||
}
|
||||
|
||||
void ContentInfo_StaticContentInfoChange(object sender, StaticContentInfoEventArgs args)
|
||||
{
|
||||
_MyLoader.AddInfo("Fixed Transition for {0}, changed from {1} to {2}", (sender as ContentInfo).ContentID, args.OldValue, args.NewValue);
|
||||
}
|
||||
private void ProcessTransitions(bool checkRTF)
|
||||
{
|
||||
Status = "Getting List...";
|
||||
@@ -102,11 +109,18 @@ namespace DataLoader
|
||||
{
|
||||
try
|
||||
{
|
||||
using (Content c = item.MyContent.Get())
|
||||
{
|
||||
c.FixTransitionText(tran);
|
||||
c.Save();
|
||||
}
|
||||
string oldtext = item.MyContent.Text;
|
||||
item.MyContent.FixTransitionText(tran);
|
||||
string newtext = item.MyContent.Text;
|
||||
if (newtext != oldtext)
|
||||
{
|
||||
using (Content c = item.MyContent.Get())
|
||||
{
|
||||
c.FixTransitionText(tran);
|
||||
c.Save();
|
||||
|
||||
}
|
||||
}
|
||||
if (item.NewTransToUnNumberedItem)
|
||||
{
|
||||
using (Item itm = item.Get())
|
||||
|
Reference in New Issue
Block a user