summaryrefslogtreecommitdiffstats
path: root/src/latexdocvisitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r--src/latexdocvisitor.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index e060da1..4c4dc86 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -1126,14 +1126,30 @@ void LatexDocVisitor::visitPost(DocLink *lnk)
void LatexDocVisitor::visitPre(DocRef *ref)
{
if (m_hide) return;
- if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor());
+ // when ref->isSubPage()==TRUE we use ref->file() for HTML and
+ // ref->anchor() for LaTeX/RTF
+ if (ref->isSubPage())
+ {
+ startLink(ref->ref(),0,ref->anchor());
+ }
+ else
+ {
+ if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor());
+ }
if (!ref->hasLinkText()) filter(ref->targetTitle());
}
void LatexDocVisitor::visitPost(DocRef *ref)
{
if (m_hide) return;
- if (!ref->file().isEmpty()) endLink(ref->ref(),ref->file(),ref->anchor());
+ if (ref->isSubPage())
+ {
+ endLink(ref->ref(),0,ref->anchor());
+ }
+ else
+ {
+ if (!ref->file().isEmpty()) endLink(ref->ref(),ref->file(),ref->anchor());
+ }
}
void LatexDocVisitor::visitPre(DocSecRefItem *)