diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-11-06 21:06:38 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-11-06 21:06:38 (GMT) |
commit | c400bd439b3df09704e33df382ed7b08f80dd8ed (patch) | |
tree | d2b3049367f2df643a3f305ecfcd739b426c3edc /src/rtfdocvisitor.cpp | |
parent | c6d6555a949e86be5c859311eb4db5dcc092c258 (diff) | |
download | Doxygen-c400bd439b3df09704e33df382ed7b08f80dd8ed.zip Doxygen-c400bd439b3df09704e33df382ed7b08f80dd8ed.tar.gz Doxygen-c400bd439b3df09704e33df382ed7b08f80dd8ed.tar.bz2 |
Release-1.2.18-20021106
Diffstat (limited to 'src/rtfdocvisitor.cpp')
-rw-r--r-- | src/rtfdocvisitor.cpp | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index bf2731a..a11e857 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -28,7 +28,7 @@ #include "message.h" RTFDocVisitor::RTFDocVisitor(QTextStream &t,BaseCodeDocInterface &ci) - : m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_indentLevel(0) + : m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_indentLevel(1) { } @@ -48,7 +48,7 @@ void RTFDocVisitor::incIndentLevel() void RTFDocVisitor::decIndentLevel() { - if (m_indentLevel>0) m_indentLevel--; + if (m_indentLevel>1) m_indentLevel--; } //-------------------------------------- @@ -259,6 +259,21 @@ void RTFDocVisitor::visit(DocStyleChange *s) case DocStyleChange::Small: if (s->enable()) m_t << "{\\sub "; else m_t << "} "; break; + case DocStyleChange::Preformatted: + if (s->enable()) + { + m_t << "{" << endl; + m_t << "\\par" << endl; + m_t << rtf_Style_Reset << getStyle("CodeExample"); + m_insidePre=TRUE; + } + else + { + m_insidePre=FALSE; + m_t << "\\par" << endl; + m_t << "}" << endl; + } + break; } } @@ -585,20 +600,20 @@ void RTFDocVisitor::visitPost(DocHtmlListItem *) { } -void RTFDocVisitor::visitPre(DocHtmlPre *) -{ - m_t << "{" << endl; - m_t << "\\par" << endl; - m_t << rtf_Style_Reset << getStyle("CodeExample"); - m_insidePre=TRUE; -} +//void RTFDocVisitor::visitPre(DocHtmlPre *) +//{ +// m_t << "{" << endl; +// m_t << "\\par" << endl; +// m_t << rtf_Style_Reset << getStyle("CodeExample"); +// m_insidePre=TRUE; +//} -void RTFDocVisitor::visitPost(DocHtmlPre *) -{ - m_insidePre=FALSE; - m_t << "\\par" << endl; - m_t << "}" << endl; -} +//void RTFDocVisitor::visitPost(DocHtmlPre *) +//{ +// m_insidePre=FALSE; +// m_t << "\\par" << endl; +// m_t << "}" << endl; +//} void RTFDocVisitor::visitPre(DocHtmlDescList *) { @@ -875,8 +890,8 @@ void RTFDocVisitor::visitPost(DocLanguage *) void RTFDocVisitor::visitPre(DocParamSect *s) { m_t << "{"; // start param list - m_t << "{\\b "; // start bold m_t << "\\par" << endl; + m_t << "{\\b "; // start bold switch(s->type()) { case DocParamSect::Param: @@ -896,7 +911,7 @@ void RTFDocVisitor::visitPre(DocParamSect *s) void RTFDocVisitor::visitPost(DocParamSect *) { - m_t << "\\par" << endl; + //m_t << "\\par" << endl; decIndentLevel(); m_t << "}" << endl; } |