summaryrefslogtreecommitdiff
path: root/src/docbookvisitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/docbookvisitor.cpp')
-rw-r--r--src/docbookvisitor.cpp49
1 files changed, 38 insertions, 11 deletions
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index 70e9c53..ab10da0 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -242,7 +242,7 @@ void DocbookDocVisitor::visit(DocVerbatim *s)
m_t << "<para>" << endl;
name.sprintf("%s%d", "dot_inline_dotgraph_", dotindex);
baseName.sprintf("%s%d",
- (Config_getString("DOCBOOK_OUTPUT")+"/inline_dotgraph_").data(),
+ (Config_getString(DOCBOOK_OUTPUT)+"/inline_dotgraph_").data(),
dotindex++
);
QFile file(baseName+".dot");
@@ -265,7 +265,7 @@ void DocbookDocVisitor::visit(DocVerbatim *s)
m_t << "<para>" << endl;
name.sprintf("%s%d", "msc_inline_mscgraph_", mscindex);
baseName.sprintf("%s%d",
- (Config_getString("DOCBOOK_OUTPUT")+"/inline_mscgraph_").data(),
+ (Config_getString(DOCBOOK_OUTPUT)+"/inline_mscgraph_").data(),
mscindex++
);
QFile file(baseName+".msc");
@@ -284,7 +284,7 @@ void DocbookDocVisitor::visit(DocVerbatim *s)
break;
case DocVerbatim::PlantUML:
{
- static QCString docbookOutput = Config_getString("DOCBOOK_OUTPUT");
+ static QCString docbookOutput = Config_getString(DOCBOOK_OUTPUT);
QCString baseName = writePlantUMLSource(docbookOutput,s->exampleFile(),s->text());
QCString shortName = baseName;
int i;
@@ -359,6 +359,33 @@ void DocbookDocVisitor::visit(DocInclude *inc)
);
m_t << "</computeroutput></literallayout>";
break;
+ case DocInclude::SnipWithLines:
+ {
+ QFileInfo cfi( inc->file() );
+ FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ m_t << "<literallayout><computeroutput>";
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,
+ inc->context(),
+ extractBlock(inc->text(),inc->blockId()),
+ langExt,
+ inc->isExample(),
+ inc->exampleFile(),
+ &fd,
+ lineBlock(inc->text(),inc->blockId()),
+ -1, // endLine
+ FALSE, // inlineFragment
+ 0, // memberDef
+ TRUE // show line number
+ );
+ m_t << "</computeroutput></literallayout>";
+ }
+ break;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
}
@@ -913,7 +940,7 @@ void DocbookDocVisitor::visitPost(DocImage *img)
m_file=fd->absFilePath();
}
QFile inImage(m_file);
- QFile outImage(Config_getString("DOCBOOK_OUTPUT")+"/"+baseName.data());
+ QFile outImage(Config_getString(DOCBOOK_OUTPUT)+"/"+baseName.data());
if (inImage.open(IO_ReadOnly))
{
if (outImage.open(IO_WriteOnly))
@@ -1220,7 +1247,7 @@ void DocbookDocVisitor::writeMscFile(const QCString &baseName, DocVerbatim *s)
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_BITMAP);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
visitCaption(this, s->children());
@@ -1235,7 +1262,7 @@ void DocbookDocVisitor::writePlantUMLFile(const QCString &baseName, DocVerbatim
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
generatePlantUMLOutput(baseName,outDir,PUML_BITMAP);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
visitCaption(this, s->children());
@@ -1259,7 +1286,7 @@ void DocbookDocVisitor::startMscFile(const QCString &fileName,
baseName=baseName.left(i);
}
baseName.prepend("msc_");
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP);
m_t << "<para>" << endl;
visitPreStart(m_t, hasCaption, baseName + ".png", width, height);
@@ -1280,7 +1307,7 @@ void DocbookDocVisitor::writeDiaFile(const QCString &baseName, DocVerbatim *s)
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
visitCaption(this, s->children());
@@ -1304,7 +1331,7 @@ void DocbookDocVisitor::startDiaFile(const QCString &fileName,
baseName=baseName.left(i);
}
baseName.prepend("dia_");
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP);
m_t << "<para>" << endl;
visitPreStart(m_t, hasCaption, baseName + ".png", width, height);
@@ -1325,7 +1352,7 @@ void DocbookDocVisitor::writeDotFile(const QCString &baseName, DocVerbatim *s)
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP);
visitPreStart(m_t, s->hasCaption(), baseName + ".dot", s->width(),s->height());
visitCaption(this, s->children());
@@ -1349,7 +1376,7 @@ void DocbookDocVisitor::startDotFile(const QCString &fileName,
baseName=baseName.left(i);
}
baseName.prepend("dot_");
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
QCString imgExt = getDotImageExtension();
writeDotGraphFromFile(fileName,outDir,baseName,GOF_BITMAP);
m_t << "<para>" << endl;