diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2003-07-25 12:37:34 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2003-07-25 12:37:34 (GMT) |
commit | 16a0bd88cfa8d3134b9b8dcae52652801595338c (patch) | |
tree | 5648b4ab8fb4ca6051647d47c3e8cf8d621e8782 /src/latexdocvisitor.cpp | |
parent | aee36e26c595fa69c0bdbba3c470ba8b7b153dac (diff) | |
download | Doxygen-16a0bd88cfa8d3134b9b8dcae52652801595338c.zip Doxygen-16a0bd88cfa8d3134b9b8dcae52652801595338c.tar.gz Doxygen-16a0bd88cfa8d3134b9b8dcae52652801595338c.tar.bz2 |
Release-1.3.3
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r-- | src/latexdocvisitor.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 8b80907..bc20db5 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -80,7 +80,7 @@ QString LatexDocVisitor::escapeMakeIndexChars(const char *s) LatexDocVisitor::LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci) - : m_t(t), m_ci(ci), m_insidePre(FALSE), m_insideItem(FALSE), m_hide(FALSE) + : DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE), m_insideItem(FALSE), m_hide(FALSE) { } @@ -99,7 +99,7 @@ void LatexDocVisitor::visit(DocLinkedWord *w) if (m_hide) return; startLink(w->ref(),w->file(),w->anchor()); filter(w->word()); - endLink(); + endLink(w->ref(),w->file(),w->anchor()); } void LatexDocVisitor::visit(DocWhiteSpace *w) @@ -797,10 +797,10 @@ void LatexDocVisitor::visitPre(DocLink *lnk) startLink(lnk->ref(),lnk->file(),lnk->anchor()); } -void LatexDocVisitor::visitPost(DocLink *) +void LatexDocVisitor::visitPost(DocLink *lnk) { if (m_hide) return; - endLink(); + endLink(lnk->ref(),lnk->file(),lnk->anchor()); } void LatexDocVisitor::visitPre(DocRef *ref) @@ -810,10 +810,10 @@ void LatexDocVisitor::visitPre(DocRef *ref) if (!ref->hasLinkText()) filter(ref->targetTitle()); } -void LatexDocVisitor::visitPost(DocRef *) +void LatexDocVisitor::visitPost(DocRef *ref) { if (m_hide) return; - endLink(); + endLink(ref->ref(),ref->file(),ref->anchor()); } void LatexDocVisitor::visitPre(DocSecRefItem *) @@ -942,10 +942,10 @@ void LatexDocVisitor::visitPre(DocInternalRef *ref) startLink(0,ref->file(),ref->anchor()); } -void LatexDocVisitor::visitPost(DocInternalRef *) +void LatexDocVisitor::visitPost(DocInternalRef *ref) { if (m_hide) return; - endLink(); + endLink(0,ref->file(),ref->anchor()); } void LatexDocVisitor::visitPre(DocCopy *) @@ -986,9 +986,16 @@ void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QSt } } -void LatexDocVisitor::endLink() +void LatexDocVisitor::endLink(const QString &ref,const QString &file,const QString &anchor) { m_t << "}"; + if (ref.isEmpty() && !Config_getBool("PDF_HYPERLINKS")) + { + m_t << "{\\rm (" << theTranslator->trPageAbbreviation(); + m_t << "\\,\\pageref{" << file; + if (!anchor.isEmpty()) m_t << "_" << anchor; + m_t << "})}"; + } } void LatexDocVisitor::pushEnabled() |