summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classlist.cpp3
-rw-r--r--src/config.h3
-rw-r--r--src/config.l17
-rw-r--r--src/definition.cpp5
-rw-r--r--src/doc.l39
-rw-r--r--src/doxygen.cpp71
-rw-r--r--src/filedef.cpp3
-rw-r--r--src/groupdef.cpp17
-rw-r--r--src/groupdef.h6
-rw-r--r--src/index.cpp8
-rw-r--r--src/memberdef.cpp2
-rw-r--r--src/rtfgen.cpp180
-rw-r--r--src/rtfgen.h1
-rw-r--r--src/scanner.l5
-rw-r--r--src/translator_cz.h31
15 files changed, 344 insertions, 47 deletions
diff --git a/src/classlist.cpp b/src/classlist.cpp
index a8a8533..bd80ca1 100644
--- a/src/classlist.cpp
+++ b/src/classlist.cpp
@@ -84,7 +84,8 @@ void ClassList::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *fi
<< "\">" << convertToXML(cd->name()) << "</class>" << endl;
}
ol.startMemberItem(FALSE);
- ol.writeString(cd->compoundTypeString());
+ QCString tmp = cd->compoundTypeString();
+ ol.writeString(tmp);
ol.writeString(" ");
ol.insertMemberAlign();
if (isLink)
diff --git a/src/config.h b/src/config.h
index fba7711..0bdaffa 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,4 +1,4 @@
-/* This file was generated by configgen on Sun Feb 25 14:30:18 2001
+/* This file was generated by configgen on Mon Mar 19 20:34:58 2001
* from config_templ.h
*
* DO NOT EDIT!
@@ -125,6 +125,7 @@ struct Config
static bool compactRTFFlag; /*!< generate more compact RTF */
static bool rtfHyperFlag; /*!< generate hyper links in RTF */
static QCString rtfStylesheetFile; /*!< file to load stylesheet definitions from */
+ static QCString rtfExtensionsFile; /*!< file to load rtf extensions from */
static bool generateMan; /*!< generate Man pages */
static QCString manOutputDir; /*!< the directory to put the man pages */
static QCString manExtension; /*!< extension the man page files */
diff --git a/src/config.l b/src/config.l
index 9093c8e..c31152b 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1,4 +1,4 @@
-/* This file was generated by configgen on Mon Feb 26 19:52:21 2001
+/* This file was generated by configgen on Mon Mar 19 20:34:59 2001
* from config_templ.l
*
* DO NOT EDIT!
@@ -157,6 +157,7 @@ QCString Config::rtfOutputDir = "rtf";
bool Config::compactRTFFlag = FALSE;
bool Config::rtfHyperFlag = FALSE;
QCString Config::rtfStylesheetFile;
+QCString Config::rtfExtensionsFile;
bool Config::generateMan = TRUE;
QCString Config::manOutputDir = "man";
QCString Config::manExtension = ".3";
@@ -446,6 +447,7 @@ static void readIncludeFile(const char *incName)
<Start>"COMPACT_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactRTFFlag; }
<Start>"RTF_HYPERLINKS"[ \t]*"=" { BEGIN(GetBool); b=&Config::rtfHyperFlag; }
<Start>"RTF_STYLESHEET_FILE"[ \t]*"=" { BEGIN(GetString); s=&Config::rtfStylesheetFile; s->resize(0); }
+<Start>"RTF_EXTENSIONS_FILE"[ \t]*"=" { BEGIN(GetString); s=&Config::rtfExtensionsFile; s->resize(0); }
<Start>"GENERATE_MAN"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateMan; }
<Start>"MAN_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::manOutputDir; s->resize(0); }
<Start>"MAN_EXTENSION"[ \t]*"=" { BEGIN(GetString); s=&Config::manExtension; s->resize(0); }
@@ -762,6 +764,7 @@ void dumpConfig()
printf("compactRTFFlag=`%d'\n",Config::compactRTFFlag);
printf("rtfHyperFlag=`%d'\n",Config::rtfHyperFlag);
printf("rtfStylesheetFile=`%s'\n",Config::rtfStylesheetFile.data());
+ printf("rtfExtensionsFile=`%s'\n",Config::rtfExtensionsFile.data());
printf("# configuration options related to the man page output\n");
printf("generateMan=`%d'\n",Config::generateMan);
printf("manOutputDir=`%s'\n",Config::manOutputDir.data());
@@ -929,6 +932,7 @@ void Config::init()
Config::compactRTFFlag = FALSE;
Config::rtfHyperFlag = FALSE;
Config::rtfStylesheetFile.resize(0);
+ Config::rtfExtensionsFile.resize(0);
Config::generateMan = TRUE;
Config::manOutputDir = "man";
Config::manExtension = ".3";
@@ -2022,6 +2026,16 @@ void writeTemplateConfig(QFile *f,bool sl)
if (!sl)
{
t << "\n";
+ t << "# Set optional variables used in the generation of an rtf document. \n";
+ t << "# Syntax is similar to doxygen's config file.\n";
+ t << "\n";
+ }
+ t << "RTF_EXTENSIONS_FILE = ";
+ writeStringValue(t,Config::rtfExtensionsFile);
+ t << "\n";
+ if (!sl)
+ {
+ t << "\n";
}
t << "#---------------------------------------------------------------------------\n";
t << "# configuration options related to the man page output\n";
@@ -2698,6 +2712,7 @@ void substituteEnvironmentVars()
substEnvVarsInString( Config::latexHeaderFile );
substEnvVarsInString( Config::rtfOutputDir );
substEnvVarsInString( Config::rtfStylesheetFile );
+ substEnvVarsInString( Config::rtfExtensionsFile );
substEnvVarsInString( Config::manOutputDir );
substEnvVarsInString( Config::manExtension );
substEnvVarsInStrList( Config::includePath );
diff --git a/src/definition.cpp b/src/definition.cpp
index 3e220b2..7482856 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -344,11 +344,11 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
{
ol.pushGeneratorState();
+ //printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
+ // startBodyLine,endBodyLine,bodyDef);
if (Config::inlineSourceFlag && startBodyLine!=-1 &&
endBodyLine>=startBodyLine && bodyDef)
{
- //printf("Source Fragment %s: %d-%d\n",name().data(),
- // startBodyLine,endBodyLine);
QCString codeFragment;
int actualStart=startBodyLine,actualEnd=endBodyLine;
if (readCodeFragment(bodyDef->absFilePath(),
@@ -425,6 +425,7 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
}
parseText(ol,ldefLine.right(ldefLine.length()-index));
ol.writeString(".");
+ ol.newParagraph();
}
ol.popGeneratorState();
}
diff --git a/src/doc.l b/src/doc.l
index 2c0dab5..46cc73d 100644
--- a/src/doc.l
+++ b/src/doc.l
@@ -625,7 +625,8 @@ static void forceEndItemList()
enum ImageTypes
{
IT_Html,
- IT_Latex
+ IT_Latex,
+ IT_RTF
};
// search for an image in the imageNameDict and if found
@@ -657,6 +658,9 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
case IT_Latex:
outputDir = Config::latexOutputDir;
break;
+ case IT_RTF:
+ outputDir = Config::rtfOutputDir;
+ break;
}
QCString outputFile = outputDir+"/"+result;
QFile outImage(QString(outputFile.data()));
@@ -731,6 +735,16 @@ void writeImage(ImageTypes it,const char *size)
outDoc->endImage(hasCaption);
}
break;
+ case IT_RTF:
+ {
+ outDoc->disableAllBut(OutputGenerator::RTF);
+ outDoc->startImage(curImageName,0,hasCaption);
+ if (hasCaption)
+ {
+ scanString(curImageCaption);
+ }
+ outDoc->endImage(hasCaption);
+ }
}
outDoc->popGeneratorState();
}
@@ -864,6 +878,8 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
%x DocHtmlImageOpt
%x DocLatexImageName
%x DocLatexImageOpt
+%x DocRtfImageName
+%x DocRtfImageOpt
%%
@@ -1708,6 +1724,9 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
<DocImage>[lL][aA][tT][eE][xX] {
BEGIN(DocLatexImageName);
}
+<DocImage>[rR][tT][fF] {
+ BEGIN(DocRtfImageName);
+ }
<DocHtmlImageName>{FILE}|{URLMASK} {
curImageName = findAndCopyImage(stripQuotes(yytext),IT_Html);
curImageCaption.resize(0);
@@ -1727,6 +1746,24 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
<DocHtmlImageOpt>\"[^\n"]*\" {
curImageCaption=stripQuotes(yytext);
}
+<DocRtfImageName>{FILE} {
+ curImageName = findAndCopyImage(stripQuotes(yytext),IT_RTF);
+ curImageCaption.resize(0);
+ if (curImageName.isEmpty())
+ {
+ BEGIN(DocScan);
+ }
+ else
+ {
+ BEGIN(DocRtfImageOpt);
+ }
+ }
+<DocRtfImageOpt>\n {
+ writeImage(IT_RTF,0);
+ }
+<DocRtfImageOpt>\"[^\n"]*\" {
+ curImageCaption=stripQuotes(yytext);
+ }
<DocLatexImageName>{FILE} {
curImageName = findAndCopyImage(stripQuotes(yytext),IT_Latex);
curImageCaption.resize(0);
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 3098a0a..ea7f4ba 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -407,7 +407,6 @@ static void buildGroupList(Entry *root)
gd->addSectionsToDefinition(root->anchors);
Doxygen::groupList.append(gd);
Doxygen::groupDict.insert(root->name,gd);
- addGroupToGroups(root,gd);
gd->setRefItems(root->todoId,root->testId,root->bugId);
}
}
@@ -419,6 +418,25 @@ static void buildGroupList(Entry *root)
}
}
+static void organizeSubGroups(Entry *root)
+{
+ if (root->section==Entry::GROUPDOC_SEC && !root->name.isEmpty())
+ {
+ GroupDef *gd;
+
+ if ((gd=Doxygen::groupDict[root->name]))
+ {
+ addGroupToGroups(root,gd);
+ }
+ }
+ EntryListIterator eli(*root->sublist);
+ Entry *e;
+ for (;(e=eli.current());++eli)
+ {
+ organizeSubGroups(e);
+ }
+}
+
//----------------------------------------------------------------------
static void buildFileList(Entry *root)
@@ -3813,12 +3831,13 @@ static void findMemberDocumentation(Entry *root)
compoundKeywordDict.find(root->type)==0 // that is not a keyword
// (to skip forward declaration of class etc.)
)
- ) && !root->stat && // not static
- (!root->doc.isEmpty() || // has detailed docs
- !root->brief.isEmpty() || // has brief docs
- (root->memSpec&Entry::Inline) || // is inline
- root->mGrpId!=-1 // is part of a group
- )
+ ) && !root->stat // not static
+ /* && (
+ !root->doc.isEmpty() || // has detailed docs
+ !root->brief.isEmpty() || // has brief docs
+ (root->memSpec&Entry::Inline) || // is inline
+ root->mGrpId!=-1 || // is part of a group
+ ) */
)
{
//printf("Documentation for member `%s' found args=`%s' excp=`%s'\n",
@@ -4423,9 +4442,9 @@ static void addSourceReferences()
NamespaceDef *nd=md->getNamespaceDef();
FileDef *fd=md->getBodyDef();
GroupDef *gd=md->getGroupDef();
- if (md->getStartBodyLine()!=-1 && md->isLinkableInProject() &&
+ if (fd && md->getStartBodyLine()!=-1 && md->isLinkableInProject() &&
((nd && nd->isLinkableInProject()) ||
- (fd && fd->isLinkableInProject()) ||
+ (fd->isLinkableInProject()) ||
(gd && gd->isLinkableInProject())
)
)
@@ -5661,6 +5680,8 @@ static void usage(const char *name)
msg(" RTF: %s -w rtf styleSheetFile\n",name);
msg(" HTML: %s -w html headerFile footerFile styleSheetFile [configFile]\n",name);
msg(" LaTeX: %s -w latex headerFile styleSheetFile [configFile]\n\n",name);
+ msg("5) Use doxygen to generate an rtf extensions file\n");
+ msg(" RTF: %s -e rtf extensionsFile\n\n",name);
msg("If -s is specified the comments in the config file will be omitted.\n");
msg("If configName is omitted `Doxyfile' will be used as a default.\n\n");
exit(1);
@@ -5726,6 +5747,30 @@ void readConfiguration(int argc, char **argv)
case 'u':
updateConfig=TRUE;
break;
+ case 'e':
+ formatName=getArg(argc,argv,optind);
+ if (!formatName)
+ {
+ err("Error:option -e is missing format specifier rtf.\n");
+ exit(1);
+ }
+ if (stricmp(formatName,"rtf")==0)
+ {
+ if (optind+1>=argc)
+ {
+ err("Error: option \"-e rtf\" is missing an extensions file name\n");
+ exit(1);
+ }
+ QFile f;
+ if (openOutputFile(argv[optind+1],f))
+ {
+ RTFGenerator::writeExtensionsFile(f);
+ }
+ exit(1);
+ }
+ err("Error: option \"-e\" has invalid format specifier.\n");
+ exit(1);
+ break;
case 'w':
formatName=getArg(argc,argv,optind);
if (!formatName)
@@ -5982,7 +6027,12 @@ void parseInput()
s=Config::inputSources.first();
while (s)
{
- inputSize+=readFileOrDirectory(s,&Doxygen::inputNameList,
+ QCString path=s;
+ uint l = path.length();
+ // strip trailing slashes
+ if (path.at(l-1)=='\\' || path.at(l-1)=='/') path=path.left(l-1);
+
+ inputSize+=readFileOrDirectory(path,&Doxygen::inputNameList,
Doxygen::inputNameDict,&excludeNameDict,
&Config::filePatternList,
&Config::excludePatternList,
@@ -6108,6 +6158,7 @@ void parseInput()
msg("Building group list...\n");
buildGroupList(root);
+ organizeSubGroups(root);
msg("Building namespace list...\n");
buildNamespaceList(root);
diff --git a/src/filedef.cpp b/src/filedef.cpp
index f737fb6..59a9d61 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -668,10 +668,11 @@ void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,bool local
bool FileDef::generateSourceFile() const
{
+ QCString extension = name().right(4);
return !isReference() &&
(Config::sourceBrowseFlag ||
(Config::verbatimHeaderFlag && guessSection(name())==Entry::HEADER_SEC)
) &&
- name().right(4)!=".doc" && name().right(4)!=".txt";
+ extension!=".doc" && extension!=".txt" && extension!=".dox";
}
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 9b0e840..ebdec58 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -38,6 +38,7 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) :
fileList = new FileList;
classList = new ClassList;
groupList = new GroupList;
+ parentGroupList = new GroupList;
namespaceList = new NamespaceList;
pageDict = new PageSDict(257);
exampleDict = new PageSDict(257);
@@ -63,6 +64,7 @@ GroupDef::~GroupDef()
delete fileList;
delete classList;
delete groupList;
+ delete parentGroupList;
delete namespaceList;
delete pageDict;
delete exampleDict;
@@ -242,6 +244,20 @@ void GroupDef::addGroup(const GroupDef *def)
groupList->append(def);
}
+void GroupDef::addParentGroup(const GroupDef *def)
+{
+ if (Config::sortMembersFlag)
+ parentGroupList->inSort(def);
+ else
+ parentGroupList->append(def);
+}
+
+bool GroupDef::isASubGroup() const
+{
+ return parentGroupList->count()!=0;
+}
+
+
int GroupDef::countMembers() const
{
return fileList->count()+
@@ -569,6 +585,7 @@ void addGroupToGroups(Entry *root,GroupDef *subGroup)
if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
{
gd->addGroup(subGroup);
+ subGroup->addParentGroup(gd);
}
}
}
diff --git a/src/groupdef.h b/src/groupdef.h
index 4c87efc..31c8259 100644
--- a/src/groupdef.h
+++ b/src/groupdef.h
@@ -52,6 +52,7 @@ class GroupDef : public Definition
void addClass(const ClassDef *def);
void addNamespace(const NamespaceDef *def);
void addGroup(const GroupDef *def);
+ void addParentGroup(const GroupDef *def);
void addPage(PageInfo *def); // pages in this group
void addExample(const PageInfo *def); // examples in this group
void insertMember(MemberDef *def);
@@ -65,6 +66,7 @@ class GroupDef : public Definition
{
return isLinkableInProject() || isReference();
}
+ bool isASubGroup() const;
void computeAnchors();
void addMembersToMemberGroup();
@@ -72,7 +74,8 @@ class GroupDef : public Definition
bool visited; // number of times accessed for output - KPW
- friend void writeGroupTreeNode(OutputList&, GroupDef*); // make accessible for writing tree view of group in index.cpp - KPW
+ friend void writeGroupTreeNode(OutputList&, GroupDef*,bool);
+ // make accessible for writing tree view of group in index.cpp - KPW
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
@@ -84,6 +87,7 @@ class GroupDef : public Definition
ClassList *classList; // list of classes in the group
NamespaceList *namespaceList; // list of namespaces in the group
GroupList *groupList; // list of sub groups.
+ GroupList *parentGroupList; // list of parent groups.
PageSDict *pageDict; // list of pages in the group
PageSDict *exampleDict; // list of examples in the group
diff --git a/src/index.cpp b/src/index.cpp
index f11fb3f..83495b8 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -2122,7 +2122,7 @@ void writeGraphInfo(OutputList &ol)
* \author KPW
*/
-void writeGroupTreeNode(OutputList &ol, GroupDef *gd)
+void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel)
{
HtmlHelp *htmlHelp=0;
FTVHelp *ftvHelp = 0;
@@ -2139,7 +2139,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd)
GroupDef *subgd = 0;
GroupListIterator gli(*gd->groupList);
- if (!gd->visited)
+ if (!gd->visited && (!gd->isASubGroup() || subLevel))
{
//printf("gd->name()=%s #members=%d\n",gd->name().data(),gd->countMembers());
// write group info
@@ -2200,7 +2200,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd)
ol.startIndexList();
for (gli.toLast();(subgd=gli.current());--gli)
{
- writeGroupTreeNode(ol,subgd);
+ writeGroupTreeNode(ol,subgd,TRUE);
}
ol.endIndexList();
}
@@ -2403,7 +2403,7 @@ void writeGroupHierarchy(OutputList &ol)
GroupDef *gd;
for (;(gd=gli.current());++gli)
{
- writeGroupTreeNode(ol,gd);
+ writeGroupTreeNode(ol,gd,FALSE);
}
ol.endIndexList();
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 1756970..8ccf62b 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1432,7 +1432,7 @@ bool MemberDef::isLinkable()
bool MemberDef::detailsAreVisible() const
{
return !documentation().isEmpty() || // has detailed docs
- //(Config::sourceBrowseFlag && startBodyLine!=-1 && bodyDef) || // has reference to sources
+ //((Config::sourceBrowseFlag || Config::inlineSourceFlag) && startBodyLine!=-1 && bodyDef) || // has reference to sources
(mtype==Enumeration && docEnumValues) || // has enum values
(mtype==EnumValue && !briefDescription().isEmpty()) || // is doc enum value
(!briefDescription().isEmpty() &&
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index efae422..9b9196f 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -46,6 +46,16 @@ struct ListItemInfo
};
static ListItemInfo listItemInfo[indentLevels];
+static QCString title;
+static QCString subject;
+static QCString comments;
+static QCString company;
+static QCString logoFilename;
+static QCString author;
+static QCString manager;
+static QCString documentType;
+static QCString documentId;
+static QCString keywords;
// it is undocumented as far as I know, but
// "."'s in a bookmarkname are converted to "_"'s
@@ -582,6 +592,102 @@ static void loadStylesheet(const char *name, QDict<StyleData>& dict)
static QDict<StyleData> Rtf_Style(257);
+
+void RTFGenerator::writeExtensionsFile(QFile &file)
+{
+ QTextStream t(&file);
+ t << "# Generated by doxygen " << versionString << "\n\n";
+ t << "# This file describes extensions used for generating RTF output.\n";
+ t << "# All text after a hash (#) is considered a comment and will be ignored.\n";
+ t << "# Remove a hash to activate a line.\n\n";
+
+ t << "# Overrides the project title.\n";
+
+ t << "#Title = \n\n";
+
+ t << "# Name of the company that produced this document.\n";
+ t << "#Company = \n\n";
+
+ t << "# Filename of a company or project logo.\n";
+ t << "#LogoFilename = \n\n";
+
+ t << "# Author of the document.\n";
+ t << "#Author = \n\n";
+
+ t << "# Type of document (e.g. Design Specification, User Manual, etc.).\n";
+ t << "#DocumentType = \n\n";
+
+ t << "# Document tracking number.\n";
+ t << "#DocumentId = \n\n";
+
+ t << "# Name of the author's manager.\n";
+ t << "# This field is not displayed in the document itself, but it is \n";
+ t << "# available in the information block of the rtf file. In Microsoft \n";
+ t << "# Word, it is available under File:Properties.\n";
+ t << "#Manager = \n\n";
+
+ t << "# Subject of the document.\n";
+ t << "# This field is not displayed in the document itself, but it is \n";
+ t << "# available in the information block of the rtf file. In Microsoft \n";
+ t << "# Word, it is available under File:Properties.\n";
+ t << "#Subject = \n\n";
+
+ t << "# Comments regarding the document.\n";
+ t << "# This field is not displayed in the document itself, but it is \n";
+ t << "# available in the information block of the rtf file. In Microsoft \n";
+ t << "# Word, it is available under File:Properties.\n";
+ t << "#Comments = \n\n";
+
+ t << "# Keywords associated with the document.\n";
+ t << "# This field is not displayed in the document itself, but it is \n";
+ t << "# available in the information block of the rtf file. In Microsoft \n";
+ t << "# Word, it is available under File:Properties.\n";
+ t << "#Keywords = \n\n";
+}
+
+static void loadExtensions(const char *name)
+{
+ QFile file(name);
+ if (!file.open(IO_ReadOnly))
+ {
+ err("Can't open RTF extensions file %s. Using defaults.\n",name);
+ return;
+ }
+ msg("Loading RTF extensions %s...\n",name);
+
+ static const QRegExp separator("[ \t]*=[ \t]*");
+ uint lineNr=1;
+ QTextStream t(&file);
+ while (!t.eof())
+ {
+ QCString s(4096); // string buffer of max line length
+ s = t.readLine().stripWhiteSpace();
+ if (s.length()==0 || s.at(0)=='#') continue; // skip blanks & comments
+ int sepLength;
+ int sepStart = separator.match(s,0,&sepLength);
+ if (sepStart<=0) // no valid assignment statement
+ {
+ warn(name,lineNr,"Assignment of extension field expected!\n");
+ continue;
+ }
+ QCString key=s.left(sepStart);
+ QCString data=s.data() + sepStart + sepLength;
+
+ if (key == "Title") title = data.data();
+ if (key == "Subject") subject = data.data();
+ if (key == "Comments") comments = data.data();
+ if (key == "Company") company = data.data();
+ if (key == "LogoFilename") logoFilename = data.data();
+ if (key == "Author") author = data.data();
+ if (key == "Manager") manager = data.data();
+ if (key == "DocumentType") documentType = data.data();
+ if (key == "DocumentId") documentId = data.data();
+ if (key == "Keywords") keywords = data.data();
+ lineNr++;
+ }
+}
+
+
void RTFGenerator::init()
{
QCString dir=Config::rtfOutputDir;
@@ -607,6 +713,12 @@ void RTFGenerator::init()
// overwrite some (or all) definitions from file
if (!Config::rtfStylesheetFile.isEmpty())
loadStylesheet(Config::rtfStylesheetFile, Rtf_Style);
+
+ // If user has defined an extension file, load its contents.
+ if (Config::rtfExtensionsFile)
+ {
+ loadExtensions(Config::rtfExtensionsFile);
+ }
}
static QCString makeIndexName(const char *s,int i)
@@ -768,11 +880,20 @@ void RTFGenerator::startIndexSection(IndexSections is)
case isTitlePageStart:
// basic RTFstart
// get readyfor author etc
+
t << "{\\info \n";
- t << "{\\title ";
+ t << "{\\title {\\comment ";
break;
case isTitlePageAuthor:
- t << "}\n{\\author ";
+ t << "}\n";
+ if (subject) t << "{\\subject " << subject << "}\n";
+ if (comments) t << "{\\comment " << comments << "}\n";
+ if (company) t << "{\\company " << company << "}\n";
+ if (author) t << "{\\author " << author << "}\n";
+ if (manager) t << "{\\manager " << manager << "}\n";
+ if (documentType) t << "{\\category " << documentType << "}\n";
+ if (keywords) t << "{\\keywords " << keywords << "}\n";
+ t << "{\\comment ";
break;
case isMainPage:
//Introduction
@@ -917,29 +1038,64 @@ void RTFGenerator::endIndexSection(IndexSections is)
switch (is)
{
case isTitlePageStart:
+ if (title)
+ // User has overridden document title in extensions file
+ t << "}" << title;
+ else
+ t << "}" << Config::projectName;
break;
case isTitlePageAuthor:
{
- t << " Doxygen}\n"
- "{\\creatim " << dateToRTFDateString() << "}\n"
- "}";
- DBG_RTF(t << "{\\comment end of infoblock}\n")
+ t << "Doxgyen. }\n";
+ t << "{\\creatim " << dateToRTFDateString() << "}\n}";
+ DBG_RTF(t << "{\\comment end of infoblock}\n");
// setup for this section
t << Rtf_Style_Reset <<"\n";
t <<"\\sectd\\pgnlcrm\n";
t <<"{\\footer "<<Rtf_Style["Footer"]->reference << "{\\chpgn}}\n";
// the title entry
DBG_RTF(t << "{\\comment begin title page}\n")
+
+
+ t << Rtf_Style_Reset << Rtf_Style["SubTitle"]->reference << endl; // set to title style
+
+ t << "\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par";
+ if (logoFilename)
+ {
+ t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE " << logoFilename;
+ t << " \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
+ }
+ if (company)
+ {
+ t << company << "\\par\\par\n";
+ }
+
t << Rtf_Style_Reset << Rtf_Style["Title"]->reference << endl; // set to title style
t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt TITLE}}\\par" << endl;
+
+ t << Rtf_Style_Reset << Rtf_Style["SubTitle"]->reference << endl; // set to title style
+ t << "\\par\n";
+ if (documentType)
+ {
+ t << documentType << "\\par\n";
+ }
+ if (documentId)
+ {
+ t << documentId << "\\par\n";
+ }
+ t << "\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\n";
+
t << Rtf_Style_Reset << Rtf_Style["SubTitle"]->reference << endl; // set to subtitle style
t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par" << endl;
+ t << "Version " << Config::projectNumber << "\\par";
t << "{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
"{\\fldrslt CREATEDATE}}\\par"<<endl;
+ t << "\\page\\page";
DBG_RTF(t << "{\\comment End title page}" << endl)
// table of contents section
DBG_RTF(t << "{\\comment Table of contents}\n")
+ t << "\\vertalt\n";
t << Rtf_Style_Reset << endl;
t << "{\\field\\fldedit {\\*\\fldinst TOC \\\\f \\\\*MERGEFORMAT}{\\fldrslt Table of contents}}\\par\n";
t << Rtf_Style_Reset << endl;
@@ -1743,7 +1899,7 @@ void RTFGenerator::endMemberDescription()
endEmphasis();
newParagraph();
decrementIndentLevel();
- t << "}" << endl;
+ t << "\\par}" << endl;
}
void RTFGenerator::startDescList()
@@ -2013,9 +2169,15 @@ void RTFGenerator::endMemberList()
#endif
}
-void RTFGenerator::startImage(const char *,const char *,bool)
+void RTFGenerator::startImage(const char *name,const char *,bool)
{
- // not yet implemented
+ newParagraph();
+ t << "{" << endl;
+ t << Rtf_Style_Reset << endl;
+ t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
+ t << name;
+ t << " \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
+ t << "}" << endl;
}
void RTFGenerator::endImage(bool)
diff --git a/src/rtfgen.h b/src/rtfgen.h
index a40986d..0fda052 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -29,6 +29,7 @@ class RTFGenerator : public OutputGenerator
~RTFGenerator();
static void init();
static void writeStyleSheetFile(QFile &f);
+ static void writeExtensionsFile(QFile &file);
OutputGenerator *copy();
//OutputGenerator *clone() { return new RTFGenerator(*this); }
diff --git a/src/scanner.l b/src/scanner.l
index ab714c5..6cc0da8 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -372,6 +372,7 @@ FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+]
FILEECHAR [a-z_A-Z0-9\-\+]
FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+"\"")
ID [a-z_A-Z][a-z_A-Z0-9]*
+LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
ATTR ({B}+[^>\n]*)?
@@ -3149,13 +3150,13 @@ TITLE [tT][iI][tT][lL][eE]
<SkipCode>. {
*pSkipDoc+=*yytext;
}
-<AnchorLabel>{ID} {
+<AnchorLabel>{LABELID} {
sectionLabel=yytext;
addSection();
current->doc += "\\anchor "+sectionLabel+"\n";
BEGIN(lastAnchorContext);
}
-<SectionLabel>{ID} {
+<SectionLabel>{LABELID} {
sectionLabel=yytext;
sectionTitle.resize(0);
BEGIN(SectionTitle);
diff --git a/src/translator_cz.h b/src/translator_cz.h
index 60fa31f..732d4e1 100644
--- a/src/translator_cz.h
+++ b/src/translator_cz.h
@@ -93,6 +93,11 @@
// 2001/02/26 (Petr Prikryl)
// - Update for "new since 1.2.5" version (trBug(), trBugList()).
//
+// 2001/03/12 (Petr Prikryl)
+// - Minor correction of comments which copied the same
+// corrections in translator.h (doubled backslash) just after
+// 1.2.6 release.
+//
// Notices:
// --------
// The conditional compilation ensures or the neutral functionality
@@ -224,7 +229,7 @@ class TranslatorCzech : public Translator
// quick reference sections
/*! This is put above each page as a link to the list of all groups of
- * compounds or files (see the \group command).
+ * compounds or files (see the \\group command).
*/
virtual QCString trModules()
{ return Decode("Moduly"); }
@@ -534,48 +539,48 @@ class TranslatorCzech : public Translator
return Decode((QCString)"Diagram dědičnosti pro třídu "+clName);
}
- /*! this text is generated when the \internal command is used. */
+ /*! this text is generated when the \\internal command is used. */
virtual QCString trForInternalUseOnly()
{ return Decode("Pouze pro vnitřní použití."); }
- /*! this text is generated when the \reimp command is used. */
+ /*! this text is generated when the \\reimp command is used. */
virtual QCString trReimplementedForInternalReasons()
{ return Decode("Reimplementováno z interních důvodů; "
"aplikační rozhraní zachováno."); }
- /*! this text is generated when the \warning command is used. */
+ /*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return Decode("Pozor"); }
- /*! this text is generated when the \bug command is used. */
+ /*! this text is generated when the \\bug command is used. */
virtual QCString trBugsAndLimitations()
{ return Decode("Chyby a omezení"); }
- /*! this text is generated when the \version command is used. */
+ /*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
{ return Decode("Verze"); }
- /*! this text is generated when the \date command is used. */
+ /*! this text is generated when the \\date command is used. */
virtual QCString trDate()
{ return Decode("Datum"); }
- /*! this text is generated when the \author command is used. */
+ /*! this text is generated when the \\author command is used. */
virtual QCString trAuthors()
{ return Decode("Autor/autoři"); }
- /*! this text is generated when the \return command is used. */
+ /*! this text is generated when the \\return command is used. */
virtual QCString trReturns()
{ return Decode("Návratová hodnota"); }
- /*! this text is generated when the \sa command is used. */
+ /*! this text is generated when the \\sa command is used. */
virtual QCString trSeeAlso()
{ return Decode("Viz také"); }
- /*! this text is generated when the \param command is used. */
+ /*! this text is generated when the \\param command is used. */
virtual QCString trParameters()
{ return Decode("Parametry"); }
- /*! this text is generated when the \exception command is used. */
+ /*! this text is generated when the \\exception command is used. */
virtual QCString trExceptions()
{ return Decode("Výjimky"); }
@@ -1195,7 +1200,7 @@ class TranslatorCzech : public Translator
// new since 1.2.5
//////////////////////////////////////////////////////////////////////////
- /*! Used as a marker that is put before a \bug item */
+ /*! Used as a marker that is put before a \\bug item */
virtual QCString trBug()
{
return Decode("Chyba");