doxygen  1.8.18
About: Doxygen is a source code documentation generator tool for C++, C, Objective-C, C#, PHP, Java, Python, IDL (diverse flavors), Fortran, VHDL, Tcl, and to some extent D. Different output formats are supported.
  Fossies Dox: doxygen-1.8.18.src.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

rtfdocvisitor.cpp
Go to the documentation of this file.
1 
19 #include <qfileinfo.h>
20 
21 #include "rtfdocvisitor.h"
22 #include "docparser.h"
23 #include "language.h"
24 #include "doxygen.h"
25 #include "outputgen.h"
26 #include "dot.h"
27 #include "msc.h"
28 #include "util.h"
29 #include "rtfstyle.h"
30 #include "message.h"
31 #include "parserintf.h"
32 #include "msc.h"
33 #include "dia.h"
34 #include "filedef.h"
35 #include "config.h"
36 #include "htmlentity.h"
37 #include "emoji.h"
38 #include "plantuml.h"
39 
40 //#define DBG_RTF(x) m_t << x
41 #define DBG_RTF(x) do {} while(0)
42 
43 static QCString align(DocHtmlCell *cell)
44 {
45  HtmlAttribList attrs = cell->attribs();
46  uint i;
47  for (i=0; i<attrs.count(); ++i)
48  {
49  if (attrs.at(i)->name.lower()=="align")
50  {
51  if (attrs.at(i)->value.lower()=="center")
52  return "\\qc ";
53  else if (attrs.at(i)->value.lower()=="right")
54  return "\\qr ";
55  else return "";
56  }
57  }
58  return "";
59 }
60 
62  const char *langExt)
63  : DocVisitor(DocVisitor_RTF), m_t(t), m_ci(ci), m_insidePre(FALSE),
64  m_hide(FALSE), m_indentLevel(0), m_lastIsPara(FALSE), m_langExt(langExt)
65 {
66 }
67 
69 {
70  QCString n;
71  n.sprintf("%s%d",name,m_indentLevel);
72  StyleData *sd = rtf_Style[n];
73  ASSERT(sd!=0);
74  return sd->reference();
75 }
76 
78 {
80 }
81 
83 {
85 }
86 
87  //--------------------------------------
88  // visitor functions for leaf nodes
89  //--------------------------------------
90 
92 {
93  if (m_hide) return;
94  DBG_RTF("{\\comment RTFDocVisitor::visit(DocWord)}\n");
95  filter(w->word());
97 }
98 
100 {
101  if (m_hide) return;
102  DBG_RTF("{\\comment RTFDocVisitor::visit(DocLinkedWord)}\n");
103  startLink(w->ref(),w->file(),w->anchor());
104  filter(w->word());
105  endLink(w->ref());
107 }
108 
110 {
111  if (m_hide) return;
112  DBG_RTF("{\\comment RTFDocVisitor::visit(DocWhiteSpace)}\n");
113  if (m_insidePre)
114  {
115  m_t << w->chars();
116  }
117  else
118  {
119  m_t << " ";
120  }
122 }
123 
125 {
126  if (m_hide) return;
127  DBG_RTF("{\\comment RTFDocVisitor::visit(DocSymbol)}\n");
128  const char *res = HtmlEntityMapper::instance()->rtf(s->symbol());
129  if (res)
130  {
131  m_t << res;
132  }
133  else
134  {
135  err("RTF: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
136  }
138 }
139 
141 {
142  if (m_hide) return;
143  DBG_RTF("{\\comment RTFDocVisitor::visit(DocEmoji)}\n");
144  const char *res = EmojiEntityMapper::instance()->unicode(s->index());
145  if (res)
146  {
147  const char *p = res;
148  int val = 0;
149  int val1 = 0;
150  while (*p)
151  {
152  switch(*p)
153  {
154  case '&': case '#': case 'x':
155  break;
156  case ';':
157  val1 = val;
158  val = 0xd800 + ( ( val1 - 0x10000 ) & 0xffc00 ) / 0x400 - 0x10000;
159  m_t << "\\u" << val << "?";
160  val = 0xdC00 + ( ( val1 - 0x10000 ) & 0x3ff ) - 0x10000 ;
161  m_t << "\\u" << val << "?";
162  val = 0;
163  break;
164  case '0': case '1': case '2': case '3': case '4':
165  case '5': case '6': case '7': case '8': case '9':
166  val = val * 16 + *p - '0';
167  break;
168  case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
169  val = val * 16 + *p - 'a' + 10;
170  break;
171  }
172  p++;
173  }
174  }
175  else
176  {
177  m_t << s->name();
178  }
180 }
181 
183 {
184  if (m_hide) return;
185  DBG_RTF("{\\comment RTFDocVisitor::visit(DocURL)}\n");
186  if (Config_getBool(RTF_HYPERLINKS))
187  {
188  m_t << "{\\field "
189  "{\\*\\fldinst "
190  "{ HYPERLINK \"";
191  if (u->isEmail()) m_t << "mailto:";
192  m_t << u->url();
193  m_t << "\" }"
194  "{}";
195  m_t << "}"
196  "{\\fldrslt "
197  "{\\cs37\\ul\\cf2 ";
198  filter(u->url());
199  m_t << "}"
200  "}"
201  "}" << endl;
202  }
203  else
204  {
205  m_t << "{\\f2 ";
206  filter(u->url());
207  m_t << "}";
208  }
210 }
211 
213 {
214  if (m_hide) return;
215  DBG_RTF("{\\comment RTFDocVisitor::visit(DocLineBreak)}\n");
216  m_t << "\\par" << endl;
218 }
219 
221 {
222  if (m_hide) return;
223  DBG_RTF("{\\comment RTFDocVisitor::visit(DocHorRuler)}\n");
224  m_t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" << endl;
226 }
227 
229 {
230  if (m_hide) return;
232  DBG_RTF("{\\comment RTFDocVisitor::visit(DocStyleChange)}\n");
233  switch (s->style())
234  {
236  if (s->enable()) m_t << "{\\b "; else m_t << "} ";
237  break;
238  case DocStyleChange::S:
240  case DocStyleChange::Del:
241  if (s->enable()) m_t << "{\\strike "; else m_t << "} ";
242  break;
244  case DocStyleChange::Ins:
245  if (s->enable()) m_t << "{\\ul "; else m_t << "} ";
246  break;
248  if (s->enable()) m_t << "{\\i "; else m_t << "} ";
249  break;
251  if (s->enable()) m_t << "{\\f2 "; else m_t << "} ";
252  break;
254  if (s->enable()) m_t << "{\\sub "; else m_t << "} ";
255  break;
257  if (s->enable()) m_t << "{\\super "; else m_t << "} ";
258  break;
260  if (s->enable()) m_t << "{\\qc "; else m_t << "} ";
261  break;
263  if (s->enable()) m_t << "{\\sub "; else m_t << "} ";
264  break;
266  if (s->enable())
267  {
268  m_t << "{" << endl;
269  m_t << "\\par" << endl;
270  m_t << rtf_Style_Reset << getStyle("CodeExample");
272  }
273  else
274  {
276  m_t << "\\par";
277  m_t << "}" << endl;
278  }
280  break;
281  case DocStyleChange::Div: /* HTML only */ break;
282  case DocStyleChange::Span: /* HTML only */ break;
283  }
284 }
285 
286 static void visitCaption(RTFDocVisitor *parent, QList<DocNode> children)
287 {
288  QListIterator<DocNode> cli(children);
289  DocNode *n;
290  for (cli.toFirst();(n=cli.current());++cli) n->accept(parent);
291 }
292 
294 {
295  if (m_hide) return;
296  DBG_RTF("{\\comment RTFDocVisitor::visit(DocVerbatim)}\n");
297  QCString lang = m_langExt;
298  if (!s->language().isEmpty()) // explicit language setting
299  {
300  lang = s->language();
301  }
302  SrcLangExt langExt = getLanguageFromFileName(lang);
303  switch(s->type())
304  {
305  case DocVerbatim::Code: // fall though
306  m_t << "{" << endl;
307  m_t << "\\par" << endl;
308  m_t << rtf_Style_Reset << getStyle("CodeExample");
310  .parseCode(m_ci,s->context(),s->text(),langExt,
311  s->isExample(),s->exampleFile());
312  //m_t << "\\par" << endl;
313  m_t << "}" << endl;
314  break;
316  m_t << "{" << endl;
317  m_t << "\\par" << endl;
318  m_t << rtf_Style_Reset << getStyle("CodeExample");
319  filter(s->text(),TRUE);
320  //m_t << "\\par" << endl;
321  m_t << "}" << endl;
322  break;
324  m_t << s->text();
325  break;
331  /* nothing */
332  break;
333  case DocVerbatim::Dot:
334  {
335  static int dotindex = 1;
336  QCString fileName(4096);
337 
338  fileName.sprintf("%s%d%s",
339  (Config_getString(RTF_OUTPUT)+"/inline_dotgraph_").data(),
340  dotindex++,
341  ".dot"
342  );
343  QFile file(fileName);
344  if (!file.open(IO_WriteOnly))
345  {
346  err("Could not open file %s for writing\n",fileName.data());
347  }
348  file.writeBlock( s->text(), s->text().length() );
349  file.close();
350 
351  writeDotFile(fileName, s->hasCaption());
352  visitCaption(this, s->children());
353  includePicturePostRTF(true, s->hasCaption());
354 
355  if (Config_getBool(DOT_CLEANUP)) file.remove();
356  }
357  break;
358  case DocVerbatim::Msc:
359  {
360  static int mscindex = 1;
361  QCString baseName(4096);
362 
363  baseName.sprintf("%s%d%s",
364  (Config_getString(RTF_OUTPUT)+"/inline_mscgraph_").data(),
365  mscindex++,
366  ".msc"
367  );
368  QFile file(baseName);
369  if (!file.open(IO_WriteOnly))
370  {
371  err("Could not open file %s for writing\n",baseName.data());
372  }
373  QCString text = "msc {";
374  text+=s->text();
375  text+="}";
376  file.writeBlock( text, text.length() );
377  file.close();
378 
379  writeMscFile(baseName, s->hasCaption());
380  visitCaption(this, s->children());
381  includePicturePostRTF(true, s->hasCaption());
382 
383  if (Config_getBool(DOT_CLEANUP)) file.remove();
384  }
385  break;
387  {
388  static QCString rtfOutput = Config_getString(RTF_OUTPUT);
390 
391  writePlantUMLFile(baseName, s->hasCaption());
392  visitCaption(this, s->children());
393  includePicturePostRTF(true, s->hasCaption());
394  }
395  break;
396  }
398 }
399 
401 {
402  if (m_hide) return;
403  DBG_RTF("{\\comment RTFDocVisitor::visit(DocAnchor)}\n");
404  QCString anchor;
405  if (!anc->file().isEmpty())
406  {
407  anchor+=anc->file();
408  }
409  if (!anc->file().isEmpty() && !anc->anchor().isEmpty())
410  {
411  anchor+="_";
412  }
413  if (!anc->anchor().isEmpty())
414  {
415  anchor+=anc->anchor();
416  }
417  m_t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}" << endl;
418  m_t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}" << endl;
420 }
421 
423 {
424  if (m_hide) return;
425  SrcLangExt langExt = getLanguageFromFileName(inc->extension());
426  DBG_RTF("{\\comment RTFDocVisitor::visit(DocInclude)}\n");
427  switch(inc->type())
428  {
430  {
431  m_t << "{" << endl;
432  m_t << "\\par" << endl;
433  m_t << rtf_Style_Reset << getStyle("CodeExample");
434  QFileInfo cfi( inc->file() );
435  FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
437  .parseCode(m_ci,inc->context(),
438  inc->text(),
439  langExt,
440  inc->isExample(),
441  inc->exampleFile(),
442  fd, // fileDef,
443  -1, // start line
444  -1, // end line
445  FALSE, // inline fragment
446  0, // memberDef
447  TRUE // show line numbers
448  );
449  delete fd;
450  m_t << "\\par";
451  m_t << "}" << endl;
452  }
453  break;
454  case DocInclude::Include:
455  m_t << "{" << endl;
456  m_t << "\\par" << endl;
457  m_t << rtf_Style_Reset << getStyle("CodeExample");
459  .parseCode(m_ci,inc->context(),
460  inc->text(),langExt,inc->isExample(),
461  inc->exampleFile(),
462  0, // fileDef
463  -1, // startLine
464  -1, // endLine
465  TRUE, // inlineFragment
466  0, // memberDef
467  FALSE // show line numbers
468  );
469  m_t << "\\par";
470  m_t << "}" << endl;
471  break;
479  break;
481  m_t << inc->text();
482  break;
484  m_t << "{" << endl;
485  m_t << "\\par" << endl;
486  m_t << rtf_Style_Reset << getStyle("CodeExample");
487  filter(inc->text());
488  m_t << "\\par";
489  m_t << "}" << endl;
490  break;
491  case DocInclude::Snippet:
492  m_t << "{" << endl;
493  if (!m_lastIsPara) m_t << "\\par" << endl;
494  m_t << rtf_Style_Reset << getStyle("CodeExample");
496  .parseCode(m_ci,
497  inc->context(),
498  extractBlock(inc->text(),inc->blockId()),
499  langExt,
500  inc->isExample(),
501  inc->exampleFile()
502  );
503  m_t << "}";
504  break;
506  {
507  QFileInfo cfi( inc->file() );
508  FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
509  m_t << "{" << endl;
510  if (!m_lastIsPara) m_t << "\\par" << endl;
511  m_t << rtf_Style_Reset << getStyle("CodeExample");
513  .parseCode(m_ci,
514  inc->context(),
515  extractBlock(inc->text(),inc->blockId()),
516  langExt,
517  inc->isExample(),
518  inc->exampleFile(),
519  fd,
520  lineBlock(inc->text(),inc->blockId()),
521  -1, // endLine
522  FALSE, // inlineFragment
523  0, // memberDef
524  TRUE // show line number
525  );
526  delete fd;
527  m_t << "}";
528  }
529  break;
532  err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
533  "Please create a bug report\n",__FILE__);
534  break;
535  }
537 }
538 
540 {
541  //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
542  // op->type(),op->isFirst(),op->isLast(),op->text().data());
543  DBG_RTF("{\\comment RTFDocVisitor::visit(DocIncOperator)}\n");
544  QCString locLangExt = getFileNameExtension(op->includeFileName());
545  if (locLangExt.isEmpty()) locLangExt = m_langExt;
546  SrcLangExt langExt = getLanguageFromFileName(locLangExt);
547  if (op->isFirst())
548  {
549  if (!m_hide)
550  {
551  m_t << "{" << endl;
552  m_t << "\\par" << endl;
553  m_t << rtf_Style_Reset << getStyle("CodeExample");
554  }
555  pushEnabled();
556  m_hide = TRUE;
557  }
558  if (op->type()!=DocIncOperator::Skip)
559  {
560  popEnabled();
561  if (!m_hide)
562  {
563  FileDef *fd = 0;
564  if (!op->includeFileName().isEmpty())
565  {
566  QFileInfo cfi( op->includeFileName() );
567  fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
568  }
569 
571  .parseCode(m_ci,op->context(),op->text(),langExt,
572  op->isExample(),op->exampleFile(),
573  fd, // fileDef
574  op->line(), // startLine
575  -1, // endLine
576  FALSE, // inline fragment
577  0, // memberDef
578  op->showLineNo() // show line numbers
579  );
580  if (fd) delete fd;
581  }
582  pushEnabled();
583  m_hide=TRUE;
584  }
585  if (op->isLast())
586  {
587  popEnabled();
588  if (!m_hide)
589  {
590  m_t << "\\par";
591  m_t << "}" << endl;
592  }
594  }
595  else
596  {
597  if (!m_hide) m_t << endl;
599  }
600 }
601 
603 {
604  if (m_hide) return;
605  DBG_RTF("{\\comment RTFDocVisitor::visit(DocFormula)}\n");
606  bool bDisplay = !f->isInline();
607  if (bDisplay)
608  {
609  m_t << "\\par";
610  m_t << "{";
611  m_t << "\\pard\\plain";
612  m_t << "\\pard";
613  m_t << "\\qc";
614  }
615  m_t << "{ \\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"" << f->relPath() << f->name() << ".png\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt Image}}";
616  if (bDisplay)
617  {
618  m_t << "\\par}";
619  }
621 }
622 
624 {
625  if (m_hide) return;
626  DBG_RTF("{\\comment RTFDocVisitor::visit(DocIndexEntry)}\n");
627  m_t << "{\\xe \\v " << i->entry() << "}" << endl;
629 }
630 
632 {
633 }
634 
636 {
637  if (m_hide) return;
638  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocCite)}\n");
639  if (!cite->file().isEmpty())
640  {
641  startLink(cite->ref(),cite->file(),cite->anchor());
642  }
643  else
644  {
645  m_t << "{\\b ";
646  }
647  filter(cite->text());
648  if (!cite->file().isEmpty())
649  {
650  endLink(cite->ref());
651  }
652  else
653  {
654  m_t << "}";
655  }
656 }
657 
658 
659 //--------------------------------------
660 // visitor functions for compound nodes
661 //--------------------------------------
662 
664 {
665  if (m_hide) return;
666  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoList)}\n");
667  m_t << "{" << endl;
668  rtf_listItemInfo[m_indentLevel].isEnum = l->isEnumList();
671 }
672 
674 {
675  if (m_hide) return;
676  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoList)}\n");
677  if (!m_lastIsPara) m_t << "\\par";
678  m_t << "}" << endl;
680  if (!m_indentLevel) m_t << "\\par" << endl;
681 }
682 
684 {
685  if (m_hide) return;
686  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoListItem)}\n");
687  if (!m_lastIsPara) m_t << "\\par" << endl;
688  m_t << rtf_Style_Reset;
689  if (rtf_listItemInfo[m_indentLevel].isEnum)
690  {
691  m_t << getStyle("ListEnum") << endl;
692  m_t << rtf_listItemInfo[m_indentLevel].number << ".\\tab ";
694  }
695  else
696  {
697  m_t << getStyle("ListBullet") << endl;
698  }
699  incIndentLevel();
701 }
702 
704 {
705  decIndentLevel();
706  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoListItem)}\n");
707 }
708 
710 {
711  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n");
712 }
713 
715 {
716  if (m_hide) return;
717  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n");
718  if (!m_lastIsPara &&
719  !p->isLast() && // omit <p> for last paragraph
720  !(p->parent() && // and for parameters & sections
722  )
723  )
724  {
725  m_t << "\\par" << endl;
727  }
728 }
729 
731 {
732  if (m_hide) return;
733  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRoot)}\n");
734  if (r->indent()) incIndentLevel();
735  m_t << "{" << rtf_Style["BodyText"]->reference() << endl;
736 }
737 
739 {
740  if (m_hide) return;
741  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRoot)}\n");
742  if (!m_lastIsPara && !r->singleLine()) m_t << "\\par" << endl;
743  m_t << "}";
745  if (r->indent()) decIndentLevel();
746 }
747 
749 {
750  if (m_hide) return;
751  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n");
752  if (!m_lastIsPara) m_t << "\\par" << endl;
753  m_t << "{"; // start desc
754  //m_t << "{\\b "; // start bold
755  m_t << "{" << rtf_Style["Heading5"]->reference() << endl;
756  switch(s->type())
757  {
758  case DocSimpleSect::See:
759  m_t << theTranslator->trSeeAlso(); break;
761  m_t << theTranslator->trReturns(); break;
763  m_t << theTranslator->trAuthor(TRUE,TRUE); break;
765  m_t << theTranslator->trAuthor(TRUE,FALSE); break;
767  m_t << theTranslator->trVersion(); break;
769  m_t << theTranslator->trSince(); break;
770  case DocSimpleSect::Date:
771  m_t << theTranslator->trDate(); break;
772  case DocSimpleSect::Note:
773  m_t << theTranslator->trNote(); break;
775  m_t << theTranslator->trWarning(); break;
776  case DocSimpleSect::Pre:
777  m_t << theTranslator->trPrecondition(); break;
778  case DocSimpleSect::Post:
779  m_t << theTranslator->trPostcondition(); break;
781  m_t << theTranslator->trCopyright(); break;
783  m_t << theTranslator->trInvariant(); break;
785  m_t << theTranslator->trRemarks(); break;
787  m_t << theTranslator->trAttention(); break;
788  case DocSimpleSect::User: break;
789  case DocSimpleSect::Rcs: break;
790  case DocSimpleSect::Unknown: break;
791  }
792 
793  // special case 1: user defined title
794  if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
795  {
796  m_t << "\\par";
797  m_t << "}"; // end bold
798  incIndentLevel();
799  m_t << rtf_Style_Reset << getStyle("DescContinue");
800  m_t << "{\\s17 \\sa60 \\sb30\n";
801  }
803 }
804 
806 {
807  if (m_hide) return;
808  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n");
809  if (!m_lastIsPara) m_t << "\\par" << endl;
810  decIndentLevel();
811  if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs) m_t << "}";
812  m_t << "}"; // end desc
814 }
815 
817 {
818  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocTitle)}\n");
819 }
820 
822 {
823  if (m_hide) return;
824  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocTitle)}\n");
825  m_t << "\\par" << endl;
826  m_t << "}"; // end bold
827  incIndentLevel();
828  m_t << rtf_Style_Reset << getStyle("DescContinue");
830 }
831 
833 {
834  if (m_hide) return;
835  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n");
836  m_t << "{" << endl;
839 }
840 
842 {
843  if (m_hide) return;
844  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n");
845  if (!m_lastIsPara) m_t << "\\par" << endl;
846  m_t << "}" << endl;
848 }
849 
851 {
852  if (m_hide) return;
853  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleListItem)}\n");
854  m_t << "\\par" << rtf_Style_Reset << getStyle("ListBullet") << endl;
856  incIndentLevel();
857 }
858 
860 {
861  decIndentLevel();
862  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleListItem)}\n");
863 }
864 
866 {
867  if (m_hide) return;
868  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSection)}\n");
869  if (!m_lastIsPara) m_t << "\\par" << endl;
870  m_t << "{\\bkmkstart " << rtfFormatBmkStr(s->file()+"_"+s->anchor()) << "}" << endl;
871  m_t << "{\\bkmkend " << rtfFormatBmkStr(s->file()+"_"+s->anchor()) << "}" << endl;
872  m_t << "{{" // start section
873  << rtf_Style_Reset;
874  QCString heading;
875  int level = QMIN(s->level()+1,4);
876  heading.sprintf("Heading%d",level);
877  // set style
878  m_t << rtf_Style[heading]->reference() << endl;
879  // make table of contents entry
880  filter(s->title());
881  m_t << endl << "\\par" << "}" << endl;
882  m_t << "{\\tc\\tcl" << level << " \\v ";
883  filter(s->title());
884  m_t << "}" << endl;
886 }
887 
889 {
890  if (m_hide) return;
891  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSection)}\n");
892  m_t << "\\par}" << endl; // end section
894 }
895 
897 {
898  if (m_hide) return;
899  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlList)}\n");
900  m_t << "{" << endl;
904 }
905 
907 {
908  if (m_hide) return;
909  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlList)}\n");
910  m_t << "\\par" << "}" << endl;
912 }
913 
915 {
916  if (m_hide) return;
917  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlListItem)}\n");
918  m_t << "\\par" << endl;
919  m_t << rtf_Style_Reset;
920  if (rtf_listItemInfo[m_indentLevel].isEnum)
921  {
922  m_t << getStyle("ListEnum") << endl;
923  m_t << rtf_listItemInfo[m_indentLevel].number << ".\\tab ";
925  }
926  else
927  {
928  m_t << getStyle("ListBullet") << endl;
929  }
930  incIndentLevel();
932 }
933 
935 {
936  decIndentLevel();
937  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlListItem)}\n");
938 }
939 
941 {
942  if (m_hide) return;
943  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescList)}\n");
944  //m_t << "{" << endl;
945  //m_t << rtf_Style_Reset << getStyle("ListContinue");
946  //m_lastIsPara=FALSE;
947 }
948 
950 {
951  if (m_hide) return;
952  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescList)}\n");
953  //m_t << "}" << endl;
954  //m_t << "\\par" << endl;
955  //m_lastIsPara=TRUE;
956 }
957 
959 {
960  if (m_hide) return;
961  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescTitle)}\n");
962  //m_t << "\\par" << endl;
963  //m_t << "{\\b ";
964  m_t << "{" << rtf_Style["Heading5"]->reference() << endl;
966 }
967 
969 {
970  if (m_hide) return;
971  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescTitle)}\n");
972  m_t << "\\par" << endl;
973  m_t << "}" << endl;
975 }
976 
978 {
979  if (m_hide) return;
980  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescData)}\n");
981  incIndentLevel();
982  m_t << "{" << rtf_Style_Reset << getStyle("DescContinue");
983 }
984 
986 {
987  if (m_hide) return;
988  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescData)}\n");
989  m_t << "\\par";
990  m_t << "}" << endl;
991  decIndentLevel();
993 }
994 
996 {
997  if (m_hide) return;
998  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlTable)}\n");
999  if (!m_lastIsPara) m_t << "\\par" << endl;
1001 }
1002 
1004 {
1005  if (m_hide) return;
1006  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlTable)}\n");
1007  m_t << "\\pard\\plain" << endl;
1008  m_t << "\\par" << endl;
1010 }
1011 
1013 {
1014  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlCaption)}\n");
1015  m_t << "\\pard \\qc \\b";
1016  m_t << "{Table \\field\\flddirty{\\*\\fldinst { SEQ Table \\\\*Arabic }}{\\fldrslt {\\noproof 1}} ";
1017 }
1018 
1020 {
1021  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCaption)}\n");
1022  m_t << "}\n\\par" << endl;
1023 }
1024 
1026 {
1027  if (m_hide) return;
1028  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlRow)}\n");
1029  uint i,columnWidth=r->numCells()>0 ? rtf_pageWidth/r->numCells() : 10;
1030  m_t << "\\trowd \\trgaph108\\trleft-108"
1031  "\\trbrdrt\\brdrs\\brdrw10 "
1032  "\\trbrdrl\\brdrs\\brdrw10 "
1033  "\\trbrdrb\\brdrs\\brdrw10 "
1034  "\\trbrdrr\\brdrs\\brdrw10 "
1035  "\\trbrdrh\\brdrs\\brdrw10 "
1036  "\\trbrdrv\\brdrs\\brdrw10 "<< endl;
1037  for (i=0;i<r->numCells();i++)
1038  {
1039  if (r->isHeading())
1040  {
1041  m_t << "\\clcbpat16"; // set cell shading to light grey (color 16 in the clut)
1042  }
1043  m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 "
1044  "\\clbrdrl\\brdrs\\brdrw10 "
1045  "\\clbrdrb\\brdrs\\brdrw10 "
1046  "\\clbrdrr \\brdrs\\brdrw10 "
1047  "\\cltxlrtb "
1048  "\\cellx" << ((i+1)*columnWidth) << endl;
1049  }
1050  m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
1052 }
1053 
1055 {
1056  if (m_hide) return;
1057  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlRow)}\n");
1058  m_t << endl;
1059  m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
1060  m_t << "{\\row }" << endl;
1062 }
1063 
1065 {
1066  if (m_hide) return;
1067  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlCell)}\n");
1068  m_t << "{" << align(c);
1070 }
1071 
1073 {
1074  if (m_hide) return;
1075  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCell)}\n");
1076  m_t << "\\cell }";
1078 }
1079 
1081 {
1082  if (m_hide) return;
1083  //DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternal)}\n");
1084  //m_t << "{"; // start desc
1085  //m_t << "{\\b "; // start bold
1086  //m_t << theTranslator->trForInternalUseOnly();
1087  //m_t << "}"; // end bold
1088  //m_t << "\\par" << endl;
1089  //incIndentLevel();
1090  //m_t << rtf_Style_Reset << getStyle("DescContinue");
1091  //m_lastIsPara=FALSE;
1092 }
1093 
1095 {
1096  if (m_hide) return;
1097  //DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternal)}\n");
1098  //m_t << "\\par";
1099  //decIndentLevel();
1100  //m_t << "}"; // end desc
1101  //m_lastIsPara=TRUE;
1102 }
1103 
1105 {
1106  if (m_hide) return;
1107  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHRef)}\n");
1108  if (Config_getBool(RTF_HYPERLINKS))
1109  {
1110  if (href->url().startsWith("#CITEREF"))
1111  {
1112  // when starting with #CITEREF it is a doxygen generated "url"a
1113  // so a local link
1114  QCString cite;
1115  cite = "citelist_" + href->url().right(href->url().length()-1);
1116  m_t << "{\\field "
1117  "{\\*\\fldinst "
1118  "{ HYPERLINK \\\\l \"" << rtfFormatBmkStr(cite) << "\" "
1119  "}{}"
1120  "}"
1121  "{\\fldrslt "
1122  "{\\cs37\\ul\\cf2 ";
1123  }
1124  else
1125  {
1126  m_t << "{\\field "
1127  "{\\*\\fldinst "
1128  "{ HYPERLINK \"" << href->url() << "\" "
1129  "}{}"
1130  "}"
1131  "{\\fldrslt "
1132  "{\\cs37\\ul\\cf2 ";
1133  }
1134  }
1135  else
1136  {
1137  m_t << "{\\f2 ";
1138  }
1140 }
1141 
1143 {
1144  if (m_hide) return;
1145  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHRef)}\n");
1146  if (Config_getBool(RTF_HYPERLINKS))
1147  {
1148  m_t << "}"
1149  "}"
1150  "}";
1151  }
1152  else
1153  {
1154  m_t << "}";
1155  }
1157 }
1158 
1160 {
1161  if (m_hide) return;
1162  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlHeader)}\n");
1163  m_t << "{" // start section
1164  << rtf_Style_Reset;
1165  QCString heading;
1166  int level = QMIN(header->level(),5);
1167  heading.sprintf("Heading%d",level);
1168  // set style
1169  m_t << rtf_Style[heading]->reference();
1170  // make open table of contents entry that will be closed in visitPost method
1171  m_t << "{\\tc\\tcl" << level << " ";
1173 }
1174 
1176 {
1177  if (m_hide) return;
1178  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlHeader)}\n");
1179  // close open table of contents entry
1180  m_t << "} \\par";
1181  m_t << "}" << endl; // end section
1183 }
1184 
1186 {
1187  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocImage)}\n");
1188  includePicturePreRTF(img->name(), img->type()==DocImage::Rtf, img->hasCaption(), img->isInlineImage());
1189 }
1190 void RTFDocVisitor::includePicturePreRTF(const QCString name, bool isTypeRTF, bool hasCaption, bool inlineImage)
1191 {
1192  if (isTypeRTF)
1193  {
1194  if (!inlineImage)
1195  {
1196  m_t << "\\par" << endl;
1197  m_t << "{" << endl;
1198  m_t << rtf_Style_Reset << endl;
1199  if (hasCaption || m_lastIsPara) m_t << "\\par" << endl;
1200  m_t << "\\pard \\qc ";
1201  }
1202  m_t << "{ \\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
1203  m_t << name;
1204  m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt Image}}" << endl;
1205  if (!inlineImage)
1206  {
1207  m_t << "\\par" << endl;
1208  if (hasCaption)
1209  {
1210  m_t << "\\pard \\qc \\b";
1211  m_t << "{Image \\field\\flddirty{\\*\\fldinst { SEQ Image \\\\*Arabic }}{\\fldrslt {\\noproof 1}} ";
1212  }
1214  }
1215  else
1216  {
1217  if (hasCaption) m_t << "{\\comment "; // to prevent caption to be shown
1218  }
1219  }
1220  else // other format -> skip
1221  {
1222  pushEnabled();
1223  m_hide=TRUE;
1224  }
1225 }
1226 
1228 {
1229  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocImage)}\n");
1231 }
1232 
1233 void RTFDocVisitor::includePicturePostRTF(bool isTypeRTF, bool hasCaption, bool inlineImage)
1234 {
1235  if (isTypeRTF)
1236  {
1237  if (m_hide) return;
1238  if (inlineImage)
1239  {
1240  if (hasCaption) m_t << " }";
1241  }
1242  else
1243  {
1244  if (hasCaption)
1245  {
1246  m_t << "}" <<endl;
1247  m_t << "\\par}" <<endl;
1248  }
1249  else
1250  {
1251  m_t << "}" <<endl;
1252  }
1253  }
1254  }
1255  else
1256  {
1257  popEnabled();
1258  }
1259 }
1260 
1262 {
1263  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocDotFile)}\n");
1264  writeDotFile(df);
1265 }
1266 
1268 {
1269  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocDotFile)}\n");
1270  includePicturePostRTF(true, df->hasCaption());
1271 }
1273 {
1274  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocMscFile)}\n");
1275  writeMscFile(df);
1276 }
1277 
1279 {
1280  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocMscFile)}\n");
1281  includePicturePostRTF(true, df->hasCaption());
1282 }
1283 
1285 {
1286  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocDiaFile)}\n");
1287  writeDiaFile(df);
1288 }
1289 
1291 {
1292  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocDiaFile)}\n");
1293  includePicturePostRTF(true, df->hasCaption());
1294 }
1295 
1297 {
1298  if (m_hide) return;
1299  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocLink)}\n");
1300  startLink(lnk->ref(),lnk->file(),lnk->anchor());
1301 }
1302 
1304 {
1305  if (m_hide) return;
1306  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocLink)}\n");
1307  endLink(lnk->ref());
1308 }
1309 
1311 {
1312  if (m_hide) return;
1313  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRef)}\n");
1314  // when ref->isSubPage()==TRUE we use ref->file() for HTML and
1315  // ref->anchor() for LaTeX/RTF
1316  if (ref->isSubPage())
1317  {
1318  startLink(ref->ref(),0,ref->anchor());
1319  }
1320  else
1321  {
1322  if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor());
1323  }
1324  if (!ref->hasLinkText()) filter(ref->targetTitle());
1325 }
1326 
1328 {
1329  if (m_hide) return;
1330  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRef)}\n");
1331  if (!ref->file().isEmpty()) endLink(ref->ref());
1332  //m_t << " ";
1333 }
1334 
1335 
1337 {
1338  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefItem)}\n");
1339 }
1340 
1342 {
1343  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefItem)}\n");
1344 }
1345 
1347 {
1348  if (m_hide) return;
1349  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefList)}\n");
1350  m_t << "{" << endl;
1351  incIndentLevel();
1352  m_t << rtf_Style_Reset << getStyle("LatexTOC") << endl;
1353  m_t << "\\par" << endl;
1355 }
1356 
1358 {
1359  if (m_hide) return;
1360  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefList)}\n");
1361  decIndentLevel();
1362  m_t << "\\par";
1363  m_t << "}" << endl;
1365 }
1366 
1367 //void RTFDocVisitor::visitPre(DocLanguage *l)
1368 //{
1369 // DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocLanguage)}\n");
1370 // QCString langId = Config_getEnum(OUTPUT_LANGUAGE);
1371 // if (l->id().lower()!=langId.lower())
1372 // {
1373 // pushEnabled();
1374 // m_hide = TRUE;
1375 // }
1376 //}
1377 //
1378 //void RTFDocVisitor::visitPost(DocLanguage *l)
1379 //{
1380 // DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocLanguage)}\n");
1381 // QCString langId = Config_getEnum(OUTPUT_LANGUAGE);
1382 // if (l->id().lower()!=langId.lower())
1383 // {
1384 // popEnabled();
1385 // }
1386 //}
1387 
1389 {
1390  if (m_hide) return;
1391  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamSect)}\n");
1392  m_t << "{"; // start param list
1393  if (!m_lastIsPara) m_t << "\\par" << endl;
1394  //m_t << "{\\b "; // start bold
1395  m_t << "{" << rtf_Style["Heading5"]->reference() << endl;
1396  switch(s->type())
1397  {
1398  case DocParamSect::Param:
1399  m_t << theTranslator->trParameters(); break;
1400  case DocParamSect::RetVal:
1401  m_t << theTranslator->trReturnValues(); break;
1403  m_t << theTranslator->trExceptions(); break;
1405  m_t << theTranslator->trTemplateParameters(); break;
1406  default:
1407  ASSERT(0);
1408  }
1409  m_t << "\\par";
1410  m_t << "}" << endl;
1411  bool useTable = s->type()==DocParamSect::Param ||
1412  s->type()==DocParamSect::RetVal ||
1413  s->type()==DocParamSect::Exception ||
1415  if (!useTable)
1416  {
1417  incIndentLevel();
1418  }
1419  m_t << rtf_Style_Reset << getStyle("DescContinue");
1421 }
1422 
1424 {
1425  if (m_hide) return;
1426  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamSect)}\n");
1427  //m_t << "\\par" << endl;
1428  bool useTable = s->type()==DocParamSect::Param ||
1429  s->type()==DocParamSect::RetVal ||
1430  s->type()==DocParamSect::Exception ||
1432  if (!useTable)
1433  {
1434  decIndentLevel();
1435  }
1436  m_t << "}" << endl;
1437 }
1438 
1440 {
1441  static int columnPos[4][5] =
1442  { { 2, 25, 100, 100, 100 }, // no inout, no type
1443  { 3, 14, 35, 100, 100 }, // inout, no type
1444  { 3, 25, 50, 100, 100 }, // no inout, type
1445  { 4, 14, 35, 55, 100 }, // inout, type
1446  };
1447  int config=0;
1448  if (m_hide) return;
1449  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamList)}\n");
1450 
1452  DocParamSect *sect = 0;
1453  if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
1454  {
1455  parentType = ((DocParamSect*)pl->parent())->type();
1456  sect=(DocParamSect*)pl->parent();
1457  }
1458  bool useTable = parentType==DocParamSect::Param ||
1459  parentType==DocParamSect::RetVal ||
1460  parentType==DocParamSect::Exception ||
1461  parentType==DocParamSect::TemplateParam;
1462  if (sect && sect->hasInOutSpecifier()) config+=1;
1463  if (sect && sect->hasTypeSpecifier()) config+=2;
1464  if (useTable)
1465  {
1466  int i;
1467  m_t << "\\trowd \\trgaph108\\trleft426\\tblind426"
1468  "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
1469  "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
1470  "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
1471  "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
1472  "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
1473  "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<< endl;
1474  for (i=0;i<columnPos[config][0];i++)
1475  {
1476  m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
1477  "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
1478  "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
1479  "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
1480  "\\cltxlrtb "
1481  "\\cellx" << (rtf_pageWidth*columnPos[config][i+1]/100) << endl;
1482  }
1483  m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
1484  }
1485 
1486  if (sect && sect->hasInOutSpecifier())
1487  {
1488  if (useTable)
1489  {
1490  m_t << "{";
1491  }
1492 
1493  // Put in the direction: in/out/in,out if specified.
1495  {
1496  if (pl->direction()==DocParamSect::In)
1497  {
1498  m_t << "in";
1499  }
1500  else if (pl->direction()==DocParamSect::Out)
1501  {
1502  m_t << "out";
1503  }
1504  else if (pl->direction()==DocParamSect::InOut)
1505  {
1506  m_t << "in,out";
1507  }
1508  }
1509 
1510  if (useTable)
1511  {
1512  m_t << "\\cell }";
1513  }
1514  }
1515 
1516  if (sect && sect->hasTypeSpecifier())
1517  {
1518  if (useTable)
1519  {
1520  m_t << "{";
1521  }
1523  DocNode *type;
1524  for (li.toFirst();(type=li.current());++li)
1525  {
1526  if (type->kind()==DocNode::Kind_Word)
1527  {
1528  visit((DocWord*)type);
1529  }
1530  else if (type->kind()==DocNode::Kind_LinkedWord)
1531  {
1532  visit((DocLinkedWord*)type);
1533  }
1534  else if (type->kind()==DocNode::Kind_Sep)
1535  {
1536  m_t << " " << ((DocSeparator *)type)->chars() << " ";
1537  }
1538  }
1539  if (useTable)
1540  {
1541  m_t << "\\cell }";
1542  }
1543  }
1544 
1545 
1546  if (useTable)
1547  {
1548  m_t << "{";
1549  }
1550 
1551  m_t << "{\\i ";
1552  //QStrListIterator li(pl->parameters());
1553  //const char *s;
1555  DocNode *param;
1556  bool first=TRUE;
1557  for (li.toFirst();(param=li.current());++li)
1558  {
1559  if (!first) m_t << ","; else first=FALSE;
1560  if (param->kind()==DocNode::Kind_Word)
1561  {
1562  visit((DocWord*)param);
1563  }
1564  else if (param->kind()==DocNode::Kind_LinkedWord)
1565  {
1566  visit((DocLinkedWord*)param);
1567  }
1568  }
1569  m_t << "} ";
1570 
1571  if (useTable)
1572  {
1573  m_t << "\\cell }{";
1574  }
1576 }
1577 
1579 {
1580  if (m_hide) return;
1581  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamList)}\n");
1582 
1584  //DocParamSect *sect = 0;
1585  if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
1586  {
1587  parentType = ((DocParamSect*)pl->parent())->type();
1588  //sect=(DocParamSect*)pl->parent();
1589  }
1590  bool useTable = parentType==DocParamSect::Param ||
1591  parentType==DocParamSect::RetVal ||
1592  parentType==DocParamSect::Exception ||
1593  parentType==DocParamSect::TemplateParam;
1594  if (useTable)
1595  {
1596  m_t << "\\cell }" << endl;
1597  //m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
1598  m_t << "{\\row }" << endl;
1599  }
1600  else
1601  {
1602  m_t << "\\par" << endl;
1603  }
1604 
1606 }
1607 
1609 {
1610  if (m_hide) return;
1611  if (x->title().isEmpty()) return;
1612  bool anonymousEnum = x->file()=="@";
1613  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocXRefItem)}\n");
1614  if (!m_lastIsPara)
1615  {
1616  m_t << "\\par" << endl;
1618  }
1619  m_t << "{"; // start param list
1620  //m_t << "{\\b "; // start bold
1621  m_t << "{" << rtf_Style["Heading5"]->reference() << endl;
1622  if (Config_getBool(RTF_HYPERLINKS) && !anonymousEnum)
1623  {
1624  QCString refName;
1625  if (!x->file().isEmpty())
1626  {
1627  refName+=x->file();
1628  }
1629  if (!x->file().isEmpty() && !x->anchor().isEmpty())
1630  {
1631  refName+="_";
1632  }
1633  if (!x->anchor().isEmpty())
1634  {
1635  refName+=x->anchor();
1636  }
1637 
1638  m_t << "{\\field "
1639  "{\\*\\fldinst "
1640  "{ HYPERLINK \\\\l \"" << rtfFormatBmkStr(refName) << "\" "
1641  "}{}"
1642  "}"
1643  "{\\fldrslt "
1644  "{\\cs37\\ul\\cf2 ";
1645  filter(x->title());
1646  m_t << "}"
1647  "}"
1648  "}";
1649  }
1650  else
1651  {
1652  filter(x->title());
1653  }
1654  m_t << ":";
1655  m_t << "\\par";
1656  m_t << "}"; // end bold
1657  incIndentLevel();
1658  m_t << rtf_Style_Reset << getStyle("DescContinue");
1660 }
1661 
1663 {
1664  if (m_hide) return;
1665  if (x->title().isEmpty()) return;
1666  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocXRefItem)}\n");
1667  m_t << "\\par" << endl;
1668  decIndentLevel();
1669  m_t << "}" << endl; // end xref item
1671 }
1672 
1674 {
1675  if (m_hide) return;
1676  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternalRef)}\n");
1677  startLink("",ref->file(),ref->anchor());
1678 }
1679 
1681 {
1682  if (m_hide) return;
1683  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternalRef)}\n");
1684  endLink("");
1685  m_t << " ";
1686 }
1687 
1689 {
1690  if (m_hide) return;
1691  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocText)}\n");
1692 }
1693 
1695 {
1696  if (m_hide) return;
1697  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocText)}\n");
1698 }
1699 
1701 {
1702  if (m_hide) return;
1703  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlBlockQuote)}\n");
1704  if (!m_lastIsPara) m_t << "\\par" << endl;
1705  m_t << "{"; // start desc
1706  incIndentLevel();
1707  m_t << rtf_Style_Reset << getStyle("DescContinue");
1708 }
1709 
1711 {
1712  if (m_hide) return;
1713  DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlBlockQuote)}\n");
1714  if (!m_lastIsPara) m_t << "\\par" << endl;
1715  decIndentLevel();
1716  m_t << "}"; // end desc
1718 }
1719 
1721 {
1722  if (m_hide) return;
1723 }
1724 
1726 {
1727  if (m_hide) return;
1728 }
1729 
1731 {
1732  if (m_hide) return;
1733 }
1734 
1736 {
1737  if (m_hide) return;
1738 }
1739 
1740 
1741 //static char* getMultiByte(int c)
1742 //{
1743 // static char s[10];
1744 // sprintf(s,"\\'%X",c);
1745 // return s;
1746 //}
1747 
1748 void RTFDocVisitor::filter(const char *str,bool verbatim)
1749 {
1750  if (str)
1751  {
1752  const unsigned char *p=(const unsigned char *)str;
1753  unsigned char c;
1754  //unsigned char pc='\0';
1755  while (*p)
1756  {
1757  //static bool MultiByte = FALSE;
1758  c=*p++;
1759 
1760  //if ( MultiByte )
1761  //{
1762  // m_t << getMultiByte( c );
1763  // MultiByte = FALSE;
1764  // continue;
1765  //}
1766  //if ( c >= 0x80 )
1767  //{
1768  // MultiByte = TRUE;
1769  // m_t << getMultiByte( c );
1770  // continue;
1771  //}
1772 
1773  switch (c)
1774  {
1775  case '{': m_t << "\\{"; break;
1776  case '}': m_t << "\\}"; break;
1777  case '\\': m_t << "\\\\"; break;
1778  case '\n': if (verbatim)
1779  {
1780  m_t << "\\par" << endl;
1781  }
1782  else
1783  {
1784  m_t << '\n';
1785  }
1786  break;
1787  default: m_t << (char)c;
1788  }
1789  //pc = c;
1790  }
1791  }
1792 }
1793 
1794 void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor)
1795 {
1796  if (ref.isEmpty() && Config_getBool(RTF_HYPERLINKS))
1797  {
1798  QCString refName;
1799  if (!file.isEmpty())
1800  {
1801  refName+=file;
1802  }
1803  if (!file.isEmpty() && anchor)
1804  {
1805  refName+='_';
1806  }
1807  if (anchor)
1808  {
1809  refName+=anchor;
1810  }
1811 
1812  m_t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1813  m_t << rtfFormatBmkStr(refName);
1814  m_t << "\" }{}";
1815  m_t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
1816  }
1817  else
1818  {
1819  m_t << "{\\b ";
1820  }
1822 }
1823 
1825 {
1826  if (ref.isEmpty() && Config_getBool(RTF_HYPERLINKS))
1827  {
1828  m_t << "}}}";
1829  }
1830  else
1831  {
1832  m_t << "}";
1833  }
1835 }
1836 
1838 {
1839  m_enabled.push(new bool(m_hide));
1840 }
1841 
1843 {
1844  bool *v=m_enabled.pop();
1845  ASSERT(v!=0);
1846  m_hide = *v;
1847  delete v;
1848 }
1849 
1851 {
1852  writeDotFile(df->file(), df->hasCaption());
1853 }
1854 void RTFDocVisitor::writeDotFile(const QCString &filename, bool hasCaption)
1855 {
1856  QCString baseName=filename;
1857  int i;
1858  if ((i=baseName.findRev('/'))!=-1)
1859  {
1860  baseName=baseName.right(baseName.length()-i-1);
1861  }
1862  QCString outDir = Config_getString(RTF_OUTPUT);
1863  writeDotGraphFromFile(filename,outDir,baseName,GOF_BITMAP);
1864  QCString imgExt = getDotImageExtension();
1865  includePicturePreRTF(baseName + "." + imgExt, true, hasCaption);
1866 }
1867 
1869 {
1870  writeMscFile(df->file(), df->hasCaption());
1871 }
1872 void RTFDocVisitor::writeMscFile(const QCString &fileName, bool hasCaption)
1873 {
1874  QCString baseName=fileName;
1875  int i;
1876  if ((i=baseName.findRev('/'))!=-1)
1877  {
1878  baseName=baseName.right(baseName.length()-i-1);
1879  }
1880  QCString outDir = Config_getString(RTF_OUTPUT);
1881  writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP);
1882  includePicturePreRTF(baseName + ".png", true, hasCaption);
1883 }
1884 
1886 {
1887  QCString baseName=df->file();
1888  int i;
1889  if ((i=baseName.findRev('/'))!=-1)
1890  {
1891  baseName=baseName.right(baseName.length()-i-1);
1892  }
1893  QCString outDir = Config_getString(RTF_OUTPUT);
1894  writeDiaGraphFromFile(df->file(),outDir,baseName,DIA_BITMAP);
1895  includePicturePreRTF(baseName + ".png", true, df->hasCaption());
1896 }
1897 
1898 void RTFDocVisitor::writePlantUMLFile(const QCString &fileName, bool hasCaption)
1899 {
1900  QCString baseName=fileName;
1901  int i;
1902  if ((i=baseName.findRev('/'))!=-1)
1903  {
1904  baseName=baseName.right(baseName.length()-i-1);
1905  }
1906  QCString outDir = Config_getString(RTF_OUTPUT);
1908  includePicturePreRTF(baseName + ".png", true, hasCaption);
1909 }
DocStyleChange::style
Style style() const
Definition: docparser.h:396
DocParamSect::Unknown
@ Unknown
Definition: docparser.h:1172
DocHtmlList::Ordered
@ Ordered
Definition: docparser.h:1112
RTFDocVisitor::includePicturePreRTF
void includePicturePreRTF(const QCString name, bool isTypeRTF, bool hasCaption, bool inlineImage=FALSE)
Definition: rtfdocvisitor.cpp:1190
RTFDocVisitor::endLink
void endLink(const QCString &ref)
Definition: rtfdocvisitor.cpp:1824
getLanguageFromFileName
SrcLangExt getLanguageFromFileName(const QCString &fileName)
Definition: util.cpp:6876
QList::at
type * at(uint i) const
Definition: qlist.h:94
DocInclude::blockId
QCString blockId() const
Definition: docparser.h:604
DocInclude::SnippetDoc
@ SnippetDoc
Definition: docparser.h:584
RTFDocVisitor::m_indentLevel
int m_indentLevel
Definition: rtfdocvisitor.h:171
RTFDocVisitor::writeMscFile
void writeMscFile(const QCString &fileName, bool hasCaption)
Definition: rtfdocvisitor.cpp:1872
QFileInfo
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:52
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition: qcstring.h:191
DocParamSect::hasInOutSpecifier
bool hasInOutSpecifier() const
Definition: docparser.h:1184
DocInclude::exampleFile
QCString exampleFile() const
Definition: docparser.h:606
RTFDocVisitor
Concrete visitor implementation for RTF output.
Definition: rtfdocvisitor.h:31
lineBlock
int lineBlock(const QCString text, const QCString marker)
Returns the line number of the line following the line with the marker.
Definition: util.cpp:7875
DocNode::kind
virtual Kind kind() const =0
DocFormula::relPath
QCString relPath() const
Definition: docparser.h:682
rtfstyle.h
DocAnchor::anchor
QCString anchor() const
Definition: docparser.h:336
DocURL::isEmail
bool isEmail() const
Definition: docparser.h:290
DocPara::isLast
bool isLast() const
Definition: docparser.h:1205
Translator::trRemarks
virtual QCString trRemarks()=0
Doxygen::parserManager
static ParserManager * parserManager
Definition: doxygen.h:130
PlantumlManager::PUML_BITMAP
@ PUML_BITMAP
Definition: plantuml.h:44
uint
unsigned uint
Definition: qglobal.h:351
RTFDocVisitor::m_ci
CodeOutputInterface & m_ci
Definition: rtfdocvisitor.h:168
DocWord
Node representing a word.
Definition: docparser.h:240
DocInclude::SnipWithLines
@ SnipWithLines
Definition: docparser.h:584
DocXRefItem::file
QCString file() const
Definition: docparser.h:767
DocInclude::extension
QCString extension() const
Definition: docparser.h:595
DocParamSect::type
Type type() const
Definition: docparser.h:1183
DocVerbatim::children
const QList< DocNode > & children() const
Definition: docparser.h:558
RTFDocVisitor::visit
void visit(DocWord *)
Definition: rtfdocvisitor.cpp:91
DocSection::file
QCString file() const
Definition: docparser.h:1034
DocStyleChange::S
@ S
Definition: docparser.h:388
RTFDocVisitor::m_insidePre
bool m_insidePre
Definition: rtfdocvisitor.h:169
DocSimpleSect::Post
@ Post
Definition: docparser.h:1133
DocAnchor::file
QCString file() const
Definition: docparser.h:337
DocHtmlCell
Node representing a HTML table cell.
Definition: docparser.h:1334
DocVerbatim
Node representing a verbatim, unparsed text fragment.
Definition: docparser.h:539
QFileInfo::dirPath
QString dirPath(bool absPath=FALSE) const
Definition: qfileinfo_unix.cpp:358
DocNode::accept
virtual void accept(DocVisitor *v)=0
RTFDocVisitor::startLink
void startLink(const QCString &ref, const QCString &file, const QCString &anchor)
Definition: rtfdocvisitor.cpp:1794
DocHtmlRow::isHeading
bool isHeading() const
Definition: docparser.h:1397
DocRoot::singleLine
bool singleLine() const
Definition: docparser.h:1482
DIA_BITMAP
@ DIA_BITMAP
Definition: dia.h:24
DocInclude::Snippet
@ Snippet
Definition: docparser.h:584
QCString::findRev
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:97
DocNode::Kind_Word
@ Kind_Word
Definition: docparser.h:91
DocParamSect::Out
@ Out
Definition: docparser.h:1176
DocRef::file
QCString file() const
Definition: docparser.h:921
FTextStream
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:12
PlantumlManager::generatePlantUMLOutput
void generatePlantUMLOutput(const char *baseName, const char *outDir, OutputFormat format)
Convert a PlantUML file to an image.
Definition: plantuml.cpp:85
DocSecRefItem
Node representing a reference to a section.
Definition: docparser.h:1047
DocMscFile::file
QCString file() const
Definition: docparser.h:845
DocInternalRef
Node representing an internal reference to some item.
Definition: docparser.h:945
DocHRef
Node representing a Hypertext reference.
Definition: docparser.h:962
DocInclude::text
QCString text() const
Definition: docparser.h:602
MSC_BITMAP
@ MSC_BITMAP
Definition: msc.h:24
rtf_Style_Reset
char rtf_Style_Reset[]
Definition: rtfstyle.cpp:41
rtf_maxIndentLevels
const int rtf_maxIndentLevels
Definition: rtfstyle.h:42
DocSection::title
QCString title() const
Definition: docparser.h:1031
DocImage::Rtf
@ Rtf
Definition: docparser.h:787
msc.h
QMIN
#define QMIN(a, b)
Definition: qglobal.h:393
Translator::trAttention
virtual QCString trAttention()=0
DocSymbol
Node representing a special symbol.
Definition: docparser.h:414
DocParamSect::Type
Type
Definition: docparser.h:1171
SrcLangExt
SrcLangExt
Language as given by extension.
Definition: types.h:43
DocStyleChange::Subscript
@ Subscript
Definition: docparser.h:379
DocVerbatim::ManOnly
@ ManOnly
Definition: docparser.h:541
align
static QCString align(DocHtmlCell *cell)
Definition: rtfdocvisitor.cpp:43
QCString::lower
QCString lower() const
Definition: qcstring.cpp:291
RTFListItemInfo::isEnum
bool isEnum
Definition: rtfstyle.h:38
QListIterator
The QListIterator class provides an iterator for QList collections.
Definition: qlist.h:128
DocSimpleSectSep
Node representing a separator between two simple sections of the same type.
Definition: docparser.h:1156
QCString::startsWith
bool startsWith(const char *s) const
Definition: qcstring.cpp:221
DocEmoji::index
int index() const
Definition: docparser.h:502
DocRef
Node representing a reference to some item.
Definition: docparser.h:916
DocInclude::VerbInclude
@ VerbInclude
Definition: docparser.h:583
DocInclude::type
Type type() const
Definition: docparser.h:601
Translator::trExceptions
virtual QCString trExceptions()=0
data
const char *const void * data
Definition: iconv.h:120
Translator::trSince
virtual QCString trSince()=0
DocParBlock
Node representing an block of paragraphs.
Definition: docparser.h:1087
DocInternalRef::file
QCString file() const
Definition: docparser.h:950
QCString::length
uint length() const
Returns the length of the string, excluding the 0-terminator.
Definition: qcstring.h:197
createFileDef
FileDef * createFileDef(const char *p, const char *n, const char *ref, const char *dn)
Definition: filedef.cpp:183
QFile::writeBlock
int writeBlock(const char *data, uint len)
Definition: qfile_unix.cpp:537
DocNode::Kind_LinkedWord
@ Kind_LinkedWord
Definition: docparser.h:132
DocHtmlListItem
Node representing a HTML list item.
Definition: docparser.h:1304
languages.l
l
Definition: languages.py:75
DocVerbatim::context
QCString context() const
Definition: docparser.h:548
EmojiEntityMapper::instance
static EmojiEntityMapper * instance()
Returns the one and only instance of the Emoji entity mapper.
Definition: emoji.cpp:1539
IO_WriteOnly
#define IO_WriteOnly
Definition: qiodevice.h:62
StyleData::reference
const char * reference() const
Definition: rtfstyle.h:67
DocParamSect::In
@ In
Definition: docparser.h:1176
err
void err(const char *fmt,...)
Definition: message.cpp:238
DocDotFile::file
QCString file() const
Definition: docparser.h:822
DocSimpleSect::Since
@ Since
Definition: docparser.h:1132
DocHtmlRow::numCells
uint numCells() const
Definition: docparser.h:1393
DocInclude
Node representing an included text block from file.
Definition: docparser.h:581
QList< DocNode >
DocSimpleList
Node representing a simple list.
Definition: docparser.h:1099
DocVerbatim::Dot
@ Dot
Definition: docparser.h:541
DocImage::type
Type type() const
Definition: docparser.h:791
DocSimpleSect::Version
@ Version
Definition: docparser.h:1132
DocDiaFile::hasCaption
bool hasCaption() const
Definition: docparser.h:870
HtmlAttrib::value
QCString value
Definition: htmlattrib.h:25
DocDotFile::hasCaption
bool hasCaption() const
Definition: docparser.h:824
DocDotFile
Node representing a dot file.
Definition: docparser.h:816
extractBlock
QCString extractBlock(const QCString text, const QCString marker)
Returns the section of text, in between a pair of markers.
Definition: util.cpp:7830
RTFDocVisitor::m_lastIsPara
bool m_lastIsPara
Definition: rtfdocvisitor.h:173
DocCite::anchor
QCString anchor() const
Definition: docparser.h:357
Translator::trReturns
virtual QCString trReturns()=0
config.h
DocIncOperator::context
QCString context() const
Definition: docparser.h:649
DocRef::anchor
QCString anchor() const
Definition: docparser.h:924
DocStyleChange::Div
@ Div
Definition: docparser.h:383
DocVisitor_RTF
const int DocVisitor_RTF
Definition: docvisitor.h:26
DocImage
Node representing an image.
Definition: docparser.h:785
DocIncOperator::isLast
bool isLast() const
Definition: docparser.h:652
DocStyleChange::Ins
@ Ins
Definition: docparser.h:387
DocVerbatim::PlantUML
@ PlantUML
Definition: docparser.h:541
DocVerbatim::XmlOnly
@ XmlOnly
Definition: docparser.h:541
DocHtmlTable
Node representing a HTML table.
Definition: docparser.h:1423
DocParamList::direction
DocParamSect::Direction direction() const
Definition: docparser.h:1256
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:134
DocHtmlRow
Node representing a HTML table row.
Definition: docparser.h:1387
RTFDocVisitor::m_langExt
QCString m_langExt
Definition: rtfdocvisitor.h:174
DocIncOperator::isFirst
bool isFirst() const
Definition: docparser.h:651
DocLinkedWord::word
QCString word() const
Definition: docparser.h:261
DocWord::word
QCString word() const
Definition: docparser.h:243
DocSimpleSect::Rcs
@ Rcs
Definition: docparser.h:1133
DocSimpleSect::Invar
@ Invar
Definition: docparser.h:1133
DocNode
Abstract node interface with type information.
Definition: docparser.h:87
DocImage::hasCaption
bool hasCaption() const
Definition: docparser.h:793
DocVerbatim::type
Type type() const
Definition: docparser.h:546
DocInclude::LatexInclude
@ LatexInclude
Definition: docparser.h:583
FileDef
A model of a file symbol.
Definition: filedef.h:65
ParserManager::getCodeParser
CodeParserInterface & getCodeParser(const char *extension)
Gets the interface to the parser associated with given extension.
Definition: parserintf.h:227
DocInclude::file
QCString file() const
Definition: docparser.h:594
Config_getString
#define Config_getString(val)
Definition: config.h:34
visitCaption
static void visitCaption(RTFDocVisitor *parent, QList< DocNode > children)
Definition: rtfdocvisitor.cpp:286
qfileinfo.h
RTFDocVisitor::writeDiaFile
void writeDiaFile(DocDiaFile *)
Definition: rtfdocvisitor.cpp:1885
Translator::trNote
virtual QCString trNote()=0
DocIncOperator::includeFileName
QCString includeFileName() const
Definition: docparser.h:657
Translator::trReturnValues
virtual QCString trReturnValues()=0
getFileNameExtension
QCString getFileNameExtension(QCString fn)
Definition: util.cpp:6893
DocVerbatim::LatexOnly
@ LatexOnly
Definition: docparser.h:541
TRUE
@ TRUE
Definition: mscgen_bool.h:29
outputgen.h
DocVerbatim::hasCaption
bool hasCaption() const
Definition: docparser.h:555
FALSE
@ FALSE
Definition: mscgen_bool.h:28
dot.h
DocVerbatim::Verbatim
@ Verbatim
Definition: docparser.h:541
DocIncOperator::type
Type type() const
Definition: docparser.h:633
DocSimpleSect::Date
@ Date
Definition: docparser.h:1132
DocLinkedWord::ref
QCString ref() const
Definition: docparser.h:265
Translator::trInvariant
virtual QCString trInvariant()=0
DocIncOperator::line
int line() const
Definition: docparser.h:645
HtmlAttribList
A list of Html attributes.
Definition: htmlattrib.h:33
RTFDocVisitor::getStyle
QCString getStyle(const char *name)
Definition: rtfdocvisitor.cpp:68
Translator::trCopyright
virtual QCString trCopyright()=0
QString::utf8
QCString utf8() const
Definition: qstring.cpp:14558
DocStyleChange::Superscript
@ Superscript
Definition: docparser.h:380
DocStyleChange::Small
@ Small
Definition: docparser.h:378
message.h
DocDiaFile::file
QCString file() const
Definition: docparser.h:868
DocNode::Kind_ParamSect
@ Kind_ParamSect
Definition: docparser.h:133
DocSimpleSect::type
Type type() const
Definition: docparser.h:1138
DocStyleChange::Italic
@ Italic
Definition: docparser.h:375
Translator::trWarning
virtual QCString trWarning()=0
DocTitle
Node representing a simple section title.
Definition: docparser.h:750
DocVerbatim::Msc
@ Msc
Definition: docparser.h:541
DocParamSect
Node representing a parameter section.
Definition: docparser.h:1167
DocXRefItem
Node representing an item of a cross-referenced list.
Definition: docparser.h:763
Translator::trDate
virtual QCString trDate()=0
theTranslator
Translator * theTranslator
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition: language.cpp:157
Translator::trTemplateParameters
virtual QCString trTemplateParameters()=0
DocSimpleSect::Unknown
@ Unknown
Definition: docparser.h:1132
DocVerbatim::RtfOnly
@ RtfOnly
Definition: docparser.h:541
RTFDocVisitor::incIndentLevel
void incIndentLevel()
Definition: rtfdocvisitor.cpp:77
DocCite::text
QCString text() const
Definition: docparser.h:358
DocAutoList
Node representing an auto List.
Definition: docparser.h:717
CodeParserInterface::parseCode
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=0, bool showLineNumbers=TRUE, const Definition *searchCtx=0, bool collectXRefs=TRUE)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
DocIncOperator
Node representing a include/dontinclude operator block.
Definition: docparser.h:624
doxygen.h
DocSimpleSect::Note
@ Note
Definition: docparser.h:1133
parserintf.h
DocParamList
Node representing a parameter list.
Definition: docparser.h:1242
DocVerbatim::exampleFile
QCString exampleFile() const
Definition: docparser.h:551
DocStyleChange::Center
@ Center
Definition: docparser.h:377
DocStyleChange::Underline
@ Underline
Definition: docparser.h:385
RTFDocVisitor::m_enabled
QStack< bool > m_enabled
Definition: rtfdocvisitor.h:172
rtf_listItemInfo
RTFListItemInfo rtf_listItemInfo[rtf_maxIndentLevels]
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition: rtfstyle.cpp:28
language.h
writeDotGraphFromFile
void writeDotGraphFromFile(const char *inFile, const char *outDir, const char *outFile, GraphOutputFormat format)
Definition: dot.cpp:267
DocWhiteSpace
Node representing some amount of white space.
Definition: docparser.h:513
QFile::open
bool open(int)
Definition: qfile_unix.cpp:134
QList::count
uint count() const
Definition: qlist.h:66
QCString::right
QCString right(uint len) const
Definition: qcstring.cpp:259
QListIterator::current
type * current() const
Definition: qlist.h:147
DocURL::url
QCString url() const
Definition: docparser.h:287
RTFListItemInfo::number
int number
Definition: rtfstyle.h:39
DocMscFile::hasCaption
bool hasCaption() const
Definition: docparser.h:847
DocHtmlDescList
Node representing a Html description list.
Definition: docparser.h:1011
DocSimpleSect::See
@ See
Definition: docparser.h:1132
DocSection
Node representing a normal section.
Definition: docparser.h:1025
DocIndexEntry::entry
QCString entry() const
Definition: docparser.h:704
QStack::push
void push(const type *d)
Definition: qstack.h:58
docparser.h
DocIncOperator::Skip
@ Skip
Definition: docparser.h:626
Translator::trParameters
virtual QCString trParameters()=0
DocInclude::DocbookInclude
@ DocbookInclude
Definition: docparser.h:585
DocSimpleSect::Remark
@ Remark
Definition: docparser.h:1133
DocNode::Kind_Sep
@ Kind_Sep
Definition: docparser.h:144
DocSimpleSect::Return
@ Return
Definition: docparser.h:1132
CodeOutputInterface
Output interface for code parser.
Definition: outputgen.h:60
DocXRefItem::anchor
QCString anchor() const
Definition: docparser.h:768
writeMscGraphFromFile
void writeMscGraphFromFile(const char *inFile, const char *outDir, const char *outFile, MscOutputFormat format)
Definition: msc.cpp:94
DocLinkedWord::file
QCString file() const
Definition: docparser.h:263
DocInclude::IncludeDoc
@ IncludeDoc
Definition: docparser.h:584
DocStyleChange::Strike
@ Strike
Definition: docparser.h:384
RTFDocVisitor::visitPre
void visitPre(DocAutoList *)
Definition: rtfdocvisitor.cpp:663
filedef.h
RTFDocVisitor::RTFDocVisitor
RTFDocVisitor(FTextStream &t, CodeOutputInterface &ci, const char *langExt)
Definition: rtfdocvisitor.cpp:61
dia.h
EmojiEntityMapper::unicode
const char * unicode(int index) const
Access routine to the unicode sequence for the Emoji entity.
Definition: emoji.cpp:1584
DocHtmlList
Node representing a Html list.
Definition: docparser.h:1110
DocIncOperator::exampleFile
QCString exampleFile() const
Definition: docparser.h:656
DocStyleChange::Del
@ Del
Definition: docparser.h:386
DocHtmlHeader::level
int level() const
Definition: docparser.h:985
HtmlEntityMapper::instance
static HtmlEntityMapper * instance()
Returns the one and only instance of the HTML entity mapper.
Definition: htmlentity.cpp:343
Translator::trAuthor
virtual QCString trAuthor(bool first_capital, bool singular)=0
DocFormula::name
QCString name() const
Definition: docparser.h:680
DocInclude::isExample
bool isExample() const
Definition: docparser.h:605
DocVerbatim::HtmlOnly
@ HtmlOnly
Definition: docparser.h:541
DocDiaFile
Node representing a dia file.
Definition: docparser.h:862
RTFDocVisitor::m_hide
bool m_hide
Definition: rtfdocvisitor.h:170
DocParamSect::hasTypeSpecifier
bool hasTypeSpecifier() const
Definition: docparser.h:1185
DocStyleChange::Preformatted
@ Preformatted
Definition: docparser.h:381
DocSimpleSect
Node representing a simple section.
Definition: docparser.h:1128
DocStyleChange
Node representing a style change.
Definition: docparser.h:372
DocVerbatim::language
QCString language() const
Definition: docparser.h:553
DocStyleChange::Span
@ Span
Definition: docparser.h:382
DocCite::file
QCString file() const
Definition: docparser.h:354
Translator::trPostcondition
virtual QCString trPostcondition()=0
DocParamSect::TemplateParam
@ TemplateParam
Definition: docparser.h:1172
RTFDocVisitor::m_t
FTextStream & m_t
Definition: rtfdocvisitor.h:167
DocInclude::DontIncWithLines
@ DontIncWithLines
Definition: docparser.h:585
DocRef::isSubPage
bool isSubPage() const
Definition: docparser.h:930
DocPara
Node representing a paragraph in the documentation tree.
Definition: docparser.h:1195
DocSection::level
int level() const
Definition: docparser.h:1030
DocSimpleSect::Pre
@ Pre
Definition: docparser.h:1133
DocStyleChange::Bold
@ Bold
Definition: docparser.h:374
DocCite::ref
QCString ref() const
Definition: docparser.h:356
QListIterator::toFirst
type * toFirst()
Definition: qlist.h:136
Translator::trPrecondition
virtual QCString trPrecondition()=0
DocImage::isInlineImage
bool isInlineImage() const
Definition: docparser.h:798
QFileInfo::fileName
QString fileName() const
Definition: qfileinfo_unix.cpp:387
DocRef::ref
QCString ref() const
Definition: docparser.h:923
PlantumlManager::instance
static PlantumlManager * instance()
Definition: plantuml.cpp:119
DocStyleChange::Code
@ Code
Definition: docparser.h:376
DocParamSect::Param
@ Param
Definition: docparser.h:1172
GOF_BITMAP
@ GOF_BITMAP
Definition: dotgraph.h:26
DocLineBreak
Node representing a line break.
Definition: docparser.h:301
HtmlEntityMapper::rtf
const char * rtf(DocSymbol::SymType symb) const
Access routine to the RTF code of the HTML entity.
Definition: htmlentity.cpp:450
HtmlAttrib::name
QCString name
Definition: htmlattrib.h:24
DocText
Root node of a text fragment.
Definition: docparser.h:1466
RTFDocVisitor::decIndentLevel
void decIndentLevel()
Definition: rtfdocvisitor.cpp:82
QCString::data
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition: qcstring.h:209
DocInclude::IncWithLines
@ IncWithLines
Definition: docparser.h:584
DocAnchor
Node representing an anchor.
Definition: docparser.h:332
DocHtmlDescTitle
Node representing a Html description item.
Definition: docparser.h:997
DocSymbol::symbol
SymType symbol() const
Definition: docparser.h:487
RTFDocVisitor::popEnabled
void popEnabled()
Definition: rtfdocvisitor.cpp:1842
DocRoot::indent
bool indent() const
Definition: docparser.h:1481
DocSimpleSect::Authors
@ Authors
Definition: docparser.h:1132
DocParamSect::Unspecified
@ Unspecified
Definition: docparser.h:1176
Translator::trVersion
virtual QCString trVersion()=0
DocVisitor
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:91
getDotImageExtension
QCString getDotImageExtension(void)
Definition: util.cpp:8436
DocWhiteSpace::chars
QCString chars() const
Definition: docparser.h:518
DocHorRuler
Node representing a horizontal ruler.
Definition: docparser.h:317
DocCite
Node representing a citation of some bibliographic reference.
Definition: docparser.h:350
DocEmoji
Node representing a n emoji.
Definition: docparser.h:498
DocLinkedWord
Node representing a word that can be linked to something.
Definition: docparser.h:256
StyleData
Definition: rtfstyle.h:57
rtfFormatBmkStr
QCString rtfFormatBmkStr(const char *name)
Definition: util.cpp:6543
DocIndexEntry
Node representing an entry in the index.
Definition: docparser.h:696
Config_getBool
#define Config_getBool(val)
Definition: config.h:35
DocHRef::url
QCString url() const
Definition: docparser.h:968
DocEmoji::name
QCString name() const
Definition: docparser.h:501
rtf_Style
QDict< StyleData > rtf_Style(257)
DBG_RTF
#define DBG_RTF(x)
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition: rtfdocvisitor.cpp:41
DocInclude::DontInclude
@ DontInclude
Definition: docparser.h:583
DocParamList::paramTypes
const QList< DocNode > & paramTypes()
Definition: docparser.h:1254
DocInclude::HtmlInclude
@ HtmlInclude
Definition: docparser.h:583
DocHtmlDescData
Node representing a HTML description data.
Definition: docparser.h:1321
writeDiaGraphFromFile
void writeDiaGraphFromFile(const char *inFile, const char *outDir, const char *outFile, DiaOutputFormat format)
Definition: dia.cpp:28
emoji.h
QStack::pop
type * pop()
Definition: qstack.h:59
QFile::remove
bool remove()
Definition: qfile.cpp:205
DocParamSect::InOut
@ InOut
Definition: docparser.h:1176
RTFDocVisitor::visitPost
void visitPost(DocAutoList *)
Definition: rtfdocvisitor.cpp:673
DocInternal
Node representing an internal section of documentation.
Definition: docparser.h:1076
DocIncOperator::isExample
bool isExample() const
Definition: docparser.h:655
plantuml.h
ASSERT
#define ASSERT(x)
Definition: qglobal.h:591
DocVerbatim::text
QCString text() const
Definition: docparser.h:547
DocSecRefList
Node representing a list of section references.
Definition: docparser.h:1065
rtfdocvisitor.h
RTFDocVisitor::pushEnabled
void pushEnabled()
Definition: rtfdocvisitor.cpp:1837
DocXRefItem::title
QCString title() const
Definition: docparser.h:769
DocParamList::parameters
const QList< DocNode > & parameters()
Definition: docparser.h:1253
DocInternalRef::anchor
QCString anchor() const
Definition: docparser.h:952
DocVerbatim::DocbookOnly
@ DocbookOnly
Definition: docparser.h:541
DocIncOperator::showLineNo
bool showLineNo() const
Definition: docparser.h:646
DocRoot
Root node of documentation tree.
Definition: docparser.h:1476
RTFDocVisitor::includePicturePostRTF
void includePicturePostRTF(bool isTypeRTF, bool hasCaption, bool inlineImage=FALSE)
Definition: rtfdocvisitor.cpp:1233
DocHtmlCaption
Node representing a HTML table caption.
Definition: docparser.h:1368
RTFDocVisitor::writePlantUMLFile
void writePlantUMLFile(const QCString &fileName, bool hasCaption)
Definition: rtfdocvisitor.cpp:1898
DocSimpleSect::Attention
@ Attention
Definition: docparser.h:1133
DocMscFile
Node representing a msc file.
Definition: docparser.h:839
endl
QTextStream & endl(QTextStream &s)
Definition: qtextstream.cpp:2030
RTFDocVisitor::writeDotFile
void writeDotFile(const QCString &fileName, bool hasCaption)
Definition: rtfdocvisitor.cpp:1854
DocInclude::XmlInclude
@ XmlInclude
Definition: docparser.h:585
DocSimpleSect::Warning
@ Warning
Definition: docparser.h:1133
htmlentity.h
DocHtmlBlockQuote
Node representing an HTML blockquote.
Definition: docparser.h:1452
rtf_pageWidth
const int rtf_pageWidth
Copyright (C) 1997-2020 by Dimitri van Heesch.
Definition: rtfstyle.h:23
DocIncOperator::text
QCString text() const
Definition: docparser.h:647
DocVhdlFlow
Node representing a VHDL flow chart.
Definition: docparser.h:885
DocNode::parent
DocNode * parent() const
Definition: docparser.h:156
PlantumlManager::writePlantUMLSource
QCString writePlantUMLSource(const QCString &outDir, const QCString &fileName, const QCString &content, OutputFormat format)
Write a PlantUML compatible file.
Definition: plantuml.cpp:30
DocInclude::ManInclude
@ ManInclude
Definition: docparser.h:585
util.h
Copyright (C) 1997-2015 by Dimitri van Heesch.
DocSimpleSect::Copyright
@ Copyright
Definition: docparser.h:1133
DocVerbatim::isExample
bool isExample() const
Definition: docparser.h:550
DocLinkedWord::anchor
QCString anchor() const
Definition: docparser.h:266
DocParamSect::RetVal
@ RetVal
Definition: docparser.h:1172
DocImage::name
QCString name() const
Definition: docparser.h:792
DocInclude::RtfInclude
@ RtfInclude
Definition: docparser.h:585
DocParamSect::Exception
@ Exception
Definition: docparser.h:1172
QFile::close
void close()
Definition: qfile_unix.cpp:614
RTFDocVisitor::filter
void filter(const char *str, bool verbatim=FALSE)
Definition: rtfdocvisitor.cpp:1748
DocSimpleSect::Author
@ Author
Definition: docparser.h:1132
DocSimpleListItem
Node representing a simple list item.
Definition: docparser.h:1284
DocVerbatim::Code
@ Code
Definition: docparser.h:541
DocSeparator
Node representing a separator.
Definition: docparser.h:526
DocHtmlHeader
Node Html heading.
Definition: docparser.h:981
DocFormula::isInline
bool isInline()
Definition: docparser.h:685
QCString::sprintf
QCString & sprintf(const char *format,...)
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition: qcstring.cpp:28
DocRef::targetTitle
QCString targetTitle() const
Definition: docparser.h:925
DocInclude::context
QCString context() const
Definition: docparser.h:603
DocURL
Node representing a URL (or email address)
Definition: docparser.h:283
QFile
The QFile class is an I/O device that operates on files.
Definition: qfile.h:51
DocSection::anchor
QCString anchor() const
Definition: docparser.h:1032
DocStyleChange::enable
bool enable() const
Definition: docparser.h:398
DocHtmlCell::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1346
DocSimpleSect::User
@ User
Definition: docparser.h:1133
Translator::trSeeAlso
virtual QCString trSeeAlso()=0
DocAutoListItem
Node representing an item of a auto list.
Definition: docparser.h:734
DocInclude::Include
@ Include
Definition: docparser.h:583
DocRef::hasLinkText
bool hasLinkText() const
Definition: docparser.h:926
DocFormula
Node representing an item of a cross-referenced list.
Definition: docparser.h:676