My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
RTFDocVisitor Class Reference

Concrete visitor implementation for RTF output. More...

#include <rtfdocvisitor.h>

Inheritance diagram for RTFDocVisitor:
DocVisitor

Public Member Functions

 RTFDocVisitor (FTextStream &t, CodeOutputInterface &ci, const char *langExt)
 
void visit (DocWord *)
 
void visit (DocLinkedWord *)
 
void visit (DocWhiteSpace *)
 
void visit (DocSymbol *)
 
void visit (DocURL *)
 
void visit (DocLineBreak *)
 
void visit (DocHorRuler *)
 
void visit (DocStyleChange *)
 
void visit (DocVerbatim *)
 
void visit (DocAnchor *)
 
void visit (DocInclude *)
 
void visit (DocIncOperator *)
 
void visit (DocFormula *)
 
void visit (DocIndexEntry *)
 
void visit (DocSimpleSectSep *)
 
void visit (DocCite *)
 
void visitPre (DocAutoList *)
 
void visitPost (DocAutoList *)
 
void visitPre (DocAutoListItem *)
 
void visitPost (DocAutoListItem *)
 
void visitPre (DocPara *)
 
void visitPost (DocPara *)
 
void visitPre (DocRoot *)
 
void visitPost (DocRoot *)
 
void visitPre (DocSimpleSect *)
 
void visitPost (DocSimpleSect *)
 
void visitPre (DocTitle *)
 
void visitPost (DocTitle *)
 
void visitPre (DocSimpleList *)
 
void visitPost (DocSimpleList *)
 
void visitPre (DocSimpleListItem *)
 
void visitPost (DocSimpleListItem *)
 
void visitPre (DocSection *s)
 
void visitPost (DocSection *)
 
void visitPre (DocHtmlList *s)
 
void visitPost (DocHtmlList *s)
 
void visitPre (DocHtmlListItem *)
 
void visitPost (DocHtmlListItem *)
 
void visitPre (DocHtmlDescList *)
 
void visitPost (DocHtmlDescList *)
 
void visitPre (DocHtmlDescTitle *)
 
void visitPost (DocHtmlDescTitle *)
 
void visitPre (DocHtmlDescData *)
 
void visitPost (DocHtmlDescData *)
 
void visitPre (DocHtmlTable *t)
 
void visitPost (DocHtmlTable *t)
 
void visitPre (DocHtmlCaption *)
 
void visitPost (DocHtmlCaption *)
 
void visitPre (DocHtmlRow *)
 
void visitPost (DocHtmlRow *)
 
void visitPre (DocHtmlCell *)
 
void visitPost (DocHtmlCell *)
 
void visitPre (DocInternal *)
 
void visitPost (DocInternal *)
 
void visitPre (DocHRef *)
 
void visitPost (DocHRef *)
 
void visitPre (DocHtmlHeader *)
 
void visitPost (DocHtmlHeader *)
 
void visitPre (DocImage *)
 
void visitPost (DocImage *)
 
void visitPre (DocDotFile *)
 
void visitPost (DocDotFile *)
 
void visitPre (DocMscFile *)
 
void visitPost (DocMscFile *)
 
void visitPre (DocDiaFile *)
 
void visitPost (DocDiaFile *)
 
void visitPre (DocLink *)
 
void visitPost (DocLink *)
 
void visitPre (DocRef *ref)
 
void visitPost (DocRef *)
 
void visitPre (DocSecRefItem *)
 
void visitPost (DocSecRefItem *)
 
void visitPre (DocSecRefList *)
 
void visitPost (DocSecRefList *)
 
void visitPre (DocParamSect *)
 
void visitPost (DocParamSect *)
 
void visitPre (DocParamList *)
 
void visitPost (DocParamList *)
 
void visitPre (DocXRefItem *)
 
void visitPost (DocXRefItem *)
 
void visitPre (DocInternalRef *)
 
void visitPost (DocInternalRef *)
 
void visitPre (DocCopy *)
 
void visitPost (DocCopy *)
 
void visitPre (DocText *)
 
void visitPost (DocText *)
 
void visitPre (DocHtmlBlockQuote *)
 
void visitPost (DocHtmlBlockQuote *)
 
void visitPre (DocVhdlFlow *)
 
void visitPost (DocVhdlFlow *)
 
void visitPre (DocParBlock *)
 
void visitPost (DocParBlock *)
 
- Public Member Functions inherited from DocVisitor
 DocVisitor (int id)
 
virtual ~DocVisitor ()
 
int id () const
 

Private Member Functions

void filter (const char *str, bool verbatim=FALSE)
 
void startLink (const QCString &ref, const QCString &file, const QCString &anchor)
 
void endLink (const QCString &ref)
 
QCString getStyle (const char *name)
 
void incIndentLevel ()
 
void decIndentLevel ()
 
void pushEnabled ()
 
void popEnabled ()
 
void includePicturePreRTF (const QCString name, const bool isTypeRTF, const bool hasCaption)
 
void includePicturePostRTF (const bool isTypeRTF, const bool hasCaption)
 
void writeDotFile (const QCString &fileName, const bool hasCaption)
 
void writeDotFile (DocDotFile *)
 
void writeMscFile (const QCString &fileName, const bool hasCaption)
 
void writeMscFile (DocMscFile *)
 
void writeDiaFile (DocDiaFile *)
 
void writePlantUMLFile (const QCString &fileName, const bool hasCaption)
 

Private Attributes

FTextStreamm_t
 
CodeOutputInterfacem_ci
 
bool m_insidePre
 
bool m_hide
 
int m_indentLevel
 
QStack< bool > m_enabled
 
bool m_lastIsPara
 
QCString m_langExt
 

Detailed Description

Concrete visitor implementation for RTF output.

Definition at line 30 of file rtfdocvisitor.h.

Constructor & Destructor Documentation

RTFDocVisitor::RTFDocVisitor ( FTextStream t,
CodeOutputInterface ci,
const char *  langExt 
)

Definition at line 60 of file rtfdocvisitor.cpp.

m_hide(FALSE), m_indentLevel(0), m_lastIsPara(FALSE), m_langExt(langExt)
{
}

Member Function Documentation

void RTFDocVisitor::decIndentLevel ( )
private

Definition at line 81 of file rtfdocvisitor.cpp.

References m_indentLevel.

Referenced by visitPost().

void RTFDocVisitor::endLink ( const QCString &  ref)
private

Definition at line 1688 of file rtfdocvisitor.cpp.

References Config_getBool, m_lastIsPara, and m_t.

Referenced by visit(), and visitPost().

