summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index cf08933..60709aa 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -844,7 +844,8 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
const QCString &text,MemberSDict *members,bool /*funcOnly*/)
{
- ol.pushGeneratorState();
+static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
+ ol.pushGeneratorState();
if (/*Config_getBool("SOURCE_BROWSER") &&*/ members)
{
ol.startParagraph();
@@ -890,7 +891,14 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
//printf("md->getBodyDef()=%p global=%p\n",md->getBodyDef(),Doxygen::globalScope);
// for HTML write a real link
ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
+ //ol.disableAllBut(OutputGenerator::Html);
+
+ ol.disable(OutputGenerator::RTF);
+ ol.disable(OutputGenerator::Man);
+ if (!latexSourceCode)
+ {
+ ol.disable(OutputGenerator::Latex);
+ }
QCString lineStr,anchorStr;
anchorStr.sprintf("l%05d",md->getStartBodyLine());
//printf("Write object link to %s\n",md->getBodyDef()->getSourceFileBase().data());
@@ -899,7 +907,11 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
// for the other output formats just mention the name
ol.pushGeneratorState();
- ol.disable(OutputGenerator::Html);
+ ol.disable(OutputGenerator::Html);
+ if (latexSourceCode)
+ {
+ ol.disable(OutputGenerator::Latex);
+ }
ol.docify(name);
ol.popGeneratorState();
}
@@ -907,7 +919,14 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
{
// for HTML write a real link
ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
+ //ol.disableAllBut(OutputGenerator::Html);
+ ol.disable(OutputGenerator::RTF);
+ ol.disable(OutputGenerator::Man);
+ if (!latexSourceCode)
+ {
+ ol.disable(OutputGenerator::Latex);
+ }
+
ol.writeObjectLink(md->getReference(),
md->getOutputFileBase(),
md->anchor(),name);
@@ -916,6 +935,10 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
// for the other output formats just mention the name
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
+ if (latexSourceCode)
+ {
+ ol.disable(OutputGenerator::Latex);
+ }
ol.docify(name);
ol.popGeneratorState();
}