summaryrefslogtreecommitdiffstats
path: root/src/rtfgen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-08-04 20:55:47 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-08-04 20:55:47 (GMT)
commit2e2f09d60ce079a1fe283e47bcf023de01f051c5 (patch)
tree8e54169bc0b7214246ec4c1dfe3f58228ef12928 /src/rtfgen.cpp
parentadac91e9a353095c3bae4b580d27b7cfd8617493 (diff)
downloadDoxygen-2e2f09d60ce079a1fe283e47bcf023de01f051c5.zip
Doxygen-2e2f09d60ce079a1fe283e47bcf023de01f051c5.tar.gz
Doxygen-2e2f09d60ce079a1fe283e47bcf023de01f051c5.tar.bz2
Release-1.2.17-20020804
Diffstat (limited to 'src/rtfgen.cpp')
-rw-r--r--src/rtfgen.cpp38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 7e813f9..0dfb1a4 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -2070,32 +2070,30 @@ void RTFGenerator::endDescList()
}
-void RTFGenerator::startSection(const char *,const char *title,bool sub)
+void RTFGenerator::startSection(const char *,const char *title,SectionInfo::SectionType type)
{
DBG_RTF(t << "{\\comment (startSection)}" << endl)
t << "{";
t<< Rtf_Style_Reset;
- if (sub)
- {
- // set style
- t << Rtf_Style["Heading3"]->reference;
- // make table of contents entry
- t << "{\\tc\\tcl3 \\v ";
- docify(title);
- t << "}" << endl;
- }
- else
- {
- // set style
- t << Rtf_Style["Heading2"]->reference;
- // make table of contents entry
- t << "{\\tc\\tcl2 \\v ";
- docify(title);
- t << "}" << endl;
- }
+ int num=4;
+ switch(type)
+ {
+ case SectionInfo::Page: num=2; break;
+ case SectionInfo::Section: num=3; break;
+ case SectionInfo::Subsection: num=4; break;
+ default: ASSERT(0); break;
+ }
+ QCString heading;
+ heading.sprintf("Heading%d",num);
+ // set style
+ t << Rtf_Style[heading]->reference;
+ // make table of contents entry
+ t << "{\\tc\\tcl" << num << " \\v ";
+ docify(title);
+ t << "}" << endl;
}
-void RTFGenerator::endSection(const char *lab,bool)
+void RTFGenerator::endSection(const char *lab,SectionInfo::SectionType)
{
DBG_RTF(t << "{\\comment (endSection)}" << endl)
newParagraph();