summaryrefslogtreecommitdiffstats
path: root/src/eclipsehelp.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2012-12-26 15:59:17 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2012-12-26 15:59:17 (GMT)
commit48f4de5c47d55b6622b6fdc9b5c288e19d5692f9 (patch)
tree629c4681a5158d26512b815623754b33165d8d23 /src/eclipsehelp.cpp
parentfee4053bd3dd075a2dd2cba4da8166ec5307eadd (diff)
downloadDoxygen-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.cpp50
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(