summaryrefslogtreecommitdiffstats
path: root/src/rtfgen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2008-01-17 18:56:38 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2008-01-17 18:56:38 (GMT)
commitf000dd870b772ed6bc26ea383a8657301eb5ef17 (patch)
tree05e55417a750c1275c9139b7952de6941db168dd /src/rtfgen.cpp
parentb00ec8923dcf911a38323429f1744048b20a35a7 (diff)
downloadDoxygen-f000dd870b772ed6bc26ea383a8657301eb5ef17.zip
Doxygen-f000dd870b772ed6bc26ea383a8657301eb5ef17.tar.gz
Doxygen-f000dd870b772ed6bc26ea383a8657301eb5ef17.tar.bz2
Release-1.5.4-20080101
Diffstat (limited to 'src/rtfgen.cpp')
-rw-r--r--src/rtfgen.cpp94
1 files changed, 70 insertions, 24 deletions
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 753d133..a0d5e31 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1,8 +1,8 @@
/******************************************************************************
*
- * $Id$
+ *
*
- * Copyright (C) 1997-2007 by Parker Waechter & Dimitri van Heesch.
+ * Copyright (C) 1997-2008 by Parker Waechter & Dimitri van Heesch.
*
* Style sheet additions by Alexander Bartolich
*
@@ -37,6 +37,7 @@
#include "rtfdocvisitor.h"
#include "docparser.h"
#include "dirdef.h"
+#include "vhdldocgen.h"
//#define DBG_RTF(x) x;
#define DBG_RTF(x)
@@ -514,6 +515,7 @@ void RTFGenerator::startIndexSection(IndexSections is)
{
//Page Documentation
beginRTFChapter();
+ t << "{\\tc \\v ";
}
break;
case isEndIndex:
@@ -523,6 +525,8 @@ void RTFGenerator::startIndexSection(IndexSections is)
void RTFGenerator::endIndexSection(IndexSections is)
{
+ bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
switch (is)
{
case isTitlePageStart:
@@ -623,7 +627,15 @@ void RTFGenerator::endIndexSection(IndexSections is)
break;
case isNamespaceIndex:
t << "\\par " << rtf_Style_Reset << endl;
- t << "{\\tc \\v " << theTranslator->trNamespaceIndex() << "}"<< endl;
+ if (fortranOpt)
+ {
+ t << "{\\tc \\v " << theTranslator->trModulesIndex() << "}"<< endl;
+ }
+ else
+ {
+ t << "{\\tc \\v " << theTranslator->trNamespaceIndex() << "}"<< endl;
+ }
+
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isClassHierarchyIndex:
@@ -633,7 +645,18 @@ void RTFGenerator::endIndexSection(IndexSections is)
break;
case isCompoundIndex:
t << "\\par " << rtf_Style_Reset << endl;
- t << "{\\tc \\v " << theTranslator->trCompoundIndex() << "}"<< endl;
+ if (fortranOpt)
+ {
+ t << "{\\tc \\v " << theTranslator->trCompoundIndexFortran() << "}"<< endl;
+ }
+ else if (vhdlOpt)
+ {
+ t << "{\\tc \\v " << VhdlDocGen::trDesignUnitIndex() << "}"<< endl;
+ }
+ else
+ {
+ t << "{\\tc \\v " << theTranslator->trCompoundIndex() << "}"<< endl;
+ }
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"annotated.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isFileIndex:
@@ -715,8 +738,14 @@ void RTFGenerator::endIndexSection(IndexSections is)
ClassSDict::Iterator cli(*Doxygen::classSDict);
ClassDef *cd=0;
bool found=FALSE;
-
- t << "{\\tc \\v " << theTranslator->trClassDocumentation() << "}"<< endl;
+ if (fortranOpt)
+ {
+ t << "{\\tc \\v " << theTranslator->trTypeDocumentation() << "}"<< endl;
+ }
+ else
+ {
+ t << "{\\tc \\v " << theTranslator->trClassDocumentation() << "}"<< endl;
+ }
for (cli.toFirst();(cd=cli.current()) && !found;++cli)
{
if (cd->isLinkableInProject() && cd->templateMaster()==0)
@@ -802,21 +831,23 @@ void RTFGenerator::endIndexSection(IndexSections is)
break;
case isPageDocumentation:
{
- t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl;
- PageSDict::Iterator pdi(*Doxygen::pageSDict);
- PageDef *pd=pdi.toFirst();
- bool first=TRUE;
- for (pdi.toFirst();(pd=pdi.current());++pdi)
- {
- if (!pd->getGroupDef() && !pd->isReference())
- {
- if (first) t << "\\par " << rtf_Style_Reset << endl;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- t << pd->getOutputFileBase();
- t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
- first=FALSE;
- }
- }
+//#error "fix me in the same way as the latex index..."
+ //t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl;
+ t << "}"<< endl;
+ //PageSDict::Iterator pdi(*Doxygen::pageSDict);
+ //PageDef *pd=pdi.toFirst();
+ //bool first=TRUE;
+ //for (pdi.toFirst();(pd=pdi.current());++pdi)
+ //{
+ // if (!pd->getGroupDef() && !pd->isReference())
+ // {
+ // if (first) t << "\\par " << rtf_Style_Reset << endl;
+ // t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ // t << pd->getOutputFileBase();
+ // t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ // first=FALSE;
+ // }
+ //}
}
break;
case isEndIndex:
@@ -831,6 +862,14 @@ void RTFGenerator::endIndexSection(IndexSections is)
}
}
+void RTFGenerator::writePageLink(const char *name,bool first)
+{
+ if (first) t << "\\par " << rtf_Style_Reset << endl;
+ t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ t << name;
+ t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+}
+
void RTFGenerator::lastIndexPage()
{
DBG_RTF(t <<"{\\comment Beginning Body of RTF Document}\n")
@@ -2393,9 +2432,7 @@ bool RTFGenerator::preProcessFileInplace(const char *path,const char *name)
return FALSE;
}
QTextStream outt(&outf);
-#if QT_VERSION >= 200
- outt.setEncoding(QTextStream::Latin1);
-#endif
+ outt.setEncoding(QTextStream::UnicodeUTF8);
if (!PreProcessFile(thisDir,mainRTFName,outt))
{
@@ -2513,6 +2550,15 @@ void RTFGenerator::endParamList()
t << "}";
}
+void RTFGenerator::startParameterType(bool first,const char *key)
+{
+ DBG_RTF(t << "{\\comment (startParameterList)}" << endl)
+ if (!first)
+ {
+ t << " " << key << " ";
+ }
+}
+
void RTFGenerator::printDoc(DocNode *n,const char *langExt)
{
RTFDocVisitor *visitor = new RTFDocVisitor(t,*this,langExt);