diff options
Diffstat (limited to 'src/htmldocvisitor.cpp')
-rw-r--r-- | src/htmldocvisitor.cpp | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 0c31dbc..37f6bd0 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -677,7 +677,7 @@ void HtmlDocVisitor::visit(DocInclude *inc) forceEndParagraph(inc); m_t << PREFRAG_START; QFileInfo cfi( inc->file() ); - FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() ); + FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() ); Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci, inc->context(), @@ -685,7 +685,7 @@ void HtmlDocVisitor::visit(DocInclude *inc) langExt, inc->isExample(), inc->exampleFile(), - &fd, // fileDef, + fd, // fileDef, -1, // start line -1, // end line FALSE, // inline fragment @@ -693,11 +693,14 @@ void HtmlDocVisitor::visit(DocInclude *inc) TRUE, // show line numbers m_ctx // search context ); + delete fd; m_t << PREFRAG_END; forceStartParagraph(inc); } break; - case DocInclude::DontInclude: + case DocInclude::DontInclude: + case DocInclude::LatexInclude: + case DocInclude::DontIncWithLines: break; case DocInclude::HtmlInclude: { @@ -706,8 +709,6 @@ void HtmlDocVisitor::visit(DocInclude *inc) if (inc->isBlock()) forceStartParagraph(inc); } break; - case DocInclude::LatexInclude: - break; case DocInclude::VerbInclude: forceEndParagraph(inc); m_t << /*PREFRAG_START <<*/ "<pre class=\"fragment\">"; @@ -743,7 +744,7 @@ void HtmlDocVisitor::visit(DocInclude *inc) forceEndParagraph(inc); m_t << PREFRAG_START; QFileInfo cfi( inc->file() ); - FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() ); + FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() ); Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci, inc->context(), @@ -751,7 +752,7 @@ void HtmlDocVisitor::visit(DocInclude *inc) langExt, inc->isExample(), inc->exampleFile(), - &fd, + fd, lineBlock(inc->text(),inc->blockId()), -1, // endLine FALSE, // inlineFragment @@ -759,6 +760,7 @@ void HtmlDocVisitor::visit(DocInclude *inc) TRUE, // show line number m_ctx // search context ); + delete fd; m_t << PREFRAG_END; forceStartParagraph(inc); } @@ -788,6 +790,12 @@ void HtmlDocVisitor::visit(DocIncOperator *op) popEnabled(); if (!m_hide) { + FileDef *fd; + if (!op->includeFileName().isEmpty()) + { + QFileInfo cfi( op->includeFileName() ); + fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() ); + } Doxygen::parserManager->getParser(m_langExt) ->parseCode( m_ci, @@ -796,14 +804,15 @@ void HtmlDocVisitor::visit(DocIncOperator *op) langExt, op->isExample(), op->exampleFile(), - 0, // fileDef - -1, // startLine + fd, // fileDef + op->line(), // startLine -1, // endLine FALSE, // inline fragment 0, // memberDef - TRUE, // show line numbers + op->showLineNo(), // show line numbers m_ctx // search context ); + if (fd) delete fd; } pushEnabled(); m_hide=TRUE; @@ -1909,8 +1918,8 @@ void HtmlDocVisitor::visitPre(DocSecRefList *s) { if (m_hide) return; forceEndParagraph(s); - m_t << "<div class=\"multicol\">" << endl; - m_t << "<ul>" << endl; + m_t << "<div>" << endl; + m_t << "<ul class=\"multicol\">" << endl; } void HtmlDocVisitor::visitPost(DocSecRefList *s) @@ -2413,16 +2422,14 @@ void HtmlDocVisitor::forceEndParagraph(DocNode *n) DocPara *para = (DocPara*)n->parent(); int nodeIndex = para->children().findRef(n); nodeIndex--; - if (nodeIndex<0) return; // first node + if (nodeIndex<0) return; // first node in paragraph while (nodeIndex>=0 && isInvisibleNode(para->children().at(nodeIndex))) { nodeIndex--; } - if (nodeIndex>=0) - { - DocNode *n = para->children().at(nodeIndex); - if (mustBeOutsideParagraph(n)) return; - } + if (nodeIndex<0) return; // first visible node in paragraph + DocNode *n = para->children().at(nodeIndex); + if (mustBeOutsideParagraph(n)) return; // previous node already outside paragraph context nodeIndex--; bool styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,nodeIndex); bool isFirst; |