{
if (ref.isEmpty() && Config_getBool(RTF_HYPERLINKS))
{
m_t << "}}}";
}
else
{
m_t << "}";
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::filter ( const char *  str,
bool  verbatim = FALSE 
)
private

Definition at line 1612 of file rtfdocvisitor.cpp.

References endl(), and m_t.

Referenced by visit(), and visitPre().

{
if (str)
{
const unsigned char *p=(const unsigned char *)str;
unsigned char c;
//unsigned char pc='\0';
while (*p)
{
//static bool MultiByte = FALSE;
c=*p++;
//if ( MultiByte )
//{
// m_t << getMultiByte( c );
// MultiByte = FALSE;
// continue;
//}
//if ( c >= 0x80 )
//{
// MultiByte = TRUE;
// m_t << getMultiByte( c );
// continue;
//}
switch (c)
{
case '{': m_t << "\\{"; break;
case '}': m_t << "\\}"; break;
case '\\': m_t << "\\\\"; break;
case '\n': if (verbatim)
{
m_t << "\\par" << endl;
}
else
{
m_t << '\n';
}
break;
default: m_t << (char)c;
}
//pc = c;
}
}
}
QCString RTFDocVisitor::getStyle ( const char *  name)
private

Definition at line 67 of file rtfdocvisitor.cpp.

References m_indentLevel, StyleData::reference, and rtf_Style.

Referenced by visit(), visitPost(), and visitPre().

{
QCString n;
n.sprintf("%s%d",name,m_indentLevel);
StyleData *sd = rtf_Style[n];
ASSERT(sd!=0);
return sd->reference;
}
void RTFDocVisitor::incIndentLevel ( )
private

Definition at line 76 of file rtfdocvisitor.cpp.

References m_indentLevel, and rtf_maxIndentLevels.

Referenced by visitPost(), and visitPre().

void RTFDocVisitor::includePicturePostRTF ( const bool  isTypeRTF,
const bool  hasCaption 
)
private

Definition at line 1090 of file rtfdocvisitor.cpp.

References endl(), m_hide, m_t, and popEnabled().

Referenced by visit(), and visitPost().

{
if (isTypeRTF)
{
if (m_hide) return;
if (hasCaption)
{
m_t << "}" <<endl;
m_t << "\\par}" <<endl;
}
else
{
m_t << "}" <<endl;
}
}
else
{
}
}
void RTFDocVisitor::includePicturePreRTF ( const QCString  name,
const bool  isTypeRTF,
const bool  hasCaption 
)
private

Definition at line 1058 of file rtfdocvisitor.cpp.

References endl(), m_hide, m_lastIsPara, m_t, pushEnabled(), and rtf_Style_Reset.

Referenced by visitPre(), writeDiaFile(), writeDotFile(), writeMscFile(), and writePlantUMLFile().

{
if (isTypeRTF)
{
m_t << "\\par" << endl;
m_t << "{" << endl;
if (hasCaption || m_lastIsPara) m_t << "\\par" << endl;
m_t << "\\pard \\qc { \\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
m_t << name;
m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt Image}}" << endl;
m_t << "\\par" << endl;
if (hasCaption)
{
m_t << "\\pard \\qc \\b";
m_t << "{Image \\field\\flddirty{\\*\\fldinst { SEQ Image \\\\*Arabic }}{\\fldrslt {\\noproof 1}} ";
}
}
else // other format -> skip
{
m_hide=TRUE;
}
}
void RTFDocVisitor::popEnabled ( )
private

Definition at line 1706 of file rtfdocvisitor.cpp.

References m_enabled, and m_hide.

Referenced by includePicturePostRTF(), and visit().

{
bool *v=m_enabled.pop();
ASSERT(v!=0);
m_hide = *v;
delete v;
}
void RTFDocVisitor::pushEnabled ( )
private

Definition at line 1701 of file rtfdocvisitor.cpp.

References m_enabled, and m_hide.

Referenced by includePicturePreRTF(), and visit().

{
m_enabled.push(new bool(m_hide));
}
void RTFDocVisitor::startLink ( const QCString &  ref,
const QCString &  file,
const QCString &  anchor 
)
private

Definition at line 1658 of file rtfdocvisitor.cpp.

References Config_getBool, m_lastIsPara, m_t, and rtfFormatBmkStr().

Referenced by visit(), and visitPre().

{
if (ref.isEmpty() && Config_getBool(RTF_HYPERLINKS))
{
QCString refName;
if (!file.isEmpty())
{
refName+=file;
}
if (!file.isEmpty() && anchor)
{
refName+='_';
}
if (anchor)
{
refName+=anchor;
}
m_t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
m_t << rtfFormatBmkStr(refName);
m_t << "\" }{}";
m_t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
}
else
{
m_t << "{\\b ";
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visit ( DocWord w)
virtual

Implements DocVisitor.

Definition at line 90 of file rtfdocvisitor.cpp.

References DBG_RTF, filter(), m_hide, m_lastIsPara, and DocWord::word().

Referenced by visitPre().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocWord)}\n");
filter(w->word());
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visit ( DocLinkedWord w)
virtual

Implements DocVisitor.

Definition at line 98 of file rtfdocvisitor.cpp.

References DocLinkedWord::anchor(), DBG_RTF, endLink(), DocLinkedWord::file(), filter(), m_hide, m_lastIsPara, DocLinkedWord::ref(), startLink(), and DocLinkedWord::word().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocLinkedWord)}\n");
startLink(w->ref(),w->file(),w->anchor());
filter(w->word());
endLink(w->ref());
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visit ( DocWhiteSpace w)
virtual

Implements DocVisitor.

Definition at line 108 of file rtfdocvisitor.cpp.

References DocWhiteSpace::chars(), DBG_RTF, m_hide, m_insidePre, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocWhiteSpace)}\n");
{
m_t << w->chars();
}
else
{
m_t << " ";
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visit ( DocSymbol s)
virtual

Implements DocVisitor.

Definition at line 123 of file rtfdocvisitor.cpp.

References DBG_RTF, err(), HtmlEntityMapper::instance(), m_hide, m_lastIsPara, m_t, HtmlEntityMapper::rtf(), and DocSymbol::symbol().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocSymbol)}\n");
const char *res = HtmlEntityMapper::instance()->rtf(s->symbol());
if (res)
{
m_t << res;
}
else
{
err("RTF: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visit ( DocURL u)
virtual

Implements DocVisitor.

Definition at line 139 of file rtfdocvisitor.cpp.

References Config_getBool, DBG_RTF, endl(), filter(), DocURL::isEmail(), m_hide, m_lastIsPara, m_t, and DocURL::url().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocURL)}\n");
if (Config_getBool(RTF_HYPERLINKS))
{
m_t << "{\\field "
"{\\*\\fldinst "
"{ HYPERLINK \"";
if (u->isEmail()) m_t << "mailto:";
m_t << u->url();
m_t << "\" }"
"{}";
m_t << "}"
"{\\fldrslt "
"{\\cs37\\ul\\cf2 ";
filter(u->url());
m_t << "}"
"}"
"}" << endl;
}
else
{
m_t << "{\\f2 ";
filter(u->url());
m_t << "}";
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visit ( DocLineBreak )
virtual

Implements DocVisitor.

Definition at line 169 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocLineBreak)}\n");
m_t << "\\par" << endl;
}
void RTFDocVisitor::visit ( DocHorRuler )
virtual

Implements DocVisitor.

Definition at line 177 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocHorRuler)}\n");
m_t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" << endl;
}
void RTFDocVisitor::visit ( DocStyleChange s)
virtual

Implements DocVisitor.

Definition at line 185 of file rtfdocvisitor.cpp.

References DocStyleChange::Bold, DocStyleChange::Center, DocStyleChange::Code, DBG_RTF, DocStyleChange::Div, DocStyleChange::enable(), endl(), getStyle(), DocStyleChange::Italic, m_hide, m_insidePre, m_lastIsPara, m_t, DocStyleChange::Preformatted, rtf_Style_Reset, DocStyleChange::Small, DocStyleChange::Span, DocStyleChange::style(), DocStyleChange::Subscript, and DocStyleChange::Superscript.

{
if (m_hide) return;
m_lastIsPara=FALSE;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocStyleChange)}\n");
switch (s->style())
{
if (s->enable()) m_t << "{\\b "; else m_t << "} ";
break;
if (s->enable()) m_t << "{\\i "; else m_t << "} ";
break;
if (s->enable()) m_t << "{\\f2 "; else m_t << "} ";
break;
if (s->enable()) m_t << "{\\sub "; else m_t << "} ";
break;
if (s->enable()) m_t << "{\\super "; else m_t << "} ";
break;
if (s->enable()) m_t << "{\\qc "; else m_t << "} ";
break;
if (s->enable()) m_t << "{\\sub "; else m_t << "} ";
break;
if (s->enable())
{
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
}
else
{
m_insidePre=FALSE;
m_t << "\\par";
m_t << "}" << endl;
}
break;
case DocStyleChange::Div: /* HTML only */ break;
case DocStyleChange::Span: /* HTML only */ break;
}
}
void RTFDocVisitor::visit ( DocVerbatim s)
virtual

