summaryrefslogtreecommitdiff
path: root/src/rtfdocvisitor.cpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 10:51:39 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 10:51:39 +0900
commita65b883ee4bf1831f586218430470f0a493bbe5a (patch)
tree996f4f9fcfe434eb0fab959769d2ba0225397327 /src/rtfdocvisitor.cpp
parentb65cb2d67b946445ba89e1938cee8527969922cd (diff)
downloaddoxygen-a65b883ee4bf1831f586218430470f0a493bbe5a.tar.gz
doxygen-a65b883ee4bf1831f586218430470f0a493bbe5a.tar.bz2
doxygen-a65b883ee4bf1831f586218430470f0a493bbe5a.zip
Imported Upstream version 1.8.8upstream/1.8.8
Diffstat (limited to 'src/rtfdocvisitor.cpp')
-rw-r--r--src/rtfdocvisitor.cpp38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 67faf98..5e27137 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -16,6 +16,8 @@
*
*/
+#include <qfileinfo.h>
+
#include "rtfdocvisitor.h"
#include "docparser.h"
#include "language.h"
@@ -26,13 +28,13 @@
#include "util.h"
#include "rtfstyle.h"
#include "message.h"
-#include <qfileinfo.h>
#include "parserintf.h"
#include "msc.h"
#include "dia.h"
#include "filedef.h"
#include "config.h"
#include "htmlentity.h"
+#include "plantuml.h"
//#define DBG_RTF(x) m_t << x
#define DBG_RTF(x) do {} while(0)
@@ -168,7 +170,7 @@ void RTFDocVisitor::visit(DocLineBreak *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocLineBreak)}\n");
- m_t << "\\par";
+ m_t << "\\par" << endl;
m_lastIsPara=TRUE;
}
@@ -317,6 +319,16 @@ void RTFDocVisitor::visit(DocVerbatim *s)
if (Config_getBool("DOT_CLEANUP")) file.remove();
}
break;
+ case DocVerbatim::PlantUML:
+ {
+ static QCString rtfOutput = Config_getString("RTF_OUTPUT");
+ QCString baseName = writePlantUMLSource(rtfOutput,s->exampleFile(),s->text());
+
+ m_t << "\\par{\\qc "; // center picture
+ writePlantUMLFile(baseName);
+ m_t << "} ";
+ }
+ break;
}
m_lastIsPara=FALSE;
}
@@ -1653,7 +1665,7 @@ void RTFDocVisitor::writeDotFile(const QCString &fileName)
baseName=baseName.right(baseName.length()-i-1);
}
QCString outDir = Config_getString("RTF_OUTPUT");
- writeDotGraphFromFile(fileName,outDir,baseName,BITMAP);
+ writeDotGraphFromFile(fileName,outDir,baseName,GOF_BITMAP);
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "{" << endl;
m_t << rtf_Style_Reset;
@@ -1704,3 +1716,23 @@ void RTFDocVisitor::writeDiaFile(const QCString &fileName)
m_lastIsPara=TRUE;
}
+void RTFDocVisitor::writePlantUMLFile(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");
+ generatePlantUMLOutput(fileName,outDir,PUML_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;
+}
+