summaryrefslogtreecommitdiffstats
path: root/src/eclipsehelp.cpp
diff options
context:
space:
mode:
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(