Implements DocVisitor.

Definition at line 241 of file rtfdocvisitor.cpp.

References DocVerbatim::children(), DocVerbatim::Code, Config_getBool, Config_getString, DocVerbatim::context(), DBG_RTF, DocVerbatim::DocbookOnly, DocVerbatim::Dot, endl(), err(), DocVerbatim::exampleFile(), filter(), getLanguageFromFileName(), ParserManager::getParser(), getStyle(), DocVerbatim::hasCaption(), DocVerbatim::HtmlOnly, includePicturePostRTF(), DocVerbatim::isExample(), DocVerbatim::language(), DocVerbatim::LatexOnly, m_ci, m_hide, m_langExt, m_lastIsPara, m_t, DocVerbatim::ManOnly, DocVerbatim::Msc, ParserInterface::parseCode(), Doxygen::parserManager, DocVerbatim::PlantUML, rtf_Style_Reset, DocVerbatim::RtfOnly, DocVerbatim::text(), DocVerbatim::type(), DocVerbatim::Verbatim, visitCaption(), writeDotFile(), writeMscFile(), writePlantUMLFile(), writePlantUMLSource(), and DocVerbatim::XmlOnly.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocVerbatim)}\n");
QCString lang = m_langExt;
if (!s->language().isEmpty()) // explicit language setting
{
lang = s->language();
}
switch(s->type())
{
case DocVerbatim::Code: // fall though
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
->parseCode(m_ci,s->context(),s->text(),langExt,
s->isExample(),s->exampleFile());
//m_t << "\\par" << endl;
m_t << "}" << endl;
break;
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
filter(s->text(),TRUE);
//m_t << "\\par" << endl;
m_t << "}" << endl;
break;
m_t << s->text();
break;
/* nothing */
break;
{
static int dotindex = 1;
QCString fileName(4096);
fileName.sprintf("%s%d%s",
(Config_getString(RTF_OUTPUT)+"/inline_dotgraph_").data(),
dotindex++,
".dot"
);
QFile file(fileName);
if (!file.open(IO_WriteOnly))
{
err("Could not open file %s for writing\n",fileName.data());
}
file.writeBlock( s->text(), s->text().length() );
file.close();
writeDotFile(fileName, s->hasCaption());
visitCaption(this, s->children());
if (Config_getBool(DOT_CLEANUP)) file.remove();
}
break;
{
static int mscindex = 1;
QCString baseName(4096);
baseName.sprintf("%s%d%s",
(Config_getString(RTF_OUTPUT)+"/inline_mscgraph_").data(),
mscindex++,
".msc"
);
QFile file(baseName);
if (!file.open(IO_WriteOnly))
{
err("Could not open file %s for writing\n",baseName.data());
}
QCString text = "msc {";
text+=s->text();
text+="}";
file.writeBlock( text, text.length() );
file.close();
writeMscFile(baseName, s->hasCaption());
visitCaption(this, s->children());
if (Config_getBool(DOT_CLEANUP)) file.remove();
}
break;
{
static QCString rtfOutput = Config_getString(RTF_OUTPUT);
QCString baseName = writePlantUMLSource(rtfOutput,s->exampleFile(),s->text());
writePlantUMLFile(baseName, s->hasCaption());
visitCaption(this, s->children());
}
break;
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visit ( DocAnchor anc)
virtual

Implements DocVisitor.

Definition at line 348 of file rtfdocvisitor.cpp.

References DocAnchor::anchor(), DBG_RTF, endl(), DocAnchor::file(), m_hide, m_lastIsPara, m_t, and rtfFormatBmkStr().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocAnchor)}\n");
QCString anchor;
if (!anc->file().isEmpty())
{
anchor+=anc->file();
}
if (!anc->file().isEmpty() && !anc->anchor().isEmpty())
{
anchor+="_";
}
if (!anc->anchor().isEmpty())
{
anchor+=anc->anchor();
}
m_t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}" << endl;
m_t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}" << endl;
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visit ( DocInclude inc)
virtual

Implements DocVisitor.

Definition at line 370 of file rtfdocvisitor.cpp.

References DocInclude::blockId(), DocInclude::context(), DBG_RTF, DocInclude::DontInclude, endl(), err(), DocInclude::exampleFile(), DocInclude::extension(), extractBlock(), DocInclude::file(), filter(), getLanguageFromFileName(), ParserManager::getParser(), getStyle(), DocInclude::HtmlInclude, DocInclude::Include, DocInclude::IncludeDoc, DocInclude::IncWithLines, DocInclude::isExample(), DocInclude::LatexInclude, m_ci, m_hide, m_lastIsPara, m_t, parseCode(), Doxygen::parserManager, rtf_Style_Reset, DocInclude::Snippet, DocInclude::SnippetDoc, DocInclude::text(), DocInclude::type(), and DocInclude::VerbInclude.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocInclude)}\n");
switch(inc->type())
{
{
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
QFileInfo cfi( inc->file() );
FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
inc->text(),
langExt,
inc->isExample(),
inc->exampleFile(),
&fd, // fileDef,
-1, // start line
-1, // end line
FALSE, // inline fragment
0, // memberDef
TRUE // show line numbers
);
m_t << "\\par";
m_t << "}" << endl;
}
break;
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
inc->text(),langExt,inc->isExample(),
inc->exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
TRUE, // inlineFragment
0, // memberDef
FALSE // show line numbers
);
m_t << "\\par";
m_t << "}" << endl;
break;
break;
break;
break;
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
filter(inc->text());
m_t << "\\par";
m_t << "}" << endl;
break;
m_t << "{" << endl;
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
inc->isExample(),
inc->exampleFile()
);
m_t << "}";
break;
err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
"Please create a bug report\n",__FILE__);
break;
}
}
void RTFDocVisitor::visit ( DocIncOperator op)
virtual

Implements DocVisitor.

Definition at line 456 of file rtfdocvisitor.cpp.

References DocIncOperator::context(), DBG_RTF, endl(), DocIncOperator::exampleFile(), getLanguageFromFileName(), ParserManager::getParser(), getStyle(), DocIncOperator::isExample(), DocIncOperator::isFirst(), DocIncOperator::isLast(), m_ci, m_hide, m_langExt, m_lastIsPara, m_t, ParserInterface::parseCode(), Doxygen::parserManager, popEnabled(), pushEnabled(), rtf_Style_Reset, DocIncOperator::Skip, DocIncOperator::text(), and DocIncOperator::type().

{
//printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
DBG_RTF("{\\comment RTFDocVisitor::visit(DocIncOperator)}\n");
if (op->isFirst())
{
if (!m_hide)
{
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
}
m_hide = TRUE;
}
{
if (!m_hide)
{
->parseCode(m_ci,op->context(),op->text(),langExt,
op->isExample(),op->exampleFile());
}
m_hide=TRUE;
}
if (op->isLast())
{
if (!m_hide)
{
m_t << "\\par";
m_t << "}" << endl;
}
}
else
{
if (!m_hide) m_t << endl;
m_lastIsPara=FALSE;
}
}
void RTFDocVisitor::visit ( DocFormula f)
virtual

Implements DocVisitor.

Definition at line 502 of file rtfdocvisitor.cpp.

References DBG_RTF, m_hide, m_lastIsPara, m_t, and DocFormula::text().

