@@ -193,7 +193,7 @@ static void writeBoxMemberList(TextStream &t,
193193 }
194194}
195195
196- QCString DotNode::convertLabel (const QCString &l, bool htmlLike)
196+ QCString DotNode::convertLabel (const QCString &l, bool htmlLike, bool tableLike )
197197{
198198 QCString bBefore (" \\ _/<({[: =-+@%#~?$" ); // break before character set
199199 QCString bAfter (" >]),:;|" ); // break after character set
@@ -206,16 +206,30 @@ QCString DotNode::convertLabel(const QCString &l, bool htmlLike)
206206 int sinceLast=0 ;
207207 int foldLen = Config_getInt (DOT_WRAP_THRESHOLD); // ideal text length
208208 QCString br;
209+ QCString br1;
210+ if (tableLike)
211+ {
212+ result += " <<TABLE CELLBORDER=\" 0\" BORDER=\" 0\" ><TR><TD VALIGN=\" top\" ALIGN=\" LEFT\" CELLPADDING=\" 1\" CELLSPACING=\" 0\" >" ;
213+ }
209214 if (htmlLike)
215+ {
210216 br = " <BR ALIGN=\" LEFT\" />" ;
217+ }
218+ else if (tableLike)
219+ {
220+ br1 = " </TD></TR>\n <TR><TD VALIGN=\" top\" ALIGN=\" LEFT\" CELLPADDING=\" 1\" CELLSPACING=\" 0\" >" ;
221+ br = br1 + " " ;
222+ }
211223 else
224+ {
212225 br = " \\ l" ;
226+ }
213227 while (idx < p.length ())
214228 {
215229 char c = p[idx++];
216230 char cs[2 ] = { c, 0 };
217231 const char *replacement = cs;
218- if (htmlLike)
232+ if (htmlLike || tableLike )
219233 {
220234 switch (c)
221235 {
@@ -246,7 +260,14 @@ QCString DotNode::convertLabel(const QCString &l, bool htmlLike)
246260 // boxes and at the same time prevent ugly breaks
247261 if (c==' \n ' )
248262 {
249- result+=replacement;
263+ if (tableLike)
264+ {
265+ result+=br1;
266+ }
267+ else
268+ {
269+ result+=replacement;
270+ }
250271 foldLen = (3 *foldLen+sinceLast+2 )/4 ;
251272 sinceLast=1 ;
252273 }
@@ -284,6 +305,10 @@ QCString DotNode::convertLabel(const QCString &l, bool htmlLike)
284305 {
285306 result = result.stripWhiteSpace ();
286307 }
308+ if (tableLike)
309+ {
310+ result += " </TD></TR>\n </TABLE>>" ;
311+ }
287312 return result;
288313}
289314
@@ -609,7 +634,7 @@ void DotNode::writeArrow(TextStream &t,
609634 t << " ,tooltip=\" \" " ; // space in tooltip is required otherwise still something like 'Node0 -> Node1' is used
610635 if (!ei->label ().isEmpty ())
611636 {
612- t << " ,label=\" " << convertLabel (ei->label ()) << " \" ,fontcolor=\" grey\" " ;
637+ t << " ,label=" << convertLabel (ei->label (), false , true ) << " ,fontcolor=\" grey\" " ;
613638 }
614639 if (Config_getBool (UML_LOOK) &&
615640 eProps->arrowStyleMap [ei->color ()] &&
0 commit comments