author | Michel Szarindar <Michel.Szarindar@Nokia.com> |
Thu, 18 Mar 2010 18:26:18 +0000 | |
changeset 1 | 82f11024044a |
parent 0 | 42188c7ea2d9 |
child 4 | 468f4c8d3d5b |
permissions | -rw-r--r-- |
0
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1 |
/****************************************************************************** |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
2 |
* |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
3 |
* |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
4 |
* |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
5 |
* |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
6 |
* Copyright (C) 1997-2008 by Dimitri van Heesch. |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
7 |
* |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
8 |
* Permission to use, copy, modify, and distribute this software and its |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
9 |
* documentation under the terms of the GNU General Public License is hereby |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
10 |
* granted. No representations are made about the suitability of this software |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
11 |
* for any purpose. It is provided "as is" without express or implied warranty. |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
12 |
* See the GNU General Public License for more details. |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
13 |
* |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
14 |
* Documents produced by Doxygen are derivative works derived from the |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
15 |
* input used in their production; they are not affected by this license. |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
16 |
* |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
17 |
*/ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
18 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
19 |
#include "rtfdocvisitor.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
20 |
#include "docparser.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
21 |
#include "language.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
22 |
#include "doxygen.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
23 |
#include "outputgen.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
24 |
#include "dot.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
25 |
#include "util.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
26 |
#include "rtfstyle.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
27 |
#include "message.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
28 |
#include <qfileinfo.h> |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
29 |
#include "parserintf.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
30 |
#include "msc.h" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
31 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
32 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
33 |
//#define DBG_RTF(x) m_t << x |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
34 |
#define DBG_RTF(x) do {} while(0) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
35 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
36 |
RTFDocVisitor::RTFDocVisitor(QTextStream &t,CodeOutputInterface &ci, |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
37 |
const char *langExt) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
38 |
: DocVisitor(DocVisitor_RTF), m_t(t), m_ci(ci), m_insidePre(FALSE), |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
39 |
m_hide(FALSE), m_indentLevel(0), m_lastIsPara(FALSE), m_langExt(langExt) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
40 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
41 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
42 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
43 |
QString RTFDocVisitor::getStyle(const char *name) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
44 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
45 |
QString n; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
46 |
n.sprintf("%s%d",name,m_indentLevel); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
47 |
StyleData *sd = rtf_Style[n]; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
48 |
ASSERT(sd!=0); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
49 |
return sd->reference; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
50 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
51 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
52 |
void RTFDocVisitor::incIndentLevel() |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
53 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
54 |
if (m_indentLevel<rtf_maxIndentLevels-1) m_indentLevel++; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
55 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
56 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
57 |
void RTFDocVisitor::decIndentLevel() |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
58 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
59 |
if (m_indentLevel>0) m_indentLevel--; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
60 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
61 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
62 |
//-------------------------------------- |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
63 |
// visitor functions for leaf nodes |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
64 |
//-------------------------------------- |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
65 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
66 |
void RTFDocVisitor::visit(DocWord *w) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
67 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
68 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
69 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocWord)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
70 |
filter(w->word()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
71 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
72 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
73 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
74 |
void RTFDocVisitor::visit(DocLinkedWord *w) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
75 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
76 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
77 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocLinkedWord)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
78 |
startLink(w->ref(),w->file(),w->anchor()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
79 |
filter(w->word()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
80 |
endLink(w->ref()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
81 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
82 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
83 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
84 |
void RTFDocVisitor::visit(DocWhiteSpace *w) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
85 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
86 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
87 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocWhiteSpace)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
88 |
if (m_insidePre) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
89 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
90 |
m_t << w->chars(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
91 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
92 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
93 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
94 |
m_t << " "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
95 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
96 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
97 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
98 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
99 |
void RTFDocVisitor::visit(DocSymbol *s) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
100 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
101 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
102 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocSymbol)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
103 |
switch(s->symbol()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
104 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
105 |
case DocSymbol::BSlash: m_t << "\\\\"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
106 |
case DocSymbol::At: m_t << "@"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
107 |
case DocSymbol::Less: m_t << "<"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
108 |
case DocSymbol::Greater: m_t << ">"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
109 |
case DocSymbol::Amp: m_t << "&"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
110 |
case DocSymbol::Dollar: m_t << "$"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
111 |
case DocSymbol::Hash: m_t << "#"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
112 |
case DocSymbol::Percent: m_t << "%"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
113 |
case DocSymbol::Copy: m_t << "(C)"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
114 |
case DocSymbol::Tm: m_t << "(TM)"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
115 |
case DocSymbol::Reg: m_t << "(R)"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
116 |
case DocSymbol::Apos: m_t << "'"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
117 |
case DocSymbol::Quot: m_t << "\""; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
118 |
case DocSymbol::Lsquo: m_t << "`"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
119 |
case DocSymbol::Rsquo: m_t << "'"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
120 |
case DocSymbol::Ldquo: m_t << "\""; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
121 |
case DocSymbol::Rdquo: m_t << "\""; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
122 |
case DocSymbol::Ndash: m_t << "-"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
123 |
case DocSymbol::Mdash: m_t << "--"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
124 |
case DocSymbol::Uml: switch(s->letter()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
125 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
126 |
case 'A' : m_t << '\304'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
127 |
case 'E' : m_t << '\313'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
128 |
case 'I' : m_t << '\317'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
129 |
case 'O' : m_t << '\326'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
130 |
case 'U' : m_t << '\334'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
131 |
case 'Y' : m_t << 'Y'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
132 |
case 'a' : m_t << '\344'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
133 |
case 'e' : m_t << '\353'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
134 |
case 'i' : m_t << '\357'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
135 |
case 'o' : m_t << '\366'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
136 |
case 'u' : m_t << '\374'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
137 |
case 'y' : m_t << '\377'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
138 |
default: m_t << '?'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
139 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
140 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
141 |
case DocSymbol::Acute: switch(s->letter()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
142 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
143 |
case 'A' : m_t << '\301'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
144 |
case 'E' : m_t << '\311'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
145 |
case 'I' : m_t << '\315'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
146 |
case 'O' : m_t << '\323'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
147 |
case 'U' : m_t << '\332'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
148 |
case 'Y' : m_t << '\335'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
149 |
case 'a' : m_t << '\341'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
150 |
case 'e' : m_t << '\351'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
151 |
case 'i' : m_t << '\355'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
152 |
case 'o' : m_t << '\363'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
153 |
case 'u' : m_t << '\372'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
154 |
case 'y' : m_t << '\375'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
155 |
default: m_t << '?'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
156 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
157 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
158 |
case DocSymbol::Grave: switch(s->letter()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
159 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
160 |
case 'A' : m_t << '\300'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
161 |
case 'E' : m_t << '\310'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
162 |
case 'I' : m_t << '\314'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
163 |
case 'O' : m_t << '\322'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
164 |
case 'U' : m_t << '\331'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
165 |
case 'a' : m_t << '\340'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
166 |
case 'e' : m_t << '\350'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
167 |
case 'i' : m_t << '\354'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
168 |
case 'o' : m_t << '\362'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
169 |
case 'u' : m_t << '\371'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
170 |
default: m_t << '?'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
171 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
172 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
173 |
case DocSymbol::Circ: switch(s->letter()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
174 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
175 |
case 'A' : m_t << '\302'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
176 |
case 'E' : m_t << '\312'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
177 |
case 'I' : m_t << '\316'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
178 |
case 'O' : m_t << '\324'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
179 |
case 'U' : m_t << '\333'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
180 |
case 'a' : m_t << '\342'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
181 |
case 'e' : m_t << '\352'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
182 |
case 'i' : m_t << '\356'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
183 |
case 'o' : m_t << '\364'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
184 |
case 'u' : m_t << '\373'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
185 |
default: m_t << '?'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
186 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
187 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
188 |
case DocSymbol::Tilde: switch(s->letter()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
189 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
190 |
case 'A' : m_t << '\303'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
191 |
case 'N' : m_t << '\321'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
192 |
case 'O' : m_t << '\325'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
193 |
case 'a' : m_t << '\343'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
194 |
case 'n' : m_t << '\361'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
195 |
case 'o' : m_t << '\365'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
196 |
default: m_t << '?'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
197 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
198 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
199 |
case DocSymbol::Cedil: switch(s->letter()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
200 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
201 |
case 'C' : m_t << '\307'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
202 |
case 'c' : m_t << '\347'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
203 |
default: m_t << '?'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
204 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
205 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
206 |
case DocSymbol::Slash: switch(s->letter()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
207 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
208 |
case 'O' : m_t << '\330'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
209 |
case 'o' : m_t << '\370'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
210 |
default: m_t << '?'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
211 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
212 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
213 |
case DocSymbol::Ring: switch(s->letter()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
214 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
215 |
case 'A' : m_t << '\305'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
216 |
case 'a' : m_t << '\345'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
217 |
default: m_t << '?'; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
218 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
219 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
220 |
case DocSymbol::Szlig: m_t << "\337"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
221 |
case DocSymbol::Nbsp: m_t << "\\~ "; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
222 |
case DocSymbol::Aelig: m_t << "\346"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
223 |
case DocSymbol::AElig: m_t << "\306"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
224 |
default: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
225 |
err("Error: unknown symbol found\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
226 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
227 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
228 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
229 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
230 |
void RTFDocVisitor::visit(DocURL *u) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
231 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
232 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
233 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocURL)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
234 |
if (Config_getBool("RTF_HYPERLINKS")) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
235 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
236 |
m_t << "{\\field " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
237 |
"{\\*\\fldinst " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
238 |
"{ HYPERLINK \\\\l \""; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
239 |
if (u->isEmail()) m_t << "mailto:"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
240 |
m_t << u->url(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
241 |
m_t << "\" }" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
242 |
"{}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
243 |
m_t << "}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
244 |
"{\\fldrslt " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
245 |
"{\\cs37\\ul\\cf2 "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
246 |
filter(u->url()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
247 |
m_t << "}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
248 |
"}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
249 |
"}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
250 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
251 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
252 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
253 |
m_t << "{\\f2 "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
254 |
filter(u->url()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
255 |
m_t << "}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
256 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
257 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
258 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
259 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
260 |
void RTFDocVisitor::visit(DocLineBreak *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
261 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
262 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
263 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocLineBreak)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
264 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
265 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
266 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
267 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
268 |
void RTFDocVisitor::visit(DocHorRuler *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
269 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
270 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
271 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocHorRuler)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
272 |
m_t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
273 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
274 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
275 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
276 |
void RTFDocVisitor::visit(DocStyleChange *s) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
277 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
278 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
279 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
280 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocStyleChange)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
281 |
switch (s->style()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
282 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
283 |
case DocStyleChange::Bold: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
284 |
if (s->enable()) m_t << "{\\b "; else m_t << "} "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
285 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
286 |
case DocStyleChange::Italic: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
287 |
if (s->enable()) m_t << "{\\i "; else m_t << "} "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
288 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
289 |
case DocStyleChange::Code: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
290 |
if (s->enable()) m_t << "{\\f2 "; else m_t << "} "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
291 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
292 |
case DocStyleChange::Subscript: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
293 |
if (s->enable()) m_t << "{\\sub "; else m_t << "} "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
294 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
295 |
case DocStyleChange::Superscript: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
296 |
if (s->enable()) m_t << "{\\super "; else m_t << "} "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
297 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
298 |
case DocStyleChange::Center: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
299 |
if (s->enable()) m_t << "{\\qc "; else m_t << "} "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
300 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
301 |
case DocStyleChange::Small: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
302 |
if (s->enable()) m_t << "{\\sub "; else m_t << "} "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
303 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
304 |
case DocStyleChange::Preformatted: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
305 |
if (s->enable()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
306 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
307 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
308 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
309 |
m_t << rtf_Style_Reset << getStyle("CodeExample"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
310 |
m_insidePre=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
311 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
312 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
313 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
314 |
m_insidePre=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
315 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
316 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
317 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
318 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
319 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
320 |
case DocStyleChange::Div: /* HTML only */ break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
321 |
case DocStyleChange::Span: /* HTML only */ break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
322 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
323 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
324 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
325 |
void RTFDocVisitor::visit(DocVerbatim *s) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
326 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
327 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
328 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocVerbatim)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
329 |
switch(s->type()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
330 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
331 |
case DocVerbatim::Code: // fall though |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
332 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
333 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
334 |
m_t << rtf_Style_Reset << getStyle("CodeExample"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
335 |
Doxygen::parserManager->getParser(m_langExt) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
336 |
->parseCode(m_ci,s->context(),s->text().latin1(), |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
337 |
s->isExample(),s->exampleFile()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
338 |
//m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
339 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
340 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
341 |
case DocVerbatim::Verbatim: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
342 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
343 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
344 |
m_t << rtf_Style_Reset << getStyle("CodeExample"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
345 |
filter(s->text(),TRUE); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
346 |
//m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
347 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
348 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
349 |
case DocVerbatim::HtmlOnly: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
350 |
case DocVerbatim::LatexOnly: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
351 |
case DocVerbatim::XmlOnly: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
352 |
case DocVerbatim::ManOnly: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
353 |
/* nothing */ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
354 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
355 |
case DocVerbatim::Dot: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
356 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
357 |
static int dotindex = 1; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
358 |
QCString fileName(4096); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
359 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
360 |
fileName.sprintf("%s%d%s", |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
361 |
(Config_getString("RTF_OUTPUT")+"/inline_dotgraph_").data(), |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
362 |
dotindex++, |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
363 |
".dot" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
364 |
); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
365 |
QFile file(fileName); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
366 |
if (!file.open(IO_WriteOnly)) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
367 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
368 |
err("Could not open file %s for writing\n",fileName.data()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
369 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
370 |
file.writeBlock( s->text(), s->text().length() ); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
371 |
file.close(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
372 |
m_t << "\\par{\\qc "; // center picture |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
373 |
writeDotFile(fileName); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
374 |
m_t << "} "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
375 |
if (Config_getBool("DOT_CLEANUP")) file.remove(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
376 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
377 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
378 |
case DocVerbatim::Msc: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
379 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
380 |
static int mscindex = 1; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
381 |
QCString baseName(4096); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
382 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
383 |
baseName.sprintf("%s%d", |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
384 |
(Config_getString("RTF_OUTPUT")+"/inline_mscgraph_").data(), |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
385 |
mscindex++ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
386 |
); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
387 |
QFile file(baseName+".msc"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
388 |
if (!file.open(IO_WriteOnly)) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
389 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
390 |
err("Could not open file %s for writing\n",baseName.data()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
391 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
392 |
QCString text = "msc {"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
393 |
text+=s->text(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
394 |
text+="}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
395 |
file.writeBlock( text, text.length() ); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
396 |
file.close(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
397 |
m_t << "\\par{\\qc "; // center picture |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
398 |
writeMscFile(baseName); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
399 |
m_t << "} "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
400 |
if (Config_getBool("DOT_CLEANUP")) file.remove(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
401 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
402 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
403 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
404 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
405 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
406 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
407 |
void RTFDocVisitor::visit(DocAnchor *anc) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
408 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
409 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
410 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocAnchor)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
411 |
QString anchor; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
412 |
if (!anc->file().isEmpty()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
413 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
414 |
anchor+=anc->file(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
415 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
416 |
if (!anc->file().isEmpty() && !anc->anchor().isEmpty()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
417 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
418 |
anchor+="_"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
419 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
420 |
if (!anc->anchor().isEmpty()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
421 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
422 |
anchor+=anc->anchor(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
423 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
424 |
m_t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
425 |
m_t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
426 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
427 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
428 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
429 |
void RTFDocVisitor::visit(DocInclude *inc) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
430 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
431 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
432 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocInclude)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
433 |
switch(inc->type()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
434 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
435 |
case DocInclude::IncWithLines: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
436 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
437 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
438 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
439 |
m_t << rtf_Style_Reset << getStyle("CodeExample"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
440 |
QFileInfo cfi( inc->file() ); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
441 |
FileDef fd( cfi.dirPath(), cfi.fileName() ); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
442 |
Doxygen::parserManager->getParser(inc->extension()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
443 |
->parseCode(m_ci,inc->context(), |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
444 |
inc->text().latin1(), |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
445 |
inc->isExample(), |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
446 |
inc->exampleFile(), &fd); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
447 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
448 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
449 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
450 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
451 |
case DocInclude::Include: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
452 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
453 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
454 |
m_t << rtf_Style_Reset << getStyle("CodeExample"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
455 |
Doxygen::parserManager->getParser(inc->extension()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
456 |
->parseCode(m_ci,inc->context(), |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
457 |
inc->text().latin1(),inc->isExample(), |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
458 |
inc->exampleFile()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
459 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
460 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
461 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
462 |
case DocInclude::DontInclude: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
463 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
464 |
case DocInclude::HtmlInclude: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
465 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
466 |
case DocInclude::VerbInclude: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
467 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
468 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
469 |
m_t << rtf_Style_Reset << getStyle("CodeExample"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
470 |
filter(inc->text()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
471 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
472 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
473 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
474 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
475 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
476 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
477 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
478 |
void RTFDocVisitor::visit(DocIncOperator *op) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
479 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
480 |
//printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n", |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
481 |
// op->type(),op->isFirst(),op->isLast(),op->text().data()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
482 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocIncOperator)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
483 |
if (op->isFirst()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
484 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
485 |
if (!m_hide) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
486 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
487 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
488 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
489 |
m_t << rtf_Style_Reset << getStyle("CodeExample"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
490 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
491 |
pushEnabled(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
492 |
m_hide = TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
493 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
494 |
if (op->type()!=DocIncOperator::Skip) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
495 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
496 |
popEnabled(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
497 |
if (!m_hide) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
498 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
499 |
Doxygen::parserManager->getParser(m_langExt) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
500 |
->parseCode(m_ci,op->context(),op->text().latin1(), |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
501 |
op->isExample(),op->exampleFile()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
502 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
503 |
pushEnabled(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
504 |
m_hide=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
505 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
506 |
if (op->isLast()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
507 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
508 |
popEnabled(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
509 |
if (!m_hide) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
510 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
511 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
512 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
513 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
514 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
515 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
516 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
517 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
518 |
if (!m_hide) m_t << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
519 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
520 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
521 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
522 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
523 |
void RTFDocVisitor::visit(DocFormula *f) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
524 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
525 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
526 |
// TODO: do something sensible here, like including a bitmap |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
527 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocFormula)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
528 |
m_t << f->text(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
529 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
530 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
531 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
532 |
void RTFDocVisitor::visit(DocIndexEntry *i) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
533 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
534 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
535 |
DBG_RTF("{\\comment RTFDocVisitor::visit(DocIndexEntry)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
536 |
m_t << "{\\xe \\v " << i->entry() << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
537 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
538 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
539 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
540 |
void RTFDocVisitor::visit(DocSimpleSectSep *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
541 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
542 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
543 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
544 |
//-------------------------------------- |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
545 |
// visitor functions for compound nodes |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
546 |
//-------------------------------------- |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
547 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
548 |
void RTFDocVisitor::visitPre(DocAutoList *l) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
549 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
550 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
551 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoList)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
552 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
553 |
rtf_listItemInfo[m_indentLevel].isEnum = l->isEnumList(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
554 |
rtf_listItemInfo[m_indentLevel].number = 1; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
555 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
556 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
557 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
558 |
void RTFDocVisitor::visitPost(DocAutoList *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
559 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
560 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
561 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoList)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
562 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
563 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
564 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
565 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
566 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
567 |
void RTFDocVisitor::visitPre(DocAutoListItem *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
568 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
569 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
570 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoListItem)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
571 |
if (!m_lastIsPara) m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
572 |
m_t << rtf_Style_Reset; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
573 |
if (rtf_listItemInfo[m_indentLevel].isEnum) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
574 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
575 |
m_t << getStyle("ListEnum") << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
576 |
m_t << rtf_listItemInfo[m_indentLevel].number << ".\\tab "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
577 |
rtf_listItemInfo[m_indentLevel].number++; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
578 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
579 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
580 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
581 |
m_t << getStyle("ListBullet") << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
582 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
583 |
incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
584 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
585 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
586 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
587 |
void RTFDocVisitor::visitPost(DocAutoListItem *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
588 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
589 |
decIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
590 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoListItem)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
591 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
592 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
593 |
void RTFDocVisitor::visitPre(DocPara *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
594 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
595 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
596 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
597 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
598 |
void RTFDocVisitor::visitPost(DocPara *p) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
599 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
600 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
601 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
602 |
if (!m_lastIsPara && |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
603 |
!p->isLast() && // omit <p> for last paragraph |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
604 |
!(p->parent() && // and for parameters & sections |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
605 |
p->parent()->kind()==DocNode::Kind_ParamSect |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
606 |
) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
607 |
) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
608 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
609 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
610 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
611 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
612 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
613 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
614 |
void RTFDocVisitor::visitPre(DocRoot *r) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
615 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
616 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
617 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRoot)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
618 |
if (r->indent()) incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
619 |
m_t << "{" << rtf_Style["BodyText"]->reference << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
620 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
621 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
622 |
void RTFDocVisitor::visitPost(DocRoot *r) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
623 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
624 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
625 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRoot)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
626 |
if (!m_lastIsPara && !r->singleLine()) m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
627 |
m_t << "}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
628 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
629 |
if (r->indent()) decIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
630 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
631 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
632 |
void RTFDocVisitor::visitPre(DocSimpleSect *s) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
633 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
634 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
635 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
636 |
if (!m_lastIsPara) m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
637 |
m_t << "{"; // start desc |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
638 |
//m_t << "{\\b "; // start bold |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
639 |
m_t << "{" << rtf_Style["Heading5"]->reference << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
640 |
switch(s->type()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
641 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
642 |
case DocSimpleSect::See: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
643 |
m_t << theTranslator->trSeeAlso(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
644 |
case DocSimpleSect::Return: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
645 |
m_t << theTranslator->trReturns(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
646 |
case DocSimpleSect::Author: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
647 |
m_t << theTranslator->trAuthor(TRUE,TRUE); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
648 |
case DocSimpleSect::Authors: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
649 |
m_t << theTranslator->trAuthor(TRUE,FALSE); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
650 |
case DocSimpleSect::Version: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
651 |
m_t << theTranslator->trVersion(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
652 |
case DocSimpleSect::Since: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
653 |
m_t << theTranslator->trSince(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
654 |
case DocSimpleSect::Date: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
655 |
m_t << theTranslator->trDate(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
656 |
case DocSimpleSect::Note: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
657 |
m_t << theTranslator->trNote(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
658 |
case DocSimpleSect::Warning: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
659 |
m_t << theTranslator->trWarning(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
660 |
case DocSimpleSect::Pre: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
661 |
m_t << theTranslator->trPrecondition(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
662 |
case DocSimpleSect::Post: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
663 |
m_t << theTranslator->trPostcondition(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
664 |
case DocSimpleSect::Invar: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
665 |
m_t << theTranslator->trInvariant(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
666 |
case DocSimpleSect::Remark: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
667 |
m_t << theTranslator->trRemarks(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
668 |
case DocSimpleSect::Attention: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
669 |
m_t << theTranslator->trAttention(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
670 |
case DocSimpleSect::User: break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
671 |
case DocSimpleSect::Rcs: break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
672 |
case DocSimpleSect::Unknown: break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
673 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
674 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
675 |
// special case 1: user defined title |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
676 |
if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
677 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
678 |
m_t << ":"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
679 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
680 |
m_t << "}"; // end bold |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
681 |
incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
682 |
m_t << rtf_Style_Reset << getStyle("DescContinue"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
683 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
684 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
685 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
686 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
687 |
void RTFDocVisitor::visitPost(DocSimpleSect *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
688 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
689 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
690 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
691 |
if (!m_lastIsPara) m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
692 |
decIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
693 |
m_t << "}"; // end desc |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
694 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
695 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
696 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
697 |
void RTFDocVisitor::visitPre(DocTitle *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
698 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
699 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocTitle)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
700 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
701 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
702 |
void RTFDocVisitor::visitPost(DocTitle *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
703 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
704 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
705 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocTitle)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
706 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
707 |
m_t << "}"; // end bold |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
708 |
incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
709 |
m_t << rtf_Style_Reset << getStyle("DescContinue"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
710 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
711 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
712 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
713 |
void RTFDocVisitor::visitPre(DocSimpleList *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
714 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
715 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
716 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
717 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
718 |
rtf_listItemInfo[m_indentLevel].isEnum = FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
719 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
720 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
721 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
722 |
void RTFDocVisitor::visitPost(DocSimpleList *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
723 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
724 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
725 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
726 |
if (!m_lastIsPara) m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
727 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
728 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
729 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
730 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
731 |
void RTFDocVisitor::visitPre(DocSimpleListItem *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
732 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
733 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
734 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleListItem)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
735 |
m_t << "\\par" << rtf_Style_Reset << getStyle("ListBullet") << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
736 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
737 |
incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
738 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
739 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
740 |
void RTFDocVisitor::visitPost(DocSimpleListItem *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
741 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
742 |
decIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
743 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleListItem)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
744 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
745 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
746 |
void RTFDocVisitor::visitPre(DocSection *s) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
747 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
748 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
749 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSection)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
750 |
if (!m_lastIsPara) m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
751 |
m_t << "{{" // start section |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
752 |
<< rtf_Style_Reset; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
753 |
QString heading; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
754 |
int level = QMIN(s->level()+1,4); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
755 |
heading.sprintf("Heading%d",level); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
756 |
// set style |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
757 |
m_t << rtf_Style[heading]->reference << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
758 |
// make table of contents entry |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
759 |
filter(s->title()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
760 |
m_t << endl << "\\par" << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
761 |
m_t << "{\\tc\\tcl" << level << " \\v "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
762 |
filter(s->title()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
763 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
764 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
765 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
766 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
767 |
void RTFDocVisitor::visitPost(DocSection *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
768 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
769 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
770 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSection)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
771 |
m_t << "\\par}" << endl; // end section |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
772 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
773 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
774 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
775 |
void RTFDocVisitor::visitPre(DocHtmlList *l) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
776 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
777 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
778 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlList)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
779 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
780 |
rtf_listItemInfo[m_indentLevel].isEnum = l->type()==DocHtmlList::Ordered; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
781 |
rtf_listItemInfo[m_indentLevel].number = 1; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
782 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
783 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
784 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
785 |
void RTFDocVisitor::visitPost(DocHtmlList *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
786 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
787 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
788 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlList)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
789 |
m_t << "\\par" << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
790 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
791 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
792 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
793 |
void RTFDocVisitor::visitPre(DocHtmlListItem *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
794 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
795 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
796 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlListItem)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
797 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
798 |
m_t << rtf_Style_Reset; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
799 |
if (rtf_listItemInfo[m_indentLevel].isEnum) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
800 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
801 |
m_t << getStyle("ListEnum") << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
802 |
m_t << rtf_listItemInfo[m_indentLevel].number << ".\\tab "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
803 |
rtf_listItemInfo[m_indentLevel].number++; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
804 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
805 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
806 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
807 |
m_t << getStyle("ListBullet") << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
808 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
809 |
incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
810 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
811 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
812 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
813 |
void RTFDocVisitor::visitPost(DocHtmlListItem *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
814 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
815 |
decIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
816 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlListItem)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
817 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
818 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
819 |
void RTFDocVisitor::visitPre(DocHtmlDescList *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
820 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
821 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
822 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescList)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
823 |
//m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
824 |
//m_t << rtf_Style_Reset << getStyle("ListContinue"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
825 |
//m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
826 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
827 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
828 |
void RTFDocVisitor::visitPost(DocHtmlDescList *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
829 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
830 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
831 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescList)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
832 |
//m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
833 |
//m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
834 |
//m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
835 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
836 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
837 |
void RTFDocVisitor::visitPre(DocHtmlDescTitle *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
838 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
839 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
840 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescTitle)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
841 |
//m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
842 |
//m_t << "{\\b "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
843 |
m_t << "{" << rtf_Style["Heading5"]->reference << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
844 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
845 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
846 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
847 |
void RTFDocVisitor::visitPost(DocHtmlDescTitle *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
848 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
849 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
850 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescTitle)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
851 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
852 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
853 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
854 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
855 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
856 |
void RTFDocVisitor::visitPre(DocHtmlDescData *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
857 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
858 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
859 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescData)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
860 |
incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
861 |
m_t << "{" << rtf_Style_Reset << getStyle("DescContinue"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
862 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
863 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
864 |
void RTFDocVisitor::visitPost(DocHtmlDescData *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
865 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
866 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
867 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescData)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
868 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
869 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
870 |
decIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
871 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
872 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
873 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
874 |
void RTFDocVisitor::visitPre(DocHtmlTable *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
875 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
876 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
877 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlTable)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
878 |
if (!m_lastIsPara) m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
879 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
880 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
881 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
882 |
void RTFDocVisitor::visitPost(DocHtmlTable *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
883 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
884 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
885 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlTable)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
886 |
m_t << "\\pard" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
887 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
888 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
889 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
890 |
void RTFDocVisitor::visitPre(DocHtmlCaption *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
891 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
892 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlCaption)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
893 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
894 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
895 |
void RTFDocVisitor::visitPost(DocHtmlCaption *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
896 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
897 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCaption)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
898 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
899 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
900 |
void RTFDocVisitor::visitPre(DocHtmlRow *r) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
901 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
902 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
903 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlRow)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
904 |
uint i,columnWidth=r->numCells()>0 ? rtf_pageWidth/r->numCells() : 10; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
905 |
m_t << "\\trowd \\trgaph108\\trleft-108" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
906 |
"\\trbrdrt\\brdrs\\brdrw10 " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
907 |
"\\trbrdrl\\brdrs\\brdrw10 " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
908 |
"\\trbrdrb\\brdrs\\brdrw10 " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
909 |
"\\trbrdrr\\brdrs\\brdrw10 " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
910 |
"\\trbrdrh\\brdrs\\brdrw10 " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
911 |
"\\trbrdrv\\brdrs\\brdrw10 "<< endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
912 |
for (i=0;i<r->numCells();i++) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
913 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
914 |
m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
915 |
"\\clbrdrl\\brdrs\\brdrw10 " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
916 |
"\\clbrdrb\\brdrs\\brdrw10 " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
917 |
"\\clbrdrr \\brdrs\\brdrw10 " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
918 |
"\\cltxlrtb " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
919 |
"\\cellx" << ((i+1)*columnWidth) << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
920 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
921 |
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
922 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
923 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
924 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
925 |
void RTFDocVisitor::visitPost(DocHtmlRow *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
926 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
927 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
928 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlRow)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
929 |
m_t << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
930 |
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
931 |
m_t << "{\\row }" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
932 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
933 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
934 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
935 |
void RTFDocVisitor::visitPre(DocHtmlCell *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
936 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
937 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
938 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlCell)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
939 |
m_t << "{"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
940 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
941 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
942 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
943 |
void RTFDocVisitor::visitPost(DocHtmlCell *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
944 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
945 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
946 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCell)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
947 |
m_t << "\\cell }"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
948 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
949 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
950 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
951 |
void RTFDocVisitor::visitPre(DocInternal *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
952 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
953 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
954 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternal)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
955 |
m_t << "{"; // start desc |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
956 |
m_t << "{\\b "; // start bold |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
957 |
m_t << theTranslator->trForInternalUseOnly(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
958 |
m_t << "}"; // end bold |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
959 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
960 |
incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
961 |
m_t << rtf_Style_Reset << getStyle("DescContinue"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
962 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
963 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
964 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
965 |
void RTFDocVisitor::visitPost(DocInternal *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
966 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
967 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
968 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternal)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
969 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
970 |
decIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
971 |
m_t << "}"; // end desc |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
972 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
973 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
974 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
975 |
void RTFDocVisitor::visitPre(DocHRef *href) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
976 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
977 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
978 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHRef)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
979 |
if (Config_getBool("RTF_HYPERLINKS")) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
980 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
981 |
m_t << "{\\field " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
982 |
"{\\*\\fldinst " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
983 |
"{ HYPERLINK \\\\l \"" << href->url() << "\" " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
984 |
"}{}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
985 |
"}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
986 |
"{\\fldrslt " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
987 |
"{\\cs37\\ul\\cf2 "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
988 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
989 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
990 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
991 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
992 |
m_t << "{\\f2 "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
993 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
994 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
995 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
996 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
997 |
void RTFDocVisitor::visitPost(DocHRef *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
998 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
999 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1000 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHRef)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1001 |
if (Config_getBool("RTF_HYPERLINKS")) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1002 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1003 |
m_t << "}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1004 |
"}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1005 |
"}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1006 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1007 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1008 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1009 |
m_t << "}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1010 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1011 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1012 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1013 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1014 |
void RTFDocVisitor::visitPre(DocHtmlHeader *header) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1015 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1016 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1017 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlHeader)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1018 |
m_t << "{" // start section |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1019 |
<< rtf_Style_Reset; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1020 |
QString heading; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1021 |
int level = QMIN(header->level()+2,4); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1022 |
heading.sprintf("Heading%d",level); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1023 |
// set style |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1024 |
m_t << rtf_Style[heading]->reference; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1025 |
// make table of contents entry |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1026 |
m_t << "{\\tc\\tcl \\v " << level << "}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1027 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1028 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1029 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1030 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1031 |
void RTFDocVisitor::visitPost(DocHtmlHeader *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1032 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1033 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1034 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlHeader)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1035 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1036 |
m_t << "}" << endl; // end section |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1037 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1038 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1039 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1040 |
void RTFDocVisitor::visitPre(DocImage *img) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1041 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1042 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocImage)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1043 |
if (img->type()==DocImage::Rtf) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1044 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1045 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1046 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1047 |
m_t << rtf_Style_Reset << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1048 |
m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1049 |
m_t << img->name(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1050 |
m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1051 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1052 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1053 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1054 |
else // other format -> skip |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1055 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1056 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1057 |
// hide caption since it is not supported at the moment |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1058 |
pushEnabled(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1059 |
m_hide=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1060 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1061 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1062 |
void RTFDocVisitor::visitPost(DocImage *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1063 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1064 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocImage)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1065 |
popEnabled(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1066 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1067 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1068 |
void RTFDocVisitor::visitPre(DocDotFile *df) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1069 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1070 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocDotFile)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1071 |
writeDotFile(df->file()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1072 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1073 |
// hide caption since it is not supported at the moment |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1074 |
pushEnabled(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1075 |
m_hide=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1076 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1077 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1078 |
void RTFDocVisitor::visitPost(DocDotFile *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1079 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1080 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocDotFile)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1081 |
popEnabled(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1082 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1083 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1084 |
void RTFDocVisitor::visitPre(DocLink *lnk) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1085 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1086 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1087 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocLink)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1088 |
startLink(lnk->ref(),lnk->file(),lnk->anchor()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1089 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1090 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1091 |
void RTFDocVisitor::visitPost(DocLink *lnk) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1092 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1093 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1094 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocLink)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1095 |
endLink(lnk->ref()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1096 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1097 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1098 |
void RTFDocVisitor::visitPre(DocRef *ref) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1099 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1100 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1101 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRef)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1102 |
if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1103 |
if (!ref->hasLinkText()) filter(ref->targetTitle()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1104 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1105 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1106 |
void RTFDocVisitor::visitPost(DocRef *ref) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1107 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1108 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1109 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRef)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1110 |
if (!ref->file().isEmpty()) endLink(ref->ref()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1111 |
m_t << " "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1112 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1113 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1114 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1115 |
void RTFDocVisitor::visitPre(DocSecRefItem *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1116 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1117 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefItem)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1118 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1119 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1120 |
void RTFDocVisitor::visitPost(DocSecRefItem *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1121 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1122 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefItem)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1123 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1124 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1125 |
void RTFDocVisitor::visitPre(DocSecRefList *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1126 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1127 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1128 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefList)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1129 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1130 |
incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1131 |
m_t << rtf_Style_Reset << getStyle("LatexTOC") << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1132 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1133 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1134 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1135 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1136 |
void RTFDocVisitor::visitPost(DocSecRefList *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1137 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1138 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1139 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefList)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1140 |
decIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1141 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1142 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1143 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1144 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1145 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1146 |
//void RTFDocVisitor::visitPre(DocLanguage *l) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1147 |
//{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1148 |
// DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocLanguage)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1149 |
// QString langId = Config_getEnum("OUTPUT_LANGUAGE"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1150 |
// if (l->id().lower()!=langId.lower()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1151 |
// { |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1152 |
// pushEnabled(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1153 |
// m_hide = TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1154 |
// } |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1155 |
//} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1156 |
// |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1157 |
//void RTFDocVisitor::visitPost(DocLanguage *l) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1158 |
//{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1159 |
// DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocLanguage)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1160 |
// QString langId = Config_getEnum("OUTPUT_LANGUAGE"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1161 |
// if (l->id().lower()!=langId.lower()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1162 |
// { |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1163 |
// popEnabled(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1164 |
// } |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1165 |
//} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1166 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1167 |
void RTFDocVisitor::visitPre(DocParamSect *s) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1168 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1169 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1170 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamSect)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1171 |
m_t << "{"; // start param list |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1172 |
if (!m_lastIsPara) m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1173 |
//m_t << "{\\b "; // start bold |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1174 |
m_t << "{" << rtf_Style["Heading5"]->reference << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1175 |
switch(s->type()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1176 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1177 |
case DocParamSect::Param: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1178 |
m_t << theTranslator->trParameters(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1179 |
case DocParamSect::RetVal: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1180 |
m_t << theTranslator->trReturnValues(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1181 |
case DocParamSect::Exception: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1182 |
m_t << theTranslator->trExceptions(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1183 |
case DocParamSect::TemplateParam: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1184 |
/* TODO: add this |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1185 |
m_t << theTranslator->trTemplateParam(); break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1186 |
*/ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1187 |
m_t << "Template Parameters"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1188 |
default: |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1189 |
ASSERT(0); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1190 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1191 |
m_t << ":"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1192 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1193 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1194 |
incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1195 |
m_t << rtf_Style_Reset << getStyle("DescContinue"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1196 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1197 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1198 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1199 |
void RTFDocVisitor::visitPost(DocParamSect *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1200 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1201 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1202 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamSect)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1203 |
//m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1204 |
decIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1205 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1206 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1207 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1208 |
void RTFDocVisitor::visitPre(DocParamList *pl) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1209 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1210 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1211 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamList)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1212 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1213 |
// Put in the direction: in/out/in,out if specified. |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1214 |
if (pl->direction()!=DocParamSect::Unspecified) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1215 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1216 |
m_t << "["; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1217 |
if (pl->direction()==DocParamSect::In) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1218 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1219 |
m_t << "in"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1220 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1221 |
else if (pl->direction()==DocParamSect::Out) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1222 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1223 |
m_t << "out"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1224 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1225 |
else if (pl->direction()==DocParamSect::InOut) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1226 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1227 |
m_t << "in,out"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1228 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1229 |
m_t << "] "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1230 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1231 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1232 |
m_t << "{\\i "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1233 |
//QStrListIterator li(pl->parameters()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1234 |
//const char *s; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1235 |
QListIterator<DocNode> li(pl->parameters()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1236 |
DocNode *param; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1237 |
bool first=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1238 |
for (li.toFirst();(param=li.current());++li) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1239 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1240 |
if (!first) m_t << ","; else first=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1241 |
if (param->kind()==DocNode::Kind_Word) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1242 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1243 |
visit((DocWord*)param); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1244 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1245 |
else if (param->kind()==DocNode::Kind_LinkedWord) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1246 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1247 |
visit((DocLinkedWord*)param); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1248 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1249 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1250 |
m_t << "} "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1251 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1252 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1253 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1254 |
void RTFDocVisitor::visitPost(DocParamList *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1255 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1256 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1257 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamList)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1258 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1259 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1260 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1261 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1262 |
void RTFDocVisitor::visitPre(DocXRefItem *x) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1263 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1264 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1265 |
bool anonymousEnum = x->file()=="@"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1266 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocXRefItem)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1267 |
m_t << "{"; // start param list |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1268 |
//m_t << "{\\b "; // start bold |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1269 |
m_t << "{" << rtf_Style["Heading5"]->reference << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1270 |
if (Config_getBool("RTF_HYPERLINKS") && !anonymousEnum) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1271 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1272 |
QString refName; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1273 |
if (!x->file().isEmpty()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1274 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1275 |
refName+=x->file(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1276 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1277 |
if (!x->file().isEmpty() && !x->anchor().isEmpty()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1278 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1279 |
refName+="_"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1280 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1281 |
if (!x->anchor().isEmpty()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1282 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1283 |
refName+=x->anchor(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1284 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1285 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1286 |
m_t << "{\\field " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1287 |
"{\\*\\fldinst " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1288 |
"{ HYPERLINK \\\\l \"" << refName << "\" " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1289 |
"}{}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1290 |
"}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1291 |
"{\\fldrslt " |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1292 |
"{\\cs37\\ul\\cf2 "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1293 |
filter(x->title()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1294 |
m_t << "}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1295 |
"}" |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1296 |
"}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1297 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1298 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1299 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1300 |
filter(x->title()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1301 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1302 |
m_t << ":"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1303 |
m_t << "\\par"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1304 |
m_t << "}"; // end bold |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1305 |
incIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1306 |
m_t << rtf_Style_Reset << getStyle("DescContinue"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1307 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1308 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1309 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1310 |
void RTFDocVisitor::visitPost(DocXRefItem *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1311 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1312 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1313 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocXRefItem)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1314 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1315 |
decIndentLevel(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1316 |
m_t << "}" << endl; // end xref item |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1317 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1318 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1319 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1320 |
void RTFDocVisitor::visitPre(DocInternalRef *ref) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1321 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1322 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1323 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternalRef)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1324 |
startLink("",ref->file(),ref->anchor()); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1325 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1326 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1327 |
void RTFDocVisitor::visitPost(DocInternalRef *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1328 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1329 |
if (m_hide) return; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1330 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternalRef)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1331 |
endLink(""); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1332 |
m_t << " "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1333 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1334 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1335 |
void RTFDocVisitor::visitPre(DocCopy *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1336 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1337 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocCopy)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1338 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1339 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1340 |
void RTFDocVisitor::visitPost(DocCopy *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1341 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1342 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocCopy)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1343 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1344 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1345 |
void RTFDocVisitor::visitPre(DocText *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1346 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1347 |
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocText)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1348 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1349 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1350 |
void RTFDocVisitor::visitPost(DocText *) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1351 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1352 |
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocText)}\n"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1353 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1354 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1355 |
//static char* getMultiByte(int c) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1356 |
//{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1357 |
// static char s[10]; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1358 |
// sprintf(s,"\\'%X",c); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1359 |
// return s; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1360 |
//} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1361 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1362 |
void RTFDocVisitor::filter(const char *str,bool verbatim) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1363 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1364 |
if (str) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1365 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1366 |
const unsigned char *p=(const unsigned char *)str; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1367 |
unsigned char c; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1368 |
unsigned char pc='\0'; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1369 |
while (*p) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1370 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1371 |
//static bool MultiByte = FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1372 |
c=*p++; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1373 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1374 |
//if ( MultiByte ) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1375 |
//{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1376 |
// m_t << getMultiByte( c ); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1377 |
// MultiByte = FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1378 |
// continue; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1379 |
//} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1380 |
//if ( c >= 0x80 ) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1381 |
//{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1382 |
// MultiByte = TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1383 |
// m_t << getMultiByte( c ); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1384 |
// continue; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1385 |
//} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1386 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1387 |
switch (c) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1388 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1389 |
case '{': m_t << "\\{"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1390 |
case '}': m_t << "\\}"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1391 |
case '\\': m_t << "\\\\"; break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1392 |
case '\n': if (verbatim) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1393 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1394 |
m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1395 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1396 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1397 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1398 |
m_t << '\n'; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1399 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1400 |
break; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1401 |
default: m_t << (char)c; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1402 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1403 |
pc = c; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1404 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1405 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1406 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1407 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1408 |
void RTFDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1409 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1410 |
if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS")) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1411 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1412 |
QString refName; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1413 |
if (!file.isEmpty()) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1414 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1415 |
refName+=file; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1416 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1417 |
if (anchor) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1418 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1419 |
refName+='_'; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1420 |
refName+=anchor; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1421 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1422 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1423 |
m_t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \""; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1424 |
m_t << rtfFormatBmkStr(refName); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1425 |
m_t << "\" }{}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1426 |
m_t << "}{\\fldrslt {\\cs37\\ul\\cf2 "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1427 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1428 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1429 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1430 |
m_t << "{\\b "; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1431 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1432 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1433 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1434 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1435 |
void RTFDocVisitor::endLink(const QString &ref) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1436 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1437 |
if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS")) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1438 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1439 |
m_t << "}}}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1440 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1441 |
else |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1442 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1443 |
m_t << "}"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1444 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1445 |
m_lastIsPara=FALSE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1446 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1447 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1448 |
void RTFDocVisitor::pushEnabled() |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1449 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1450 |
m_enabled.push(new bool(m_hide)); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1451 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1452 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1453 |
void RTFDocVisitor::popEnabled() |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1454 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1455 |
bool *v=m_enabled.pop(); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1456 |
ASSERT(v!=0); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1457 |
m_hide = *v; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1458 |
delete v; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1459 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1460 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1461 |
void RTFDocVisitor::writeDotFile(const QString &fileName) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1462 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1463 |
QString baseName=fileName; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1464 |
int i; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1465 |
if ((i=baseName.findRev('/'))!=-1) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1466 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1467 |
baseName=baseName.right(baseName.length()-i-1); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1468 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1469 |
QString outDir = Config_getString("RTF_OUTPUT"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1470 |
writeDotGraphFromFile(fileName,outDir,baseName,BITMAP); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1471 |
if (!m_lastIsPara) m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1472 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1473 |
m_t << rtf_Style_Reset; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1474 |
m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1475 |
m_t << baseName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1476 |
m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1477 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1478 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1479 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1480 |
|
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1481 |
void RTFDocVisitor::writeMscFile(const QString &fileName) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1482 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1483 |
QString baseName=fileName; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1484 |
int i; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1485 |
if ((i=baseName.findRev('/'))!=-1) |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1486 |
{ |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1487 |
baseName=baseName.right(baseName.length()-i-1); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1488 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1489 |
QString outDir = Config_getString("RTF_OUTPUT"); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1490 |
writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP); |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1491 |
if (!m_lastIsPara) m_t << "\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1492 |
m_t << "{" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1493 |
m_t << rtf_Style_Reset; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1494 |
m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1495 |
m_t << baseName << ".png"; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1496 |
m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1497 |
m_t << "}" << endl; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1498 |
m_lastIsPara=TRUE; |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1499 |
} |
42188c7ea2d9
Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff
changeset
|
1500 |