{
if (m_hide) return;
// TODO: do something sensible here, like including a bitmap
DBG_RTF("{\\comment RTFDocVisitor::visit(DocFormula)}\n");
m_t << f->text();
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visit ( DocIndexEntry i)
virtual

Implements DocVisitor.

Definition at line 511 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), DocIndexEntry::entry(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocIndexEntry)}\n");
m_t << "{\\xe \\v " << i->entry() << "}" << endl;
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visit ( DocSimpleSectSep )
virtual

Implements DocVisitor.

Definition at line 519 of file rtfdocvisitor.cpp.

{
}
void RTFDocVisitor::visit ( DocCite cite)
virtual

Implements DocVisitor.

Definition at line 523 of file rtfdocvisitor.cpp.

References DocCite::anchor(), DBG_RTF, endLink(), DocCite::file(), filter(), m_hide, m_t, DocCite::ref(), startLink(), and DocCite::text().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocCite)}\n");
if (!cite->file().isEmpty())
{
startLink(cite->ref(),cite->file(),cite->anchor());
}
else
{
m_t << "{\\b ";
}
filter(cite->text());
if (!cite->file().isEmpty())
{
endLink(cite->ref());
}
else
{
m_t << "}";
}
}
void RTFDocVisitor::visitPost ( DocAutoList )
virtual

Implements DocVisitor.

Definition at line 561 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoList)}\n");
m_t << "\\par";
m_t << "}" << endl;
}
void RTFDocVisitor::visitPost ( DocAutoListItem )
virtual

Implements DocVisitor.

Definition at line 590 of file rtfdocvisitor.cpp.

References DBG_RTF, and decIndentLevel().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoListItem)}\n");
}
void RTFDocVisitor::visitPost ( DocPara p)
virtual

Implements DocVisitor.

Definition at line 601 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), DocPara::isLast(), DocNode::kind(), DocNode::Kind_ParamSect, m_hide, m_lastIsPara, m_t, and DocNode::parent().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n");
if (!m_lastIsPara &&
!p->isLast() && // omit <p> for last paragraph
!(p->parent() && // and for parameters & sections
)
)
{
m_t << "\\par" << endl;
}
}
void RTFDocVisitor::visitPost ( DocRoot r)
virtual

Implements DocVisitor.

Definition at line 625 of file rtfdocvisitor.cpp.

References DBG_RTF, decIndentLevel(), endl(), DocRoot::indent(), m_hide, m_lastIsPara, m_t, and DocRoot::singleLine().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRoot)}\n");
if (!m_lastIsPara && !r->singleLine()) m_t << "\\par" << endl;
m_t << "}";
if (r->indent()) decIndentLevel();
}
void RTFDocVisitor::visitPost ( DocSimpleSect )
virtual

Implements DocVisitor.

Definition at line 692 of file rtfdocvisitor.cpp.

References DBG_RTF, decIndentLevel(), endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n");
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "}"; // end desc
}
void RTFDocVisitor::visitPost ( DocTitle )
virtual

Implements DocVisitor.

Definition at line 707 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), getStyle(), incIndentLevel(), m_hide, m_lastIsPara, m_t, and rtf_Style_Reset.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocTitle)}\n");
m_t << "\\par" << endl;
m_t << "}"; // end bold
m_t << rtf_Style_Reset << getStyle("DescContinue");
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPost ( DocSimpleList )
virtual

Implements DocVisitor.

Definition at line 727 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n");
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "}" << endl;
}
void RTFDocVisitor::visitPost ( DocSimpleListItem )
virtual

Implements DocVisitor.

Definition at line 745 of file rtfdocvisitor.cpp.

References DBG_RTF, and decIndentLevel().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleListItem)}\n");
}
void RTFDocVisitor::visitPost ( DocSection )
virtual

Implements DocVisitor.

Definition at line 774 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSection)}\n");
m_t << "\\par}" << endl; // end section
}
void RTFDocVisitor::visitPost ( DocHtmlList s)
virtual

Implements DocVisitor.

Definition at line 792 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlList)}\n");
m_t << "\\par" << "}" << endl;
}
void RTFDocVisitor::visitPost ( DocHtmlListItem )
virtual

Implements DocVisitor.

Definition at line 820 of file rtfdocvisitor.cpp.

References DBG_RTF, and decIndentLevel().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlListItem)}\n");
}
void RTFDocVisitor::visitPost ( DocHtmlDescList )
virtual

Implements DocVisitor.

Definition at line 835 of file rtfdocvisitor.cpp.

References DBG_RTF, and m_hide.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescList)}\n");
//m_t << "}" << endl;
//m_t << "\\par" << endl;
//m_lastIsPara=TRUE;
}
void RTFDocVisitor::visitPost ( DocHtmlDescTitle )
virtual

Implements DocVisitor.

Definition at line 854 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescTitle)}\n");
m_t << "\\par" << endl;
m_t << "}" << endl;
}
void RTFDocVisitor::visitPost ( DocHtmlDescData )
virtual

Implements DocVisitor.

Definition at line 871 of file rtfdocvisitor.cpp.

References DBG_RTF, decIndentLevel(), endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescData)}\n");
m_t << "\\par";
m_t << "}" << endl;
}
void RTFDocVisitor::visitPost ( DocHtmlTable t)
virtual

Implements DocVisitor.

Definition at line 889 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlTable)}\n");
m_t << "\\pard\\plain" << endl;
m_t << "\\par" << endl;
}
void RTFDocVisitor::visitPost ( DocHtmlCaption )
virtual

Implements DocVisitor.

Definition at line 903 of file rtfdocvisitor.cpp.

References DBG_RTF.

{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCaption)}\n");
}
void RTFDocVisitor::visitPost ( DocHtmlRow )
virtual

Implements DocVisitor.

Definition at line 937 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlRow)}\n");
m_t << endl;
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
m_t << "{\\row }" << endl;
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPost ( DocHtmlCell )
virtual

Implements DocVisitor.

Definition at line 955 of file rtfdocvisitor.cpp.

References DBG_RTF, m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCell)}\n");
m_t << "\\cell }";
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPost ( DocInternal )
virtual

Implements DocVisitor.

Definition at line 977 of file rtfdocvisitor.cpp.

References m_hide.

{
if (m_hide) return;
//DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternal)}\n");
//m_t << "\\par";
//decIndentLevel();
//m_t << "}"; // end desc
//m_lastIsPara=TRUE;
}
void RTFDocVisitor::visitPost ( DocHRef )
virtual

Implements DocVisitor.

Definition at line 1009 of file rtfdocvisitor.cpp.

References Config_getBool, DBG_RTF, m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHRef)}\n");
if (Config_getBool(RTF_HYPERLINKS))
{
m_t << "}"
"}"
"}";
}
else
{
m_t << "}";
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPost ( DocHtmlHeader )
virtual

Implements DocVisitor.

Definition at line 1042 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlHeader)}\n");
// close open table of contens entry
m_t << "} \\par";
m_t << "}" << endl; // end section
}
void RTFDocVisitor::visitPost ( DocImage img)
virtual

Implements DocVisitor.

Definition at line 1084 of file rtfdocvisitor.cpp.

References DBG_RTF, DocImage::hasCaption(), includePicturePostRTF(), DocImage::Rtf, and DocImage::type().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocImage)}\n");
}
void RTFDocVisitor::visitPost ( DocDotFile df)
virtual

Implements DocVisitor.

Definition at line 1117 of file rtfdocvisitor.cpp.

References DBG_RTF, DocDotFile::hasCaption(), and includePicturePostRTF().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocDotFile)}\n");
}
void RTFDocVisitor::visitPost ( DocMscFile df)
virtual

Implements DocVisitor.

Definition at line 1128 of file rtfdocvisitor.cpp.

