Commit 12f5ee8a authored by Dimitri van Heesch's avatar Dimitri van Heesch

Docbook output improvements

1. New Feature: Adapted Class Graph generation for DOCBOOK
2. Fixed DOCBOOK Code documentation formatting
3. Fixed Doxygen to handle FULL_PATH_NAMES for DOCBOOK generation
parent 21178ab4
......@@ -2760,6 +2760,16 @@ that can be used to generate PDF.
The \c DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
If a relative path is entered the value of \ref cfg_output_directory "OUTPUT_DIRECTORY" will be put in
front of it.
]]>
</docs>
</option>
<option type='bool' id='DOCBOOK_PROGRAMLISTING' defval='0' depends='GENERATE_DOCBOOK'>
<docs>
<![CDATA[
If the \c DOCBOOK_PROGRAMLISTING tag is set to \c YES doxygen will
include the program listings (including syntax highlighting
and cross-referencing information) to the DOCBOOK output. Note that
enabling this will significantly increase the size of the DOCBOOK output.
]]>
</docs>
</option>
......
......@@ -1471,7 +1471,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
{
DotClassGraph *cg = getClassGraph();
FTextStream t(&result);
cg->writeGraph(t,BITMAP,
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,TRUE,g_globals.dynSectionId
......@@ -1516,7 +1516,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
{
DotClassGraph *cg = getCollaborationGraph();
FTextStream t(&result);
cg->writeGraph(t,BITMAP,
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,TRUE,g_globals.dynSectionId
......@@ -2197,7 +2197,7 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
{
DotInclDepGraph *cg = getIncludeGraph();
FTextStream t(&result);
cg->writeGraph(t,BITMAP,
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
g_globals.outputDir+portable_pathSeparator()+m_fileDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,g_globals.dynSectionId
......@@ -2228,7 +2228,7 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
{
DotInclDepGraph *cg = getIncludedByGraph();
FTextStream t(&result);
cg->writeGraph(t,BITMAP,
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
g_globals.outputDir+portable_pathSeparator()+m_fileDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,g_globals.dynSectionId
......@@ -3634,7 +3634,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
DotCallGraph *cg = getCallGraph();
QGString result;
FTextStream t(&result);
cg->writeGraph(t,BITMAP,
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,g_globals.dynSectionId
......@@ -3674,7 +3674,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
DotCallGraph *cg = getCallerGraph();
QGString result;
FTextStream t(&result);
cg->writeGraph(t,BITMAP,
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,g_globals.dynSectionId
......
This diff is collapsed.
This diff is collapsed.
......@@ -257,14 +257,18 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
QCString outputDir;
switch(type)
{
case DocImage::Html:
case DocImage::Html:
if (!Config_getBool("GENERATE_HTML")) return result;
outputDir = Config_getString("HTML_OUTPUT");
break;
case DocImage::Latex:
case DocImage::Latex:
if (!Config_getBool("GENERATE_LATEX")) return result;
outputDir = Config_getString("LATEX_OUTPUT");
break;
case DocImage::DocBook:
if (!Config_getBool("GENERATE_DOCBOOK")) return result;
outputDir = Config_getString("DOCBOOK_OUTPUT");
break;
case DocImage::Rtf:
if (!Config_getBool("GENERATE_RTF")) return result;
outputDir = Config_getString("RTF_OUTPUT");
......@@ -5025,9 +5029,10 @@ void DocPara::handleImage(const QCString &cmdName)
}
DocImage::Type t;
QCString imgType = g_token->name.lower();
if (imgType=="html") t=DocImage::Html;
else if (imgType=="latex") t=DocImage::Latex;
else if (imgType=="rtf") t=DocImage::Rtf;
if (imgType=="html") t=DocImage::Html;
else if (imgType=="latex") t=DocImage::Latex;
else if (imgType=="docbook") t=DocImage::DocBook;
else if (imgType=="rtf") t=DocImage::Rtf;
else
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"image type %s specified as the first argument of "
......
......@@ -668,7 +668,7 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode
class DocImage : public CompAccept<DocImage>, public DocNode
{
public:
enum Type { Html, Latex, Rtf };
enum Type { Html, Latex, Rtf, DocBook };
DocImage(DocNode *parent,const HtmlAttribList &attribs,
const QCString &name,Type t,const QCString &url=QCString());
Kind kind() const { return Kind_Image; }
......
This diff is collapsed.
......@@ -39,7 +39,8 @@ class GroupDef;
class DotGroupCollaboration;
class DotRunnerQueue;
enum GraphOutputFormat { BITMAP , EPS };
enum GraphOutputFormat { GOF_BITMAP, GOF_EPS };
enum EmbeddedOutputFormat { EOF_Html, EOF_LaTeX, EOF_Rtf, EOF_DocBook };
/** Attributes of an edge of a dot graph */
struct EdgeInfo
......@@ -165,8 +166,8 @@ class DotClassGraph
~DotClassGraph();
bool isTrivial() const;
bool isTooBig() const;
QCString writeGraph(FTextStream &t,GraphOutputFormat f,const char *path,
const char *fileName, const char *relPath,
QCString writeGraph(FTextStream &t,GraphOutputFormat gf,EmbeddedOutputFormat ef,
const char *path, const char *fileName, const char *relPath,
bool TBRank=TRUE,bool imageMap=TRUE,int graphId=-1) const;
void writeXML(FTextStream &t);
......@@ -196,7 +197,7 @@ class DotInclDepGraph
public:
DotInclDepGraph(FileDef *fd,bool inverse);
~DotInclDepGraph();
QCString writeGraph(FTextStream &t, GraphOutputFormat f,
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
const char *path,const char *fileName,const char *relPath,
bool writeImageMap=TRUE,int graphId=-1) const;
bool isTrivial() const;
......@@ -222,7 +223,7 @@ class DotCallGraph
public:
DotCallGraph(MemberDef *md,bool inverse);
~DotCallGraph();
QCString writeGraph(FTextStream &t, GraphOutputFormat f,
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
const char *path,const char *fileName,
const char *relPath,bool writeImageMap=TRUE,
int graphId=-1) const;
......@@ -249,7 +250,8 @@ class DotDirDeps
~DotDirDeps();
bool isTrivial() const;
QCString writeGraph(FTextStream &out,
GraphOutputFormat format,
GraphOutputFormat gf,
EmbeddedOutputFormat ef,
const char *path,
const char *fileName,
const char *relPath,
......@@ -298,7 +300,7 @@ class DotGroupCollaboration
DotGroupCollaboration(GroupDef* gd);
~DotGroupCollaboration();
QCString writeGraph(FTextStream &t, GraphOutputFormat format,
QCString writeGraph(FTextStream &t, GraphOutputFormat gf,EmbeddedOutputFormat ef,
const char *path,const char *fileName,const char *relPath,
bool writeImageMap=TRUE,int graphId=-1) const;
void buildGraph(GroupDef* gd);
......
......@@ -1906,7 +1906,7 @@ void HtmlDocVisitor::writeDotFile(const QCString &fn,const QCString &relPath,
}
baseName.prepend("dot_");
QCString outDir = Config_getString("HTML_OUTPUT");
writeDotGraphFromFile(fn,outDir,baseName,BITMAP);
writeDotGraphFromFile(fn,outDir,baseName,GOF_BITMAP);
writeDotImageMapFromFile(m_t,fn,outDir,relPath,baseName,context);
}
......
......@@ -2516,7 +2516,7 @@ void HtmlGenerator::endDotGraph(const DotClassGraph &g)
endSectionSummary(t);
startSectionContent(t,m_sectionCount);
g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,TRUE,m_sectionCount);
g.writeGraph(t,GOF_BITMAP,EOF_Html,dir,fileName,relPath,TRUE,TRUE,m_sectionCount);
if (generateLegend && !umlLook)
{
t << "<center><span class=\"legend\">[";
......@@ -2542,7 +2542,7 @@ void HtmlGenerator::endInclDepGraph(const DotInclDepGraph &g)
endSectionSummary(t);
startSectionContent(t,m_sectionCount);
g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount);
g.writeGraph(t,GOF_BITMAP,EOF_Html,dir,fileName,relPath,TRUE,m_sectionCount);
endSectionContent(t);
m_sectionCount++;
......@@ -2560,7 +2560,7 @@ void HtmlGenerator::endGroupCollaboration(const DotGroupCollaboration &g)
endSectionSummary(t);
startSectionContent(t,m_sectionCount);
g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount);
g.writeGraph(t,GOF_BITMAP,EOF_Html,dir,fileName,relPath,TRUE,m_sectionCount);
endSectionContent(t);
m_sectionCount++;
......@@ -2578,7 +2578,7 @@ void HtmlGenerator::endCallGraph(const DotCallGraph &g)
endSectionSummary(t);
startSectionContent(t,m_sectionCount);
g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount);
g.writeGraph(t,GOF_BITMAP,EOF_Html,dir,fileName,relPath,TRUE,m_sectionCount);
endSectionContent(t);
m_sectionCount++;
......@@ -2596,7 +2596,7 @@ void HtmlGenerator::endDirDepGraph(const DotDirDeps &g)
endSectionSummary(t);
startSectionContent(t,m_sectionCount);
g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount);
g.writeGraph(t,GOF_BITMAP,EOF_Html,dir,fileName,relPath,TRUE,m_sectionCount);
endSectionContent(t);
m_sectionCount++;
......
......@@ -1587,7 +1587,7 @@ void LatexDocVisitor::startDotFile(const QCString &fileName,
baseName.prepend("dot_");
QCString outDir = Config_getString("LATEX_OUTPUT");
QCString name = fileName;
writeDotGraphFromFile(name,outDir,baseName,EPS);
writeDotGraphFromFile(name,outDir,baseName,GOF_EPS);
if (hasCaption)
{
m_t << "\n\\begin{DoxyImage}\n";
......
......@@ -1814,7 +1814,7 @@ void LatexGenerator::startDotGraph()
void LatexGenerator::endDotGraph(const DotClassGraph &g)
{
g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath);
g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString("LATEX_OUTPUT"),fileName,relPath);
}
void LatexGenerator::startInclDepGraph()
......@@ -1823,7 +1823,7 @@ void LatexGenerator::startInclDepGraph()
void LatexGenerator::endInclDepGraph(const DotInclDepGraph &g)
{
g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath);
g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString("LATEX_OUTPUT"),fileName,relPath);
}
void LatexGenerator::startGroupCollaboration()
......@@ -1832,7 +1832,7 @@ void LatexGenerator::startGroupCollaboration()
void LatexGenerator::endGroupCollaboration(const DotGroupCollaboration &g)
{
g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath);
g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString("LATEX_OUTPUT"),fileName,relPath);
}
void LatexGenerator::startCallGraph()
......@@ -1841,7 +1841,7 @@ void LatexGenerator::startCallGraph()
void LatexGenerator::endCallGraph(const DotCallGraph &g)
{
g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath);
g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString("LATEX_OUTPUT"),fileName,relPath);
}
void LatexGenerator::startDirDepGraph()
......@@ -1850,7 +1850,7 @@ void LatexGenerator::startDirDepGraph()
void LatexGenerator::endDirDepGraph(const DotDirDeps &g)
{
g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath);
g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString("LATEX_OUTPUT"),fileName,relPath);
}
void LatexGenerator::startDescription()
......
......@@ -476,9 +476,10 @@ class PrintDocVisitor : public DocVisitor
printf("<image src=\"%s\" type=\"",img->name().data());
switch(img->type())
{
case DocImage::Html: printf("html"); break;
case DocImage::Latex: printf("latex"); break;
case DocImage::Rtf: printf("rtf"); break;
case DocImage::Html: printf("html"); break;
case DocImage::Latex: printf("latex"); break;
case DocImage::Rtf: printf("rtf"); break;
case DocImage::DocBook: printf("docbook"); break;
}
printf("\" width=%s height=%s>\n",img->width().data(),img->height().data());
}
......
......@@ -1653,7 +1653,7 @@ void RTFDocVisitor::writeDotFile(const QCString &fileName)
baseName=baseName.right(baseName.length()-i-1);
}
QCString outDir = Config_getString("RTF_OUTPUT");
writeDotGraphFromFile(fileName,outDir,baseName,BITMAP);
writeDotGraphFromFile(fileName,outDir,baseName,GOF_BITMAP);
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "{" << endl;
m_t << rtf_Style_Reset;
......
......@@ -2409,7 +2409,7 @@ void RTFGenerator::endDotGraph(const DotClassGraph &g)
newParagraph();
QCString fn =
g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),fileName,relPath,TRUE,FALSE);
g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString("RTF_OUTPUT"),fileName,relPath,TRUE,FALSE);
// display the file
t << "{" << endl;
......@@ -2431,7 +2431,7 @@ void RTFGenerator::endInclDepGraph(const DotInclDepGraph &g)
{
newParagraph();
QCString fn = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),
QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString("RTF_OUTPUT"),
fileName,relPath,FALSE);
// display the file
......@@ -2461,7 +2461,7 @@ void RTFGenerator::endCallGraph(const DotCallGraph &g)
{
newParagraph();
QCString fn = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),
QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString("RTF_OUTPUT"),
fileName,relPath,FALSE);
// display the file
......@@ -2483,7 +2483,7 @@ void RTFGenerator::endDirDepGraph(const DotDirDeps &g)
{
newParagraph();
QCString fn = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),
QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString("RTF_OUTPUT"),
fileName,relPath,FALSE);
// display the file
......
......@@ -678,9 +678,10 @@ void XmlDocVisitor::visitPre(DocImage *img)
m_t << "<image type=\"";
switch(img->type())
{
case DocImage::Html: m_t << "html"; break;
case DocImage::Latex: m_t << "latex"; break;
case DocImage::Rtf: m_t << "rtf"; break;
case DocImage::Html: m_t << "html"; break;
case DocImage::Latex: m_t << "latex"; break;
case DocImage::Rtf: m_t << "rtf"; break;
case DocImage::DocBook: m_t << "docbook"; break;
}
m_t << "\"";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment