summaryrefslogtreecommitdiffstats
path: root/src/xmlgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-02-16 21:34:46 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-02-21 20:07:13 (GMT)
commit1a56a39b4a97452a5c7c2d8e9d39ab28ca33dff0 (patch)
tree6fffef6f3e26de59a3252bcdb6890cf5b50fb887 /src/xmlgen.cpp
parent77d5346f4866429b240b96a146381e770e5e0788 (diff)
downloadDoxygen-1a56a39b4a97452a5c7c2d8e9d39ab28ca33dff0.zip
Doxygen-1a56a39b4a97452a5c7c2d8e9d39ab28ca33dff0.tar.gz
Doxygen-1a56a39b4a97452a5c7c2d8e9d39ab28ca33dff0.tar.bz2
Restructure section handling
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r--src/xmlgen.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index bf5af84..7a72346 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1823,32 +1823,30 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
}
else
{
- SectionInfo *si = Doxygen::sectionDict->find(pd->name());
+ const SectionInfo *si = SectionManager::instance().find(pd->name());
if (si)
{
- t << " <title>" << convertToXML(convertCharEntitiesToUTF8(filterTitle(si->title)))
+ t << " <title>" << convertToXML(convertCharEntitiesToUTF8(filterTitle(si->title())))
<< "</title>" << endl;
}
}
writeInnerPages(pd->getSubPages(),t);
- SectionDict *sectionDict = pd->getSectionDict();
- if (pd->localToc().isXmlEnabled() && sectionDict)
+ const SectionRefs &sectionRefs = pd->getSectionRefs();
+ if (pd->localToc().isXmlEnabled() && !sectionRefs.empty())
{
t << " <tableofcontents>" << endl;
- SDict<SectionInfo>::Iterator li(*sectionDict);
- SectionInfo *si;
+ //SDict<SectionInfo>::Iterator li(*sectionDict);
+ //SectionInfo *si;
int level=1,l;
bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE };
int maxLevel = pd->localToc().xmlLevel();
- for (li.toFirst();(si=li.current());++li)
+ //for (li.toFirst();(si=li.current());++li)
+ for (const SectionInfo *si : sectionRefs)
{
- if (si->type==SectionInfo::Section ||
- si->type==SectionInfo::Subsection ||
- si->type==SectionInfo::Subsubsection ||
- si->type==SectionInfo::Paragraph)
+ if (isSection(si->type()))
{
//printf(" level=%d title=%s\n",level,si->title.data());
- int nextLevel = (int)si->type;
+ int nextLevel = (int)si->type();
if (nextLevel>level)
{
for (l=level;l<nextLevel;l++)
@@ -1868,10 +1866,10 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
if (nextLevel <= maxLevel)
{
if (inLi[nextLevel]) t << " </tocsect>" << endl;
- QCString titleDoc = convertToXML(si->title);
+ QCString titleDoc = convertToXML(si->title());
t << " <tocsect>" << endl;
- t << " <name>" << (si->title.isEmpty()?si->label:titleDoc) << "</name>" << endl;
- t << " <reference>" << convertToXML(pageName) << "_1" << convertToXML(si -> label) << "</reference>" << endl;
+ t << " <name>" << (si->title().isEmpty()?si->label():titleDoc) << "</name>" << endl;
+ t << " <reference>" << convertToXML(pageName) << "_1" << convertToXML(si->label()) << "</reference>" << endl;
inLi[nextLevel]=TRUE;
level = nextLevel;
}