References DBG_RTF, DocMscFile::hasCaption(), and includePicturePostRTF().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocMscFile)}\n");
}
void RTFDocVisitor::visitPost ( DocDiaFile df)
virtual

Implements DocVisitor.

Definition at line 1140 of file rtfdocvisitor.cpp.

References DBG_RTF, DocDiaFile::hasCaption(), and includePicturePostRTF().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocDiaFile)}\n");
}
void RTFDocVisitor::visitPost ( DocLink lnk)
virtual

Implements DocVisitor.

Definition at line 1153 of file rtfdocvisitor.cpp.

References DBG_RTF, endLink(), m_hide, and DocLink::ref().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocLink)}\n");
endLink(lnk->ref());
}
void RTFDocVisitor::visitPost ( DocRef ref)
virtual

Implements DocVisitor.

Definition at line 1177 of file rtfdocvisitor.cpp.

References DBG_RTF, endLink(), DocRef::file(), m_hide, and DocRef::ref().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRef)}\n");
if (!ref->file().isEmpty()) endLink(ref->ref());
//m_t << " ";
}
void RTFDocVisitor::visitPost ( DocSecRefItem )
virtual

Implements DocVisitor.

Definition at line 1191 of file rtfdocvisitor.cpp.

References DBG_RTF.

{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefItem)}\n");
}
void RTFDocVisitor::visitPost ( DocSecRefList )
virtual

Implements DocVisitor.

Definition at line 1207 of file rtfdocvisitor.cpp.

References DBG_RTF, decIndentLevel(), endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefList)}\n");
m_t << "\\par";
m_t << "}" << endl;
}
void RTFDocVisitor::visitPost ( DocParamSect s)
virtual

Implements DocVisitor.

Definition at line 1277 of file rtfdocvisitor.cpp.

References DBG_RTF, decIndentLevel(), endl(), DocParamSect::Exception, m_hide, m_t, DocParamSect::Param, DocParamSect::RetVal, DocParamSect::TemplateParam, and DocParamSect::type().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamSect)}\n");
//m_t << "\\par" << endl;
bool useTable = s->type()==DocParamSect::Param ||
if (!useTable)
{
}
m_t << "}" << endl;
}
void RTFDocVisitor::visitPost ( DocParamList pl)
virtual

Implements DocVisitor.

Definition at line 1430 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), DocParamSect::Exception, DocNode::kind(), DocNode::Kind_ParamSect, m_hide, m_lastIsPara, m_t, DocParamSect::Param, DocNode::parent(), DocParamSect::RetVal, DocParamSect::TemplateParam, and DocParamSect::Unknown.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamList)}\n");
//DocParamSect *sect = 0;
if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
{
parentType = ((DocParamSect*)pl->parent())->type();
//sect=(DocParamSect*)pl->parent();
}
bool useTable = parentType==DocParamSect::Param ||
parentType==DocParamSect::RetVal ||
parentType==DocParamSect::Exception ||
if (useTable)
{
m_t << "\\cell }" << endl;
//m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
m_t << "{\\row }" << endl;
}
else
{
m_t << "\\par" << endl;
}
}
void RTFDocVisitor::visitPost ( DocXRefItem x)
virtual

Implements DocVisitor.

Definition at line 1514 of file rtfdocvisitor.cpp.

References DBG_RTF, decIndentLevel(), endl(), m_hide, m_lastIsPara, m_t, and DocXRefItem::title().

{
if (m_hide) return;
if (x->title().isEmpty()) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocXRefItem)}\n");
m_t << "\\par" << endl;
m_t << "}" << endl; // end xref item
}
void RTFDocVisitor::visitPost ( DocInternalRef )
virtual

Implements DocVisitor.

Definition at line 1532 of file rtfdocvisitor.cpp.

References DBG_RTF, endLink(), m_hide, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternalRef)}\n");
endLink("");
m_t << " ";
}
void RTFDocVisitor::visitPost ( DocCopy )
virtual

Implements DocVisitor.

Definition at line 1546 of file rtfdocvisitor.cpp.

References DBG_RTF, and m_hide.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocCopy)}\n");
}
void RTFDocVisitor::visitPost ( DocText )
virtual

Implements DocVisitor.

Definition at line 1558 of file rtfdocvisitor.cpp.

References DBG_RTF, and m_hide.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocText)}\n");
}
void RTFDocVisitor::visitPost ( DocHtmlBlockQuote )
virtual

Implements DocVisitor.

Definition at line 1574 of file rtfdocvisitor.cpp.

References DBG_RTF, decIndentLevel(), endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlBlockQuote)}\n");
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "}"; // end desc
}
void RTFDocVisitor::visitPost ( DocVhdlFlow )
virtual

Implements DocVisitor.

Definition at line 1589 of file rtfdocvisitor.cpp.

References m_hide.

{
if (m_hide) return;
}
void RTFDocVisitor::visitPost ( DocParBlock )
virtual

Implements DocVisitor.

Definition at line 1599 of file rtfdocvisitor.cpp.

References m_hide.

{
if (m_hide) return;
}
void RTFDocVisitor::visitPre ( DocAutoList l)
virtual

Implements DocVisitor.

Definition at line 551 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), RTFListItemInfo::isEnum, DocAutoList::isEnumList(), m_hide, m_indentLevel, m_lastIsPara, m_t, RTFListItemInfo::number, and rtf_listItemInfo.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoList)}\n");
m_t << "{" << endl;
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocAutoListItem )
virtual

Implements DocVisitor.

Definition at line 570 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), getStyle(), incIndentLevel(), m_hide, m_indentLevel, m_lastIsPara, m_t, RTFListItemInfo::number, rtf_listItemInfo, and rtf_Style_Reset.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoListItem)}\n");
if (!m_lastIsPara) m_t << "\\par" << endl;
{
m_t << getStyle("ListEnum") << endl;
}
else
{
m_t << getStyle("ListBullet") << endl;
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocPara )
virtual

Implements DocVisitor.

Definition at line 596 of file rtfdocvisitor.cpp.

References DBG_RTF.

{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n");
}
void RTFDocVisitor::visitPre ( DocRoot r)
virtual

Implements DocVisitor.

Definition at line 617 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), incIndentLevel(), DocRoot::indent(), m_hide, m_t, and rtf_Style.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRoot)}\n");
if (r->indent()) incIndentLevel();
m_t << "{" << rtf_Style["BodyText"]->reference << endl;
}
void RTFDocVisitor::visitPre ( DocSimpleSect s)
virtual

Implements DocVisitor.

Definition at line 635 of file rtfdocvisitor.cpp.

References DocSimpleSect::Attention, DocSimpleSect::Author, DocSimpleSect::Authors, DocSimpleSect::Copyright, DocSimpleSect::Date, DBG_RTF, endl(), getStyle(), incIndentLevel(), DocSimpleSect::Invar, m_hide, m_lastIsPara, m_t, DocSimpleSect::Note, DocSimpleSect::Post, DocSimpleSect::Pre, DocSimpleSect::Rcs, DocSimpleSect::Remark, DocSimpleSect::Return, rtf_Style, rtf_Style_Reset, DocSimpleSect::See, DocSimpleSect::Since, theTranslator, Translator::trAttention(), Translator::trAuthor(), Translator::trCopyright(), Translator::trDate(), Translator::trInvariant(), Translator::trNote(), Translator::trPostcondition(), Translator::trPrecondition(), Translator::trRemarks(), Translator::trReturns(), Translator::trSeeAlso(), Translator::trSince(), Translator::trVersion(), Translator::trWarning(), DocSimpleSect::type(), DocSimpleSect::Unknown, DocSimpleSect::User, DocSimpleSect::Version, and DocSimpleSect::Warning.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n");
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "{"; // start desc
//m_t << "{\\b "; // start bold
m_t << "{" << rtf_Style["Heading5"]->reference << endl;
switch(s->type())
{
m_t << theTranslator->trSeeAlso(); break;
m_t << theTranslator->trReturns(); break;
m_t << theTranslator->trAuthor(TRUE,TRUE); break;
m_t << theTranslator->trAuthor(TRUE,FALSE); break;
m_t << theTranslator->trVersion(); break;
m_t << theTranslator->trSince(); break;
m_t << theTranslator->trDate(); break;
m_t << theTranslator->trNote(); break;
m_t << theTranslator->trWarning(); break;
m_t << theTranslator->trRemarks(); break;
case DocSimpleSect::User: break;
case DocSimpleSect::Rcs: break;
}
// special case 1: user defined title
{
m_t << ":";
m_t << "\\par";
m_t << "}"; // end bold
m_t << rtf_Style_Reset << getStyle("DescContinue");
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocTitle )
virtual

