summaryrefslogtreecommitdiffstats
path: root/src/dot.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2012-09-30 13:51:29 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2012-09-30 13:51:29 (GMT)
commitceb4115c7b941039411e1793e01239610ff112a2 (patch)
treed18c06222e0f84d6077b586e5633053a8bc09da8 /src/dot.cpp
parentf6d511e52eb55c5d5b980c4d226f2ea80b396095 (diff)
downloadDoxygen-ceb4115c7b941039411e1793e01239610ff112a2.zip
Doxygen-ceb4115c7b941039411e1793e01239610ff112a2.tar.gz
Doxygen-ceb4115c7b941039411e1793e01239610ff112a2.tar.bz2
Release-1.8.2-20120930
Diffstat (limited to 'src/dot.cpp')
-rw-r--r--src/dot.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/dot.cpp b/src/dot.cpp
index 39bc844..adad589 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -1408,7 +1408,6 @@ bool DotManager::run()
return TRUE;
}
-
//--------------------------------------------------------------------
@@ -1682,6 +1681,18 @@ static void writeBoxMemberList(FTextStream &t,
}
}
+static QCString stripProtectionPrefix(const QCString &s)
+{
+ if (!s.isEmpty() && (s[0]=='-' || s[0]=='+' || s[0]=='~' || s[0]=='#'))
+ {
+ return s.mid(1);
+ }
+ else
+ {
+ return s;
+ }
+}
+
void DotNode::writeBox(FTextStream &t,
GraphType gt,
GraphOutputFormat /*format*/,
@@ -1698,18 +1709,29 @@ void DotNode::writeBox(FTextStream &t,
if (m_classDef && umlLook && (gt==Inheritance || gt==Collaboration))
{
- // add names shown as relation to a dictionary, so we don't show
+ // add names shown as relations to a dictionary, so we don't show
// them as attributes as well
QDict<void> arrowNames(17);
if (m_edgeInfo)
{
+ // for each edge
QListIterator<EdgeInfo> li(*m_edgeInfo);
EdgeInfo *ei;
for (li.toFirst();(ei=li.current());++li)
{
- if (!ei->m_label.isEmpty())
+ if (!ei->m_label.isEmpty()) // labels joined by \n
{
- arrowNames.insert(ei->m_label,(void*)0x8);
+ int li=ei->m_label.find('\n');
+ int p=0;
+ QCString lab;
+ while ((li=ei->m_label.find('\n',p))!=-1)
+ {
+ lab = stripProtectionPrefix(ei->m_label.mid(p,li-p));
+ arrowNames.insert(lab,(void*)0x8);
+ p=li+1;
+ }
+ lab = stripProtectionPrefix(ei->m_label.right(ei->m_label.length()-p));
+ arrowNames.insert(lab,(void*)0x8);
}
}
}