diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2004-11-14 19:44:16 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2004-11-14 19:44:16 (GMT) |
commit | 05930245579c006f2b5bfca53e0a1976d682f9b8 (patch) | |
tree | 181f9ebfd0706ecca5898b169bffa8bc4f5486cc /src/htmlhelp.cpp | |
parent | 62d6edc6d0b299e93384e678748b635eb1bfe9b9 (diff) | |
download | Doxygen-05930245579c006f2b5bfca53e0a1976d682f9b8.zip Doxygen-05930245579c006f2b5bfca53e0a1976d682f9b8.tar.gz Doxygen-05930245579c006f2b5bfca53e0a1976d682f9b8.tar.bz2 |
Release-1.3.9.1-20041114
Diffstat (limited to 'src/htmlhelp.cpp')
-rw-r--r-- | src/htmlhelp.cpp | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index a90a919..0d5b9c8 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -174,7 +174,27 @@ void HtmlHelpIndex::writeFields(QTextStream &t) { // finish old list at level 2 if (level2Started) t << " </UL>" << endl; level2Started=FALSE; - + + // <Antony> + // Added this code so that an item with only one subitem is written + // without any subitem. + // For example: + // a1, b1 -> will create only a1, not separate subitem for b1 + // a2, b2 + // a2, b3 + QCString nextLevel1; + IndexField* fnext = ++ifli; + if (fnext) + { + nextLevel1 = fnext->name.left(fnext->name.find('?')); + --ifli; + } + if (level1 != nextLevel1) + { + level2 = ""; + } + // </Antony> + if (level2.isEmpty()) { t << " <LI><OBJECT type=\"text/sitemap\">"; @@ -189,7 +209,9 @@ void HtmlHelpIndex::writeFields(QTextStream &t) if (f->link) { t << " <LI><OBJECT type=\"text/sitemap\">"; - t << "<param name=\"Local\" value=\"" << f->url << Doxygen::htmlFileExtension << "\">"; + t << "<param name=\"Local\" value=\"" << f->url << Doxygen::htmlFileExtension; + if (!f->anchor.isEmpty()) t << "#" << f->anchor; + t << "\">"; t << "<param name=\"Name\" value=\"" << level1 << "\">" "</OBJECT>\n"; } @@ -530,6 +552,6 @@ void HtmlHelp::addIndexItem(const char *level1, const char *level2, const char *ref, const char *anchor) { index->addItem(level1,level2,ref,anchor,TRUE); - index->addItem(level2,level1,ref,anchor,FALSE); + index->addItem(level2,level1,ref,anchor,TRUE); } |