Implements DocVisitor.

Definition at line 702 of file rtfdocvisitor.cpp.

References DBG_RTF.

{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocTitle)}\n");
}
void RTFDocVisitor::visitPre ( DocSimpleList )
virtual

Implements DocVisitor.

Definition at line 718 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), RTFListItemInfo::isEnum, m_hide, m_indentLevel, m_lastIsPara, m_t, and rtf_listItemInfo.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n");
m_t << "{" << endl;
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocSimpleListItem )
virtual

Implements DocVisitor.

Definition at line 736 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), getStyle(), incIndentLevel(), m_hide, m_lastIsPara, m_t, and rtf_Style_Reset.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleListItem)}\n");
m_t << "\\par" << rtf_Style_Reset << getStyle("ListBullet") << endl;
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocSection s)
virtual

Implements DocVisitor.

Definition at line 751 of file rtfdocvisitor.cpp.

References DocSection::anchor(), DBG_RTF, endl(), DocSection::file(), filter(), DocSection::level(), m_hide, m_lastIsPara, m_t, rtf_Style, rtf_Style_Reset, rtfFormatBmkStr(), and DocSection::title().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSection)}\n");
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "{\\bkmkstart " << rtfFormatBmkStr(s->file()+"_"+s->anchor()) << "}" << endl;
m_t << "{\\bkmkend " << rtfFormatBmkStr(s->file()+"_"+s->anchor()) << "}" << endl;
m_t << "{{" // start section
QCString heading;
int level = QMIN(s->level()+1,4);
heading.sprintf("Heading%d",level);
// set style
m_t << rtf_Style[heading]->reference << endl;
// make table of contents entry
filter(s->title());
m_t << endl << "\\par" << "}" << endl;
m_t << "{\\tc\\tcl" << level << " \\v ";
filter(s->title());
m_t << "}" << endl;
}
void RTFDocVisitor::visitPre ( DocHtmlList s)
virtual

Implements DocVisitor.

Definition at line 782 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), RTFListItemInfo::isEnum, m_hide, m_indentLevel, m_lastIsPara, m_t, RTFListItemInfo::number, DocHtmlList::Ordered, rtf_listItemInfo, and DocHtmlList::type().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlList)}\n");
m_t << "{" << endl;
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocHtmlListItem )
virtual

Implements DocVisitor.

Definition at line 800 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), getStyle(), incIndentLevel(), m_hide, m_indentLevel, m_lastIsPara, m_t, RTFListItemInfo::number, rtf_listItemInfo, and rtf_Style_Reset.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlListItem)}\n");
m_t << "\\par" << endl;
{
m_t << getStyle("ListEnum") << endl;
}
else
{
m_t << getStyle("ListBullet") << endl;
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocHtmlDescList )
virtual

Implements DocVisitor.

Definition at line 826 of file rtfdocvisitor.cpp.

References DBG_RTF, and m_hide.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescList)}\n");
//m_t << "{" << endl;
//m_t << rtf_Style_Reset << getStyle("ListContinue");
//m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocHtmlDescTitle )
virtual

Implements DocVisitor.

Definition at line 844 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, m_t, and rtf_Style.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescTitle)}\n");
//m_t << "\\par" << endl;
//m_t << "{\\b ";
m_t << "{" << rtf_Style["Heading5"]->reference << endl;
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocHtmlDescData )
virtual

Implements DocVisitor.

Definition at line 863 of file rtfdocvisitor.cpp.

References DBG_RTF, getStyle(), incIndentLevel(), m_hide, m_t, and rtf_Style_Reset.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescData)}\n");
m_t << "{" << rtf_Style_Reset << getStyle("DescContinue");
}
void RTFDocVisitor::visitPre ( DocHtmlTable t)
virtual

Implements DocVisitor.

Definition at line 881 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlTable)}\n");
if (!m_lastIsPara) m_t << "\\par" << endl;
}
void RTFDocVisitor::visitPre ( DocHtmlCaption )
virtual

Implements DocVisitor.

Definition at line 898 of file rtfdocvisitor.cpp.

References DBG_RTF.

{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlCaption)}\n");
}
void RTFDocVisitor::visitPre ( DocHtmlRow r)
virtual

Implements DocVisitor.

Definition at line 908 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), DocHtmlRow::isHeading(), m_hide, m_lastIsPara, m_t, DocHtmlRow::numCells(), and rtf_pageWidth.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlRow)}\n");
uint i,columnWidth=r->numCells()>0 ? rtf_pageWidth/r->numCells() : 10;
m_t << "\\trowd \\trgaph108\\trleft-108"
"\\trbrdrt\\brdrs\\brdrw10 "
"\\trbrdrl\\brdrs\\brdrw10 "
"\\trbrdrb\\brdrs\\brdrw10 "
"\\trbrdrr\\brdrs\\brdrw10 "
"\\trbrdrh\\brdrs\\brdrw10 "
"\\trbrdrv\\brdrs\\brdrw10 "<< endl;
for (i=0;i<r->numCells();i++)
{
if (r->isHeading())
{
m_t << "\\clcbpat16"; // set cell shading to light grey (color 16 in the clut)
}
m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 "
"\\clbrdrl\\brdrs\\brdrw10 "
"\\clbrdrb\\brdrs\\brdrw10 "
"\\clbrdrr \\brdrs\\brdrw10 "
"\\cltxlrtb "
"\\cellx" << ((i+1)*columnWidth) << endl;
}
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocHtmlCell c)
virtual

Implements DocVisitor.

Definition at line 947 of file rtfdocvisitor.cpp.

References align(), DBG_RTF, m_hide, m_lastIsPara, and m_t.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlCell)}\n");
m_t << "{" << align(c);
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocInternal )
virtual

Implements DocVisitor.

Definition at line 963 of file rtfdocvisitor.cpp.

References m_hide.

{
if (m_hide) return;
//DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternal)}\n");
//m_t << "{"; // start desc
//m_t << "{\\b "; // start bold
//m_t << theTranslator->trForInternalUseOnly();
//m_t << "}"; // end bold
//m_t << "\\par" << endl;
//incIndentLevel();
//m_t << rtf_Style_Reset << getStyle("DescContinue");
//m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocHRef href)
virtual

Implements DocVisitor.

Definition at line 987 of file rtfdocvisitor.cpp.

References Config_getBool, DBG_RTF, m_hide, m_lastIsPara, m_t, and DocHRef::url().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHRef)}\n");
if (Config_getBool(RTF_HYPERLINKS))
{
m_t << "{\\field "
"{\\*\\fldinst "
"{ HYPERLINK \"" << href->url() << "\" "
"}{}"
"}"
"{\\fldrslt "
"{\\cs37\\ul\\cf2 ";
}
else
{
m_t << "{\\f2 ";
}
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocHtmlHeader header)
virtual

