Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 149792 - Mainpage title has wrong style in RTF
Set the TITLE as the PROJECT_NAME and the CREATEDATE as the date of creation.
  • Loading branch information
albert-github committed Jun 14, 2015
1 parent f415b62 commit 021dfd4
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/rtfgen.cpp
Expand Up @@ -541,6 +541,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
static QCString projectName = Config_getString("PROJECT_NAME");

switch (is)
{
Expand All @@ -549,7 +550,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
// User has overridden document title in extensions file
t << "}" << rtf_title;
else
t << "}" << Config_getString("PROJECT_NAME");
t << "}" << projectName;
break;
case isTitlePageAuthor:
{
Expand Down Expand Up @@ -578,7 +579,17 @@ void RTFGenerator::endIndexSection(IndexSections is)
}

t << rtf_Style_Reset << rtf_Style["Title"]->reference << endl; // set to title style
t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt TITLE}}\\par" << endl;
if (rtf_title)
// User has overridden document title in extensions file
t << "{\\field\\fldedit {\\*\\fldinst " << rtf_title << " \\\\*MERGEFORMAT}{\\fldrslt " << rtf_title << "}}\\par" << endl;
else
{
DocText *root = validatingParseText(projectName);
t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt ";
writeDoc(root,0,0);
t << "}}\\par" << endl;

}

t << rtf_Style_Reset << rtf_Style["SubTitle"]->reference << endl; // set to title style
t << "\\par\n";
Expand All @@ -596,7 +607,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par" << endl;
t << "Version " << Config_getString("PROJECT_NUMBER") << "\\par";
t << "{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
"{\\fldrslt CREATEDATE}}\\par"<<endl;
"{\\fldrslt "<< dateToString(FALSE) << " }}\\par"<<endl;
t << "\\page\\page";
DBG_RTF(t << "{\\comment End title page}" << endl)

Expand Down

0 comments on commit 021dfd4

Please sign in to comment.