void RTFDocVisitor::visitPre(DocSection *s) { 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 << rtf_Style_Reset; 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; if (isTableOfContentEntriesEnabled()) { m_t << "{\\tc\\tcl" << level << " \\v "; filter(s->title()); m_t << "}" << endl; } m_lastIsPara=TRUE; }
void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor) { 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(DocAnchor *anc) { 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; }