Implements DocVisitor.

Definition at line 1026 of file rtfdocvisitor.cpp.

References DBG_RTF, DocHtmlHeader::level(), m_hide, m_lastIsPara, m_t, rtf_Style, and rtf_Style_Reset.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlHeader)}\n");
m_t << "{" // start section
QCString heading;
int level = QMIN(header->level()+2,4);
heading.sprintf("Heading%d",level);
// set style
m_t << rtf_Style[heading]->reference;
// make open table of contents entry that will be closed in visitPost method
m_t << "{\\tc\\tcl" << level << " ";
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocImage img)
virtual

Implements DocVisitor.

Definition at line 1052 of file rtfdocvisitor.cpp.

References DBG_RTF, DocImage::hasCaption(), includePicturePreRTF(), DocImage::name(), DocImage::Rtf, and DocImage::type().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocImage)}\n");
}
void RTFDocVisitor::visitPre ( DocDotFile df)
virtual

Implements DocVisitor.

Definition at line 1111 of file rtfdocvisitor.cpp.

References DBG_RTF, and writeDotFile().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocDotFile)}\n");
}
void RTFDocVisitor::visitPre ( DocMscFile df)
virtual

Implements DocVisitor.

Definition at line 1122 of file rtfdocvisitor.cpp.

References DBG_RTF, and writeMscFile().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocMscFile)}\n");
}
void RTFDocVisitor::visitPre ( DocDiaFile df)
virtual

Implements DocVisitor.

Definition at line 1134 of file rtfdocvisitor.cpp.

References DBG_RTF, and writeDiaFile().

{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocDiaFile)}\n");
}
void RTFDocVisitor::visitPre ( DocLink lnk)
virtual

Implements DocVisitor.

Definition at line 1146 of file rtfdocvisitor.cpp.

References DocLink::anchor(), DBG_RTF, DocLink::file(), m_hide, DocLink::ref(), and startLink().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocLink)}\n");
startLink(lnk->ref(),lnk->file(),lnk->anchor());
}
void RTFDocVisitor::visitPre ( DocRef ref)
virtual

Implements DocVisitor.

Definition at line 1160 of file rtfdocvisitor.cpp.

References DocRef::anchor(), DBG_RTF, DocRef::file(), filter(), DocRef::hasLinkText(), DocRef::isSubPage(), m_hide, DocRef::ref(), startLink(), and DocRef::targetTitle().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRef)}\n");
// when ref->isSubPage()==TRUE we use ref->file() for HTML and
// ref->anchor() for LaTeX/RTF
if (ref->isSubPage())
{
startLink(ref->ref(),0,ref->anchor());
}
else
{
if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor());
}
if (!ref->hasLinkText()) filter(ref->targetTitle());
}
void RTFDocVisitor::visitPre ( DocSecRefItem )
virtual

Implements DocVisitor.

Definition at line 1186 of file rtfdocvisitor.cpp.

References DBG_RTF.

{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefItem)}\n");
}
void RTFDocVisitor::visitPre ( DocSecRefList )
virtual

Implements DocVisitor.

Definition at line 1196 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), getStyle(), incIndentLevel(), m_hide, m_lastIsPara, m_t, and rtf_Style_Reset.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefList)}\n");
m_t << "{" << endl;
m_t << rtf_Style_Reset << getStyle("LatexTOC") << endl;
m_t << "\\par" << endl;
}
void RTFDocVisitor::visitPre ( DocParamSect s)
virtual

Implements DocVisitor.

Definition at line 1238 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), DocParamSect::Exception, getStyle(), incIndentLevel(), m_hide, m_lastIsPara, m_t, DocParamSect::Param, DocParamSect::RetVal, rtf_Style, rtf_Style_Reset, DocParamSect::TemplateParam, theTranslator, Translator::trExceptions(), Translator::trParameters(), Translator::trReturnValues(), and DocParamSect::type().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamSect)}\n");
m_t << "{"; // start param list
if (!m_lastIsPara) m_t << "\\par" << endl;
//m_t << "{\\b "; // start bold
m_t << "{" << rtf_Style["Heading5"]->reference << endl;
switch(s->type())
{
/* TODO: add this
m_t << theTranslator->trTemplateParam(); break;
*/
m_t << "Template Parameters"; break;
default:
ASSERT(0);
}
m_t << ":";
m_t << "\\par";
m_t << "}" << endl;
bool useTable = s->type()==DocParamSect::Param ||
if (!useTable)
{
}
m_t << rtf_Style_Reset << getStyle("DescContinue");
}
void RTFDocVisitor::visitPre ( DocParamList pl)
virtual

Implements DocVisitor.

Definition at line 1293 of file rtfdocvisitor.cpp.

References DBG_RTF, DocParamList::direction(), endl(), DocParamSect::Exception, DocParamSect::hasInOutSpecifier(), DocParamSect::hasTypeSpecifier(), DocParamSect::In, DocParamSect::InOut, DocNode::kind(), DocNode::Kind_LinkedWord, DocNode::Kind_ParamSect, DocNode::Kind_Word, m_hide, m_lastIsPara, m_t, DocParamSect::Out, DocParamSect::Param, DocParamList::parameters(), DocParamList::paramTypes(), DocNode::parent(), DocParamSect::RetVal, rtf_pageWidth, DocParamSect::TemplateParam, DocParamSect::Unknown, DocParamSect::Unspecified, and visit().

{
static int columnPos[4][5] =
{ { 2, 25, 100, 100, 100 }, // no inout, no type
{ 3, 14, 35, 100, 100 }, // inout, no type
{ 3, 25, 50, 100, 100 }, // no inout, type
{ 4, 14, 35, 55, 100 }, // inout, type
};
int config=0;
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamList)}\n");
DocParamSect *sect = 0;
if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
{
parentType = ((DocParamSect*)pl->parent())->type();
sect=(DocParamSect*)pl->parent();
}
bool useTable = parentType==DocParamSect::Param ||
parentType==DocParamSect::RetVal ||
parentType==DocParamSect::Exception ||
if (sect && sect->hasInOutSpecifier()) config+=1;
if (sect && sect->hasTypeSpecifier()) config+=2;
if (useTable)
{
int i;
m_t << "\\trowd \\trgaph108\\trleft426\\tblind426"
"\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<< endl;
for (i=0;i<columnPos[config][0];i++)
{
m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
"\\cltxlrtb "
"\\cellx" << (rtf_pageWidth*columnPos[config][i+1]/100) << endl;
}
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
}
if (sect && sect->hasInOutSpecifier())
{
if (useTable)
{
m_t << "{";
}
// Put in the direction: in/out/in,out if specified.
{
{
m_t << "in";
}
else if (pl->direction()==DocParamSect::Out)
{
m_t << "out";
}
else if (pl->direction()==DocParamSect::InOut)
{
m_t << "in,out";
}
}
if (useTable)
{
m_t << "\\cell }";
}
}
if (sect && sect->hasTypeSpecifier())
{
if (useTable)
{
m_t << "{";
}
QListIterator<DocNode> li(pl->paramTypes());
DocNode *type;
bool first=TRUE;
for (li.toFirst();(type=li.current());++li)
{
if (!first) m_t << " | "; else first=FALSE;
if (type->kind()==DocNode::Kind_Word)
{
visit((DocWord*)type);
}
else if (type->kind()==DocNode::Kind_LinkedWord)
{
visit((DocLinkedWord*)type);
}
}
if (useTable)
{
m_t << "\\cell }";
}
}
if (useTable)
{
m_t << "{";
}
m_t << "{\\i ";
//QStrListIterator li(pl->parameters());
//const char *s;
QListIterator<DocNode> li(pl->parameters());
DocNode *param;
bool first=TRUE;
for (li.toFirst();(param=li.current());++li)
{
if (!first) m_t << ","; else first=FALSE;
if (param->kind()==DocNode::Kind_Word)
{
visit((DocWord*)param);
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
visit((DocLinkedWord*)param);
}
}
m_t << "} ";
if (useTable)
{
m_t << "\\cell }{";
}
}
void RTFDocVisitor::visitPre ( DocXRefItem x)
virtual

