summaryrefslogtreecommitdiffstats
path: root/src/latexdocvisitor.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2006-10-29 18:39:28 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2006-10-29 18:39:28 (GMT)
commitd384b6c7459cffcbb30bdd0ab06bde6f0cd12688 (patch)
tree6386fc01aea029071bdcabdf150991c7632b5fd3 /src/latexdocvisitor.cpp
parent6ad4771494b64943541d87639743de4d6618ebc4 (diff)
downloadDoxygen-d384b6c7459cffcbb30bdd0ab06bde6f0cd12688.zip
Doxygen-d384b6c7459cffcbb30bdd0ab06bde6f0cd12688.tar.gz
Doxygen-d384b6c7459cffcbb30bdd0ab06bde6f0cd12688.tar.bz2
Release-1.5.1
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r--src/latexdocvisitor.cpp29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 8c1e757..a780434 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -1021,18 +1021,33 @@ void LatexDocVisitor::filter(const char *str)
void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
{
- if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS"))
+ if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS")) // internal PDF link
{
- m_t << "\\hyperlink{";
- if (!file.isEmpty()) m_t << stripPath(file);
- if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
- if (!anchor.isEmpty()) m_t << anchor;
- m_t << "}{";
+ if (ref.isEmpty()) {
+ m_t << "\\hyperlink{";
+ if (!file.isEmpty()) m_t << stripPath(file);
+ if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
+ if (!anchor.isEmpty()) m_t << anchor;
+ m_t << "}{";
+ }
+ else
+ {
+ QCString *dest;
+ m_t << "\\href{";
+ if ((dest=Doxygen::tagDestinationDict[ref])) m_t << *dest << "/";
+ if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension;
+ if (!anchor.isEmpty()) m_t << "#" << anchor;
+ m_t << "}{";
+ }
}
- else
+ else if (ref.isEmpty()) // internal non-PDF link
{
m_t << "\\doxyref{";
}
+ else // external link
+ {
+ m_t << "{\\bf ";
+ }
}
void LatexDocVisitor::endLink(const QString &ref,const QString &file,const QString &anchor)