summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2016-12-18 12:38:50 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2016-12-18 12:38:50 (GMT)
commit5e894a760a6584ade2f5417e2577b66c65b51fd9 (patch)
tree23fa6fae3fdce8e09fd724a27fa6a6738fb21c99 /src
parent4474222932c6ff8bea64917ae1fb089a8390b5a8 (diff)
downloadDoxygen-5e894a760a6584ade2f5417e2577b66c65b51fd9.zip
Doxygen-5e894a760a6584ade2f5417e2577b66c65b51fd9.tar.gz
Doxygen-5e894a760a6584ade2f5417e2577b66c65b51fd9.tar.bz2
Made the RTF output honor the PAPER_TYPE option.
Diffstat (limited to 'src')
-rw-r--r--src/rtfgen.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 349d97d..5e8dbd5 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -250,6 +250,27 @@ void RTFGenerator::beginRTFDocument()
t <<"{\\stylesheet\n";
t <<"{\\widctlpar\\adjustright \\fs20\\cgrid \\snext0 Normal;}\n";
+ // set the paper dimensions according to PAPER_TYPE
+ QCString paperName = Config_getEnum(PAPER_TYPE);
+ t << "{";
+ if (paperName=="a4")
+ {
+ t << "\\paperw11900\\paperh16840"; // width & height values are inches * 1440
+ }
+ else if (paperName=="letter")
+ {
+ t << "\\paperw12240\\paperh15840";
+ }
+ else if (paperName=="legal")
+ {
+ t << "\\paperw12240\\paperh20160";
+ }
+ else if (paperName=="executive")
+ {
+ t << "\\paperw10440\\paperh15120";
+ }
+ t << "\\margl1800\\margr1800\\margt1440\\margb1440\\gutter0\\ltrsect}\n";
+
// sort styles ascending by \s-number via an intermediate QArray
QArray<const StyleData*> array(128);
array.fill(0);