Implements DocVisitor.

Definition at line 1460 of file rtfdocvisitor.cpp.

References DocXRefItem::anchor(), Config_getBool, DBG_RTF, endl(), DocXRefItem::file(), filter(), getStyle(), incIndentLevel(), m_hide, m_lastIsPara, m_t, rtf_Style, rtf_Style_Reset, and DocXRefItem::title().

{
if (m_hide) return;
if (x->title().isEmpty()) return;
bool anonymousEnum = x->file()=="@";
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocXRefItem)}\n");
{
m_t << "\\par" << endl;
}
m_t << "{"; // start param list
//m_t << "{\\b "; // start bold
m_t << "{" << rtf_Style["Heading5"]->reference << endl;
if (Config_getBool(RTF_HYPERLINKS) && !anonymousEnum)
{
QCString refName;
if (!x->file().isEmpty())
{
refName+=x->file();
}
if (!x->file().isEmpty() && !x->anchor().isEmpty())
{
refName+="_";
}
if (!x->anchor().isEmpty())
{
refName+=x->anchor();
}
m_t << "{\\field "
"{\\*\\fldinst "
"{ HYPERLINK \\\\l \"" << refName << "\" "
"}{}"
"}"
"{\\fldrslt "
"{\\cs37\\ul\\cf2 ";
filter(x->title());
m_t << "}"
"}"
"}";
}
else
{
filter(x->title());
}
m_t << ":";
m_t << "\\par";
m_t << "}"; // end bold
m_t << rtf_Style_Reset << getStyle("DescContinue");
m_lastIsPara=FALSE;
}
void RTFDocVisitor::visitPre ( DocInternalRef ref)
virtual

Implements DocVisitor.

Definition at line 1525 of file rtfdocvisitor.cpp.

References DocInternalRef::anchor(), DBG_RTF, DocInternalRef::file(), m_hide, and startLink().

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternalRef)}\n");
startLink("",ref->file(),ref->anchor());
}
void RTFDocVisitor::visitPre ( DocCopy )
virtual

Implements DocVisitor.

Definition at line 1540 of file rtfdocvisitor.cpp.

References DBG_RTF, and m_hide.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocCopy)}\n");
}
void RTFDocVisitor::visitPre ( DocText )
virtual

Implements DocVisitor.

Definition at line 1552 of file rtfdocvisitor.cpp.

References DBG_RTF, and m_hide.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocText)}\n");
}
void RTFDocVisitor::visitPre ( DocHtmlBlockQuote )
virtual

Implements DocVisitor.

Definition at line 1564 of file rtfdocvisitor.cpp.

References DBG_RTF, endl(), getStyle(), incIndentLevel(), m_hide, m_lastIsPara, m_t, and rtf_Style_Reset.

{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlBlockQuote)}\n");
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "{"; // start desc
m_t << rtf_Style_Reset << getStyle("DescContinue");
}
void RTFDocVisitor::visitPre ( DocVhdlFlow )
virtual

Implements DocVisitor.

Definition at line 1584 of file rtfdocvisitor.cpp.

References m_hide.

{
if (m_hide) return;
}
void RTFDocVisitor::visitPre ( DocParBlock )
virtual

Implements DocVisitor.

Definition at line 1594 of file rtfdocvisitor.cpp.

References m_hide.

{
if (m_hide) return;
}
void RTFDocVisitor::writeDiaFile ( DocDiaFile df)
private

Definition at line 1749 of file rtfdocvisitor.cpp.

References Config_getString, DIA_BITMAP, DocDiaFile::file(), DocDiaFile::hasCaption(), includePicturePreRTF(), and writeDiaGraphFromFile().

Referenced by visitPre().

{
QCString baseName=df->file();
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QCString outDir = Config_getString(RTF_OUTPUT);
writeDiaGraphFromFile(df->file(),outDir,baseName,DIA_BITMAP);
includePicturePreRTF(baseName + ".png", true, df->hasCaption());
}
void RTFDocVisitor::writeDotFile ( const QCString &  fileName,
const bool  hasCaption 
)
private

Definition at line 1718 of file rtfdocvisitor.cpp.

References Config_getString, getDotImageExtension(), GOF_BITMAP, includePicturePreRTF(), and writeDotGraphFromFile().

Referenced by visit(), visitPre(), and writeDotFile().

{
QCString baseName=filename;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QCString outDir = Config_getString(RTF_OUTPUT);
writeDotGraphFromFile(filename,outDir,baseName,GOF_BITMAP);
QCString imgExt = getDotImageExtension();
includePicturePreRTF(baseName + "." + imgExt, true, hasCaption);
}
void RTFDocVisitor::writeDotFile ( DocDotFile df)
private

Definition at line 1714 of file rtfdocvisitor.cpp.

References DocDotFile::file(), DocDotFile::hasCaption(), and writeDotFile().

{
writeDotFile(df->file(), df->hasCaption());
}
void RTFDocVisitor::writeMscFile ( const QCString &  fileName,
const bool  hasCaption 
)
private

Definition at line 1736 of file rtfdocvisitor.cpp.

References Config_getString, includePicturePreRTF(), MSC_BITMAP, and writeMscGraphFromFile().

Referenced by visit(), visitPre(), and writeMscFile().

{
QCString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QCString outDir = Config_getString(RTF_OUTPUT);
writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP);
includePicturePreRTF(baseName + ".png", true, hasCaption);
}
void RTFDocVisitor::writeMscFile ( DocMscFile df)
private

Definition at line 1732 of file rtfdocvisitor.cpp.

References DocMscFile::file(), DocMscFile::hasCaption(), and writeMscFile().

{
writeMscFile(df->file(), df->hasCaption());
}
void RTFDocVisitor::writePlantUMLFile ( const QCString &  fileName,
const bool  hasCaption 
)
private

Definition at line 1762 of file rtfdocvisitor.cpp.

References Config_getString, generatePlantUMLOutput(), includePicturePreRTF(), and PUML_BITMAP.

Referenced by visit().

{
QCString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QCString outDir = Config_getString(RTF_OUTPUT);
includePicturePreRTF(baseName + ".png", true, hasCaption);
}

Member Data Documentation

CodeOutputInterface& RTFDocVisitor::m_ci
private

Definition at line 169 of file rtfdocvisitor.h.

Referenced by visit().

QStack<bool> RTFDocVisitor::m_enabled
private

Definition at line 173 of file rtfdocvisitor.h.

Referenced by popEnabled(), and pushEnabled().

bool RTFDocVisitor::m_hide
private
int RTFDocVisitor::m_indentLevel
private

Definition at line 172 of file rtfdocvisitor.h.

Referenced by decIndentLevel(), getStyle(), incIndentLevel(), and visitPre().

bool RTFDocVisitor::m_insidePre
private

Definition at line 170 of file rtfdocvisitor.h.

Referenced by visit().

QCString RTFDocVisitor::m_langExt
private

Definition at line 175 of file rtfdocvisitor.h.

Referenced by visit().

bool RTFDocVisitor::m_lastIsPara
private

Definition at line 174 of file rtfdocvisitor.h.

Referenced by endLink(), includePicturePreRTF(), startLink(), visit(), visitPost(), and visitPre().

FTextStream& RTFDocVisitor::m_t
private

The documentation for this class was generated from the following files: