19 #include <qfileinfo.h>
42 t <<
" <figure>" <<
endl;
43 t <<
" <title></title>" <<
endl;
44 t <<
" <mediaobject>" <<
endl;
45 t <<
" <imageobject>" <<
endl;
53 t <<
" width=\"50%\"";
55 if (!height.isEmpty())
59 t <<
" align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << name <<
"\">";
60 t <<
"</imagedata>" <<
endl;
61 t <<
" </imageobject>" <<
endl;
64 t <<
" <caption>" <<
endl;
73 t <<
" </caption>" <<
endl;
75 t <<
" </mediaobject>" <<
endl;
76 t <<
" </figure>" <<
endl;
81 QListIterator<DocNode> cli(children);
83 for (cli.toFirst();(n=cli.current());++cli) n->
accept(parent);
139 m_t <<
"<link xlink:href=\"";
150 m_t <<
endl <<
"<literallayout>\n</literallayout>" <<
endl;
156 m_t <<
"<informaltable frame='bottom'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>\n";
157 m_t <<
"</entry></row></tbody></tgroup></informaltable>\n";
166 if (s->
enable())
m_t <<
"<emphasis role=\"bold\">";
else m_t <<
"</emphasis>";
169 if (s->
enable())
m_t <<
"<emphasis>";
else m_t <<
"</emphasis>";
172 if (s->
enable())
m_t <<
"<computeroutput>";
else m_t <<
"</computeroutput>";
175 if (s->
enable())
m_t <<
"<subscript>";
else m_t <<
"</subscript>";
178 if (s->
enable())
m_t <<
"<superscript>";
else m_t <<
"</superscript>";
181 if (s->
enable())
m_t <<
"<informaltable frame='none'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>";
182 else m_t <<
"</entry></row></tbody></tgroup></informaltable>";
187 m_t <<
"<literallayout>";
192 m_t <<
"</literallayout>";
211 m_t <<
"<literallayout><computeroutput>";
215 m_t <<
"</computeroutput></literallayout>";
218 m_t <<
"<literallayout>";
220 m_t <<
"</literallayout>";
238 static int dotindex = 1;
239 QCString baseName(4096);
241 QCString stext = s->
text();
242 m_t <<
"<para>" <<
endl;
243 name.sprintf(
"%s%d",
"dot_inline_dotgraph_", dotindex);
244 baseName.sprintf(
"%s%d",
248 QFile file(baseName+
".dot");
249 if (!file.open(IO_WriteOnly))
251 err(
"Could not open file %s.msc for writing\n",baseName.data());
253 file.writeBlock( stext, stext.length() );
256 m_t <<
"</para>" <<
endl;
261 static int mscindex = 1;
262 QCString baseName(4096);
264 QCString stext = s->
text();
265 m_t <<
"<para>" <<
endl;
266 name.sprintf(
"%s%d",
"msc_inline_mscgraph_", mscindex);
267 baseName.sprintf(
"%s%d",
271 QFile file(baseName+
".msc");
272 if (!file.open(IO_WriteOnly))
274 err(
"Could not open file %s.msc for writing\n",baseName.data());
276 QCString text =
"msc {";
279 file.writeBlock( text, text.length() );
282 m_t <<
"</para>" <<
endl;
289 QCString shortName = baseName;
291 if ((i=shortName.findRev(
'/'))!=-1)
293 shortName=shortName.right(shortName.length()-i-1);
295 m_t <<
"<para>" <<
endl;
297 m_t <<
"</para>" <<
endl;
306 m_t <<
"<anchor id=\"" << anc->
file() <<
"_1" << anc->
anchor() <<
"\"/>";
317 m_t <<
"<literallayout><computeroutput>";
318 QFileInfo cfi( inc->
file() );
319 FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
326 m_t <<
"</computeroutput></literallayout>";
330 m_t <<
"<literallayout><computeroutput>";
337 m_t <<
"</computeroutput></literallayout>";
348 m_t <<
"</verbatim>";
351 m_t <<
"<literallayout><computeroutput>";
360 m_t <<
"</computeroutput></literallayout>";
364 err(
"Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
365 "Please create a bug report\n",__FILE__);
376 m_t <<
"<programlisting>";
409 m_t <<
"<equation><title>" << f->
name() <<
"</title>";
411 m_t <<
"</equation>";
417 m_t <<
"<indexentry><primaryie>" <<
endl;
419 m_t <<
"</primaryie><secondaryie></secondaryie></indexentry>" <<
endl;
424 m_t <<
"<simplesect/>";
444 m_t <<
"<orderedlist>\n";
448 m_t <<
"<itemizedlist>\n";
457 m_t <<
"</orderedlist>\n";
461 m_t <<
"</itemizedlist>\n";
474 m_t <<
"</listitem>";
657 m_t <<
"<formalpara><title></title>" <<
endl;
660 m_t <<
"<formalpara><title></title>" <<
endl;
669 m_t <<
"</formalpara>" <<
endl;
687 m_t <<
"<itemizedlist>\n";
693 m_t <<
"</itemizedlist>\n";
705 m_t <<
"</listitem>\n";
711 m_t <<
"<section xml:id=\"" << s->
file();
721 m_t <<
"</section>\n";
728 m_t <<
"<orderedlist>\n";
730 m_t <<
"<itemizedlist>\n";
737 m_t <<
"</orderedlist>\n";
739 m_t <<
"</itemizedlist>\n";
745 m_t <<
"<listitem>\n";
751 m_t <<
"</listitem>\n";
757 m_t <<
"<variablelist>\n";
763 m_t <<
"</variablelist>\n";
769 m_t <<
"<varlistentry><term>";
787 m_t <<
"</listitem></varlistentry>\n";
793 m_t <<
"<table frame=\"all\">" <<
endl;
794 m_t <<
" <title></title>" <<
endl;
795 m_t <<
" <tgroup cols=\"" << t->
numColumns() <<
"\" align=\"left\" colsep=\"1\" rowsep=\"1\">" <<
endl;
840 m_t <<
"</caption>\n";
858 m_t <<
"<link xlink:href=\"" << href->
url() <<
"\">";
870 m_t <<
"<formalpara><title>";
876 m_t <<
"</title></formalpara>\n";
885 QCString baseName=img->
name();
887 if ((i=baseName.findRev(
'/'))!=-1 || (i=baseName.findRev(
'\\'))!=-1)
889 baseName=baseName.right(baseName.length()-i-1);
891 visitPreStart(
m_t, img -> hasCaption(), baseName, img -> width(), img -> height());
907 QCString baseName=img->
name();
909 if ((i=baseName.findRev(
'/'))!=-1 || (i=baseName.findRev(
'\\'))!=-1)
911 baseName=baseName.right(baseName.length()-i-1);
920 QFile inImage(m_file);
922 if (inImage.open(IO_ReadOnly))
924 if (outImage.open(IO_WriteOnly))
926 char *buffer =
new char[inImage.size()];
927 inImage.readBlock(buffer,inImage.size());
928 outImage.writeBlock(buffer,inImage.size());
1003 m_t <<
"<tocitem id=\"" << ref->
file() <<
"_1" << ref->
anchor() <<
"\">";
1028 m_t <<
" <formalpara>" <<
endl;
1030 m_t <<
" <table frame=\"all\">" <<
endl;
1042 m_t <<
" <tgroup cols=\"2\" align=\"left\" colsep=\"1\" rowsep=\"1\">" <<
endl;
1043 m_t <<
" <colspec colwidth=\"1*\"/>" <<
endl;
1044 m_t <<
" <colspec colwidth=\"4*\"/>" <<
endl;
1054 m_t <<
" </formalpara>" <<
endl;
1066 m_t <<
" <entry></entry>" <<
endl;
1072 for (li.toFirst();(param=li.current());++li)
1103 if (x->
title().isEmpty())
return;
1104 m_t <<
"<para><link linkend=\"";
1115 if (x->
title().isEmpty())
return;
1161 m_t <<
"<blockquote>";
1167 m_t <<
"</blockquote>";
1197 m_t <<
"<link linkend=\"" << file;
1198 if (!anchor.isEmpty())
m_t <<
"_1" << anchor;
1222 QCString shortName = baseName;
1224 if ((i=shortName.findRev(
'/'))!=-1)
1226 shortName=shortName.right(shortName.length()-i-1);
1237 QCString shortName = baseName;
1239 if ((i=shortName.findRev(
'/'))!=-1)
1241 shortName=shortName.right(shortName.length()-i-1);
1251 const QCString &width,
1252 const QCString &height,
1256 QCString baseName=fileName;
1258 if ((i=baseName.findRev(
'/'))!=-1)
1260 baseName=baseName.right(baseName.length()-i-1);
1262 if ((i=baseName.find(
'.'))!=-1)
1264 baseName=baseName.left(i);
1266 baseName.prepend(
"msc_");
1282 QCString shortName = baseName;
1284 if ((i=shortName.findRev(
'/'))!=-1)
1286 shortName=shortName.right(shortName.length()-i-1);
1296 const QCString &width,
1297 const QCString &height,
1301 QCString baseName=fileName;
1303 if ((i=baseName.findRev(
'/'))!=-1)
1305 baseName=baseName.right(baseName.length()-i-1);
1307 if ((i=baseName.find(
'.'))!=-1)
1309 baseName=baseName.left(i);
1311 baseName.prepend(
"dia_");
1327 QCString shortName = baseName;
1329 if ((i=shortName.findRev(
'/'))!=-1)
1331 shortName=shortName.right(shortName.length()-i-1);
1341 const QCString &width,
1342 const QCString &height,
1346 QCString baseName=fileName;
1348 if ((i=baseName.findRev(
'/'))!=-1)
1350 baseName=baseName.right(baseName.length()-i-1);
1352 if ((i=baseName.find(
'.'))!=-1)
1354 baseName=baseName.left(i);
1356 baseName.prepend(
"dot_");