void LatexDocVisitor::startDiaFile(const QCString &fileName,
                                   const QCString &width,
                                   const QCString &height,
                                   bool hasCaption
                                  )
{
  QCString baseName=fileName;
  int i;
  if ((i=baseName.findRev('/'))!=-1)
  {
    baseName=baseName.right(baseName.length()-i-1);
  }
  if ((i=baseName.find('.'))!=-1)
  {
    baseName=baseName.left(i);
  }
  baseName.prepend("dia_");

  QCString outDir = Config_getString("LATEX_OUTPUT");
  writeDiaGraphFromFile(fileName,outDir,baseName,DIA_EPS);
  if (hasCaption)
  {
    m_t << "\n\\begin{DoxyImage}\n";
  }
  else
  {
    m_t << "\n\\begin{DoxyImageNoCaption}\n"
           "  \\mbox{";
  }
  m_t << "\\includegraphics";
  if (!width.isEmpty())
  {
    m_t << "[width=" << width << "]";
  }
  else if (!height.isEmpty())
  {
    m_t << "[height=" << height << "]";
  }
  else
  {
    m_t << "[width=\\textwidth,height=\\textheight/2,keepaspectratio=true]";
  }
  m_t << "{" << baseName;
  //if (Config_getBool("USE_PDFLATEX"))
  //{
  //  m_t << ".pdf";
  //}
  //else
  //{
  //  m_t << ".eps";
  //}
  m_t << "}";

  if (hasCaption)
  {
    m_t << "\n\\caption{";
  }
}
Exemple #2
0
void RTFDocVisitor::writeDiaFile(DocDiaFile *df)
{
  QCString baseName=df->file();
  int i;
  if ((i=baseName.findRev('/'))!=-1)
  {
    baseName=baseName.right(baseName.length()-i-1);
  }
  QCString outDir = Config_getString(RTF_OUTPUT);
  writeDiaGraphFromFile(df->file(),outDir,baseName,DIA_BITMAP);
  includePicturePreRTF(baseName + ".png", true, df->hasCaption());
}
Exemple #3
0
void DocbookDocVisitor::writeDiaFile(const QCString &baseName)
{
  QCString shortName = baseName;
  int i;
  if ((i=shortName.findRev('/'))!=-1)
  {
    shortName=shortName.right(shortName.length()-i-1);
  }
  QCString outDir = Config_getString("DOCBOOK_OUTPUT");
  writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP);
  m_t << "                <imagedata";
  m_t << " align=\"center\" fileref=\"" << shortName << ".png" << "\">";
  m_t << "</imagedata>" << endl;
}
Exemple #4
0
void DocbookDocVisitor::writeDiaFile(const QCString &baseName, DocVerbatim *s)
{
  QCString shortName = baseName;
  int i;
  if ((i=shortName.findRev('/'))!=-1)
  {
    shortName=shortName.right(shortName.length()-i-1);
  }
  QCString outDir = Config_getString(DOCBOOK_OUTPUT);
  writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP);
  visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
  visitCaption(this, s->children());
  visitPostEnd(m_t, s->hasCaption());
}
void LatexDocVisitor::writeDiaFile(const QCString &baseName)
{
  QCString shortName = baseName;
  int i;
  if ((i=shortName.findRev('/'))!=-1)
  {
    shortName=shortName.right(shortName.length()-i-1);
  }
  QCString outDir = Config_getString("LATEX_OUTPUT");
  writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_EPS);
  m_t << "\n\\begin{DoxyImageNoCaption}"
         "  \\mbox{\\includegraphics";
  m_t << "{" << shortName << "}";
  m_t << "}\n"; // end mbox
  m_t << "\\end{DoxyImageNoCaption}\n";
}
void LatexDocVisitor::writeDiaFile(const QString &baseName, DocVerbatim *s)
{
   QString shortName = baseName;
   int i;

   if ((i = shortName.lastIndexOf('/')) != -1) {
      shortName = shortName.right(shortName.length() - i - 1);
   }

   QString outDir = Config::getString("latex-output");
   writeDiaGraphFromFile(baseName + ".dia", outDir, shortName, DIA_EPS);

   visitPreStart(m_t, s->hasCaption(), shortName, s->width(), s->height());
   visitCaption(this, s->children());
   visitPostEnd(m_t, s->hasCaption());  
}
Exemple #7
0
void DocbookDocVisitor::startDiaFile(const QCString &fileName,
    const QCString &width,
    const QCString &height,
    bool hasCaption
    )
{
  QCString baseName=fileName;
  int i;
  if ((i=baseName.findRev('/'))!=-1)
  {
    baseName=baseName.right(baseName.length()-i-1);
  }
  if ((i=baseName.find('.'))!=-1)
  {
    baseName=baseName.left(i);
  }
  baseName.prepend("msc_");
  QCString outDir = Config_getString("DOCBOOK_OUTPUT");
  writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP);
  m_t << "<para>" << endl;
  m_t << "    <figure>" << endl;
  m_t << "        <title></title>" << endl;
  m_t << "        <mediaobject>" << endl;
  m_t << "            <imageobject>" << endl;
  m_t << "                <imagedata";
  if (!width.isEmpty())
  {
    m_t << " width=\"";
    m_t << width;
    m_t << "\"";
  }
  else if (!height.isEmpty())
  {
    m_t << " depth=\"";
    m_t << height;
    m_t << "\"";
  }
  m_t << " align=\"center\" fileref=\"" << baseName << ".png" << "\">";
  m_t << "</imagedata>" << endl;
  m_t << "            </imageobject>" << endl;
  if (hasCaption)
  {
    m_t << "        <caption>" << endl;
  }
}
void LatexDocVisitor::startDiaFile(const QString &fileName, const QString &width, const QString &height, bool hasCaption)
{
   QString baseName = fileName;
   int i;

   if ((i = baseName.lastIndexOf('/')) != -1) {
      baseName = baseName.right(baseName.length() - i - 1);
   }
   if ((i = baseName.indexOf('.')) != -1) {
      baseName = baseName.left(i);
   }
   baseName.prepend("dia_");

   QString outDir = Config::getString("latex-output");

   writeDiaGraphFromFile(fileName, outDir, baseName, DIA_EPS);
   visitPreStart(m_t,hasCaption, baseName, width, height); 
}
void RTFDocVisitor::writeDiaFile(const QCString &fileName)
{
  QCString baseName=fileName;
  int i;
  if ((i=baseName.findRev('/'))!=-1)
  {
    baseName=baseName.right(baseName.length()-i-1);
  }
  QCString outDir = Config_getString("RTF_OUTPUT");
  writeDiaGraphFromFile(fileName+".dia",outDir,baseName,DIA_BITMAP);
  if (!m_lastIsPara) m_t << "\\par" << endl;
  m_t << "{" << endl;
  m_t << rtf_Style_Reset;
  m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
  m_t << baseName << ".png";
  m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
  m_t << "}" << endl;
  m_lastIsPara=TRUE;
}
Exemple #10
0
void DocbookDocVisitor::startDiaFile(const QCString &fileName,
    const QCString &width,
    const QCString &height,
    bool hasCaption
    )
{
  QCString baseName=fileName;
  int i;
  if ((i=baseName.findRev('/'))!=-1)
  {
    baseName=baseName.right(baseName.length()-i-1);
  }
  if ((i=baseName.find('.'))!=-1)
  {
    baseName=baseName.left(i);
  }
  baseName.prepend("dia_");
  QCString outDir = Config_getString(DOCBOOK_OUTPUT);
  writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP);
  m_t << "<para>" << endl;
  visitPreStart(m_t, hasCaption, baseName + ".png",  width,  height);
}
void LatexDocVisitor::startDiaFile(const QCString &fileName,
                                   const QCString &width,
                                   const QCString &height,
                                   bool hasCaption
                                  )
{
    QCString baseName=fileName;
    int i;
    if ((i=baseName.findRev('/'))!=-1)
    {
        baseName=baseName.right(baseName.length()-i-1);
    }
    if ((i=baseName.find('.'))!=-1)
    {
        baseName=baseName.left(i);
    }
    baseName.prepend("dia_");

    QCString outDir = Config_getString("LATEX_OUTPUT");
    writeDiaGraphFromFile(fileName,outDir,baseName,DIA_EPS);
    visitPreStart(m_t,hasCaption, baseName, width, height);
}