private ArrayList SaveHtmlTopics()
{
ArrayList topics = new ArrayList();
for (int sectionIdx = 0; sectionIdx < mDoc.Sections.Count; sectionIdx++)
{
Section section = mDoc.Sections[sectionIdx];
string paraText = section.Body.FirstParagraph.GetText();
// The text of the heading paragaph is used to generate the HTML file name.
string fileName = MakeTopicFileName(paraText);
if (fileName == "")
fileName = "UNTITLED SECTION " + sectionIdx;
fileName = Path.Combine(mDstDir, fileName + ".html");
// The text of the heading paragraph is also used to generate the title for the TOC.
string title = MakeTopicTitle(paraText);
if (title == "")
title = "UNTITLED SECTION " + sectionIdx;
Topic topic = new Topic(title, fileName);
topics.Add(topic);
SaveHtmlTopic(section, topic);
}
return topics;
}