diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-12-26 15:59:17 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-12-26 15:59:17 (GMT) |
commit | 48f4de5c47d55b6622b6fdc9b5c288e19d5692f9 (patch) | |
tree | 629c4681a5158d26512b815623754b33165d8d23 /src/eclipsehelp.cpp | |
parent | fee4053bd3dd075a2dd2cba4da8166ec5307eadd (diff) | |
download | Doxygen-48f4de5c47d55b6622b6fdc9b5c288e19d5692f9.zip Doxygen-48f4de5c47d55b6622b6fdc9b5c288e19d5692f9.tar.gz Doxygen-48f4de5c47d55b6622b6fdc9b5c288e19d5692f9.tar.bz2 |
Release-1.8.3
Diffstat (limited to 'src/eclipsehelp.cpp')
-rw-r--r-- | src/eclipsehelp.cpp | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp index da9f13b..df65a13 100644 --- a/src/eclipsehelp.cpp +++ b/src/eclipsehelp.cpp @@ -19,7 +19,7 @@ #include "doxygen.h" #include <qfile.h> -EclipseHelp::EclipseHelp() : m_depth(0), m_endtag(FALSE), m_tocfile(0) +EclipseHelp::EclipseHelp() : m_depth(0), m_endtag(FALSE), m_openTags(0), m_tocfile(0) { } @@ -51,6 +51,7 @@ void EclipseHelp::openedTag() { m_tocstream << ">" << endl; m_endtag = FALSE; + ++m_openTags; } } @@ -144,8 +145,13 @@ void EclipseHelp::decContentsDepth() // -- end of the opened topic closedTag(); --m_depth; - indent(); - m_tocstream << "</topic>" << endl; + + if (m_openTags==m_depth) + { + --m_openTags; + indent(); + m_tocstream << "</topic>" << endl; + } } /*! @@ -172,19 +178,41 @@ void EclipseHelp::addContentsItem( { // -- write the topic tag closedTag(); - indent(); - m_tocstream << "<topic label=\"" << convertToXML(name) << "\""; if (file) { - m_tocstream << " href=\"" << convertToXML(m_pathprefix) - << file << Doxygen::htmlFileExtension; - if (anchor) + switch (file[0]) // check for special markers (user defined URLs) { - m_tocstream << "#" << anchor; + case '^': + // URL not supported by eclipse toc.xml + break; + + case '!': + indent(); + m_tocstream << "<topic label=\"" << convertToXML(name) << "\""; + m_tocstream << " href=\"" << convertToXML(m_pathprefix) << &file[1] << "\""; + m_endtag = TRUE; + break; + + default: + indent(); + m_tocstream << "<topic label=\"" << convertToXML(name) << "\""; + m_tocstream << " href=\"" << convertToXML(m_pathprefix) + << file << Doxygen::htmlFileExtension; + if (anchor) + { + m_tocstream << "#" << anchor; + } + m_tocstream << "\""; + m_endtag = TRUE; + break; } - m_tocstream << "\""; } - m_endtag = TRUE; + else + { + indent(); + m_tocstream << "<topic label=\"" << convertToXML(name) << "\""; + m_endtag = TRUE; + } } void EclipseHelp::addIndexItem( |