summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2012-05-19 12:11:23 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2012-05-19 12:11:23 (GMT)
commit55e5055cfbb6f8e013a894c0ec8b10771231e3ba (patch)
tree58d7a64919b99cc76fdc7120ae5d0407f3163a67 /src/util.cpp
parent44ca9512aaeb19f7fbd07afda88ec4cfe53ce831 (diff)
downloadDoxygen-55e5055cfbb6f8e013a894c0ec8b10771231e3ba.zip
Doxygen-55e5055cfbb6f8e013a894c0ec8b10771231e3ba.tar.gz
Doxygen-55e5055cfbb6f8e013a894c0ec8b10771231e3ba.tar.bz2
Release-1.8.1
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp50
1 files changed, 33 insertions, 17 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 56dd787..76aea95 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1799,7 +1799,7 @@ bool leftScopeMatch(const QCString &scope, const QCString &name)
void linkifyText(const TextGeneratorIntf &out,Definition *scope,
- FileDef *fileScope,const char *,
+ FileDef *fileScope,Definition *self,
const char *text, bool autoBreak,bool external,
bool keepSpaces,int indentLevel)
{
@@ -1882,11 +1882,14 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
//printf("Found typedef %s\n",typeDef->name().data());
if (external ? typeDef->isLinkable() : typeDef->isLinkableInProject())
{
- out.writeLink(typeDef->getReference(),
- typeDef->getOutputFileBase(),
- typeDef->anchor(),
- word);
- found=TRUE;
+ if (typeDef->getOuterScope()!=self)
+ {
+ out.writeLink(typeDef->getReference(),
+ typeDef->getOutputFileBase(),
+ typeDef->anchor(),
+ word);
+ found=TRUE;
+ }
}
}
if (!found && cd)
@@ -1895,8 +1898,11 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
// add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject())
{
- out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word);
- found=TRUE;
+ if (cd!=self)
+ {
+ out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word);
+ found=TRUE;
+ }
}
}
else if ((cd=getClass(matchWord+"-p"))) // search for Obj-C protocols as well
@@ -1904,8 +1910,11 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
// add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject())
{
- out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word);
- found=TRUE;
+ if (cd!=self)
+ {
+ out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word);
+ found=TRUE;
+ }
}
}
else if ((cd=getClass(matchWord+"-g"))) // C# generic as well
@@ -1913,8 +1922,11 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
// add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject())
{
- out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word);
- found=TRUE;
+ if (cd!=self)
+ {
+ out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word);
+ found=TRUE;
+ }
}
}
else
@@ -1951,10 +1963,14 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
//printf("Found ref scope=%s\n",d?d->name().data():"<global>");
//ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),
// md->anchor(),word);
- out.writeLink(md->getReference(),md->getOutputFileBase(),
- md->anchor(),word);
- //printf("found symbol %s\n",matchWord.data());
- found=TRUE;
+ if (md!=self && (self==0 || md->name()!=self->name()))
+ // name check is needed for overloaded members, where getDefs just returns one
+ {
+ out.writeLink(md->getReference(),md->getOutputFileBase(),
+ md->anchor(),word);
+ //printf("found symbol %s\n",matchWord.data());
+ found=TRUE;
+ }
}
}
@@ -6123,7 +6139,7 @@ void filterLatexString(FTextStream &t,const char *str,
else if (*p=='>')
{ t << "$>$"; p++; }
else
- { t << "$\\backslash$"; }
+ { t << "\\textbackslash{}"; }
break;
case '"': { t << "\\char`\\\"{}"; }
break;