summaryrefslogtreecommitdiffstats
path: root/src/dot.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-09-07 09:29:20 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-09-07 09:29:20 (GMT)
commit7340b1c0e767b0ee88ce389df653d3d2a77801cd (patch)
treebab4c534d53eb7fb0f713049f0d5885d8eed8a62 /src/dot.cpp
parent3e1360976b6ab9621b85d93fdd4e9232d6a7a7fa (diff)
downloadDoxygen-7340b1c0e767b0ee88ce389df653d3d2a77801cd.zip
Doxygen-7340b1c0e767b0ee88ce389df653d3d2a77801cd.tar.gz
Doxygen-7340b1c0e767b0ee88ce389df653d3d2a77801cd.tar.bz2
Implementation of standard generator for docbook output
Till now docbook had its own output generator, but lot of possibilities were missing (see remark about updating below), with this patch the (more than) basic implementation has been made. Added some docbook tests to the current tests and updated documentation where necessary Tried updating current version but too many issues remained that were generically handled in the standard generator, code is in current version behind '#if 0' construct in doxygen.cpp and name with '_v1' and in docbookgen.cp'
Diffstat (limited to 'src/dot.cpp')
-rw-r--r--src/dot.cpp57
1 files changed, 20 insertions, 37 deletions
diff --git a/src/dot.cpp b/src/dot.cpp
index 7b29569..5f52210 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -1383,6 +1383,11 @@ bool DotManager::run()
setDotFontPath(Config_getString(RTF_OUTPUT));
setPath=TRUE;
}
+ else if (Config_getBool(GENERATE_DOCBOOK))
+ {
+ setDotFontPath(Config_getString(DOCBOOK_OUTPUT));
+ setPath=TRUE;
+ }
portable_sysTimerStart();
// fill work queue with dot operations
DotRunner *dr;
@@ -3242,29 +3247,15 @@ QCString DotClassGraph::writeGraph(FTextStream &out,
if (graphFormat==GOF_BITMAP && textFormat==EOF_DocBook)
{
out << "<para>" << endl;
- out << " <figure>" << endl;
- out << " <title>";
- switch (m_graphType)
- {
- case DotNode::Collaboration:
- out << "Collaboration graph";
- break;
- case DotNode::Inheritance:
- out << "Inheritance graph";
- break;
- default:
- ASSERT(0);
- break;
- }
- out << "</title>" << endl;
+ out << " <informalfigure>" << endl;
out << " <mediaobject>" << endl;
out << " <imageobject>" << endl;
out << " <imagedata";
- out << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << relPath << baseName << "." << imgExt << "\">";
+ out << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << relPath << baseName << "." << imgExt << "\">";
out << "</imagedata>" << endl;
out << " </imageobject>" << endl;
out << " </mediaobject>" << endl;
- out << " </figure>" << endl;
+ out << " </informalfigure>" << endl;
out << "</para>" << endl;
}
else if (graphFormat==GOF_BITMAP && generateImageMap) // produce HTML to include the image
@@ -3601,17 +3592,15 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out,
if (graphFormat==GOF_BITMAP && textFormat==EOF_DocBook)
{
out << "<para>" << endl;
- out << " <figure>" << endl;
- out << " <title>Dependency diagram";
- out << "</title>" << endl;
+ out << " <informalfigure>" << endl;
out << " <mediaobject>" << endl;
out << " <imageobject>" << endl;
out << " <imagedata";
- out << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << relPath << baseName << "." << imgExt << "\">";
+ out << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << relPath << baseName << "." << imgExt << "\">";
out << "</imagedata>" << endl;
out << " </imageobject>" << endl;
out << " </mediaobject>" << endl;
- out << " </figure>" << endl;
+ out << " </informalfigure>" << endl;
out << "</para>" << endl;
}
else if (graphFormat==GOF_BITMAP && generateImageMap)
@@ -3922,17 +3911,15 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma
if (graphFormat==GOF_BITMAP && textFormat==EOF_DocBook)
{
out << "<para>" << endl;
- out << " <figure>" << endl;
- out << " <title>Call diagram";
- out << "</title>" << endl;
+ out << " <informalfigure>" << endl;
out << " <mediaobject>" << endl;
out << " <imageobject>" << endl;
out << " <imagedata";
- out << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << relPath << baseName << "." << imgExt << "\">";
+ out << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << relPath << baseName << "." << imgExt << "\">";
out << "</imagedata>" << endl;
out << " </imageobject>" << endl;
out << " </mediaobject>" << endl;
- out << " </figure>" << endl;
+ out << " </informalfigure>" << endl;
out << "</para>" << endl;
}
else if (graphFormat==GOF_BITMAP && generateImageMap)
@@ -4087,17 +4074,15 @@ QCString DotDirDeps::writeGraph(FTextStream &out,
if (graphFormat==GOF_BITMAP && textFormat==EOF_DocBook)
{
out << "<para>" << endl;
- out << " <figure>" << endl;
- out << " <title>Directory Dependency diagram";
- out << "</title>" << endl;
+ out << " <informalfigure>" << endl;
out << " <mediaobject>" << endl;
out << " <imageobject>" << endl;
out << " <imagedata";
- out << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << relPath << baseName << "." << imgExt << "\">";
+ out << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << relPath << baseName << "." << imgExt << "\">";
out << "</imagedata>" << endl;
out << " </imageobject>" << endl;
out << " </mediaobject>" << endl;
- out << " </figure>" << endl;
+ out << " </informalfigure>" << endl;
out << "</para>" << endl;
}
else if (graphFormat==GOF_BITMAP && generateImageMap)
@@ -4650,17 +4635,15 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
if (graphFormat==GOF_BITMAP && textFormat==EOF_DocBook)
{
t << "<para>" << endl;
- t << " <figure>" << endl;
- t << " <title>Group Collaboration diagram";
- t << "</title>" << endl;
+ t << " <informalfigure>" << endl;
t << " <mediaobject>" << endl;
t << " <imageobject>" << endl;
t << " <imagedata";
- t << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << relPath << baseName << "." << imgExt << "\">";
+ t << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << relPath << baseName << "." << imgExt << "\">";
t << "</imagedata>" << endl;
t << " </imageobject>" << endl;
t << " </mediaobject>" << endl;
- t << " </figure>" << endl;
+ t << " </informalfigure>" << endl;
t << "</para>" << endl;
}
else if (graphFormat==GOF_BITMAP && writeImageMap)