diff options
author | albert-github <albert.tests@gmail.com> | 2014-12-10 17:14:29 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2014-12-10 17:14:29 (GMT) |
commit | 05eb230757f6510d461bd14df3b190da46edd9dc (patch) | |
tree | 05c94ee9242d0f47869696b8861fdfc38a29f68f /src/filedef.cpp | |
parent | dc37f6c2a42740e6cbd79d1e6c758c5cbc1f10f7 (diff) | |
download | Doxygen-05eb230757f6510d461bd14df3b190da46edd9dc.zip Doxygen-05eb230757f6510d461bd14df3b190da46edd9dc.tar.gz Doxygen-05eb230757f6510d461bd14df3b190da46edd9dc.tar.bz2 |
Add source code possibility for RTF output
Analogous to Latex and HTML output the possibility to have source code shown in RTF output is created.
Based on question: http://doxygen.10944.n7.nabble.com/RTF-lack-of-source-code-tc6936.html
Diffstat (limited to 'src/filedef.cpp')
-rw-r--r-- | src/filedef.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/filedef.cpp b/src/filedef.cpp index c0be33d..dd97c1c 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -333,6 +333,10 @@ void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title) { ol.disable(OutputGenerator::Latex); } + if (ol.isEnabled(OutputGenerator::RTF) && !Config_getBool("RTF_SOURCE_CODE")) + { + ol.disable(OutputGenerator::RTF); + } ol.startParagraph(); QCString refText = theTranslator->trDefinedInSourceFile(); @@ -910,6 +914,7 @@ void FileDef::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu) static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES"); static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); + static bool rtfSourceCode = Config_getBool("RTF_SOURCE_CODE"); DevNullCodeDocInterface devNullIntf; QCString title = m_docname; if (!m_fileVersion.isEmpty()) @@ -918,8 +923,8 @@ void FileDef::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu) } QCString pageTitle = theTranslator->trSourceFile(title); ol.disable(OutputGenerator::Man); - ol.disable(OutputGenerator::RTF); if (!latexSourceCode) ol.disable(OutputGenerator::Latex); + if (!rtfSourceCode) ol.disable(OutputGenerator::RTF); bool isDocFile = isDocumentationFile(); bool genSourceFile = !isDocFile && generateSourceFile(); @@ -951,10 +956,12 @@ void FileDef::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu) if (isLinkable()) { if (latexSourceCode) ol.disable(OutputGenerator::Latex); + if (rtfSourceCode) ol.disable(OutputGenerator::RTF); ol.startTextLink(getOutputFileBase(),0); ol.parseText(theTranslator->trGotoDocumentation()); ol.endTextLink(); if (latexSourceCode) ol.enable(OutputGenerator::Latex); + if (rtfSourceCode) ol.enable(OutputGenerator::RTF); } (void)sameTu; |