summaryrefslogtreecommitdiffstats
path: root/src/doc.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-03-19 21:28:43 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-03-19 21:28:43 (GMT)
commitea948596d3aecd47d7459244fc4e28a2903d8985 (patch)
tree15189b5b8aea028e7ff9c9ad19867cb3be0fee9d /src/doc.l
parentf280bea9dedf210e59b80f486bb016e348a387a6 (diff)
downloadDoxygen-ea948596d3aecd47d7459244fc4e28a2903d8985.zip
Doxygen-ea948596d3aecd47d7459244fc4e28a2903d8985.tar.gz
Doxygen-ea948596d3aecd47d7459244fc4e28a2903d8985.tar.bz2
Release-1.2.6-20010319
Diffstat (limited to 'src/doc.l')
-rw-r--r--src/doc.l39
1 files changed, 38 insertions, 1 deletions
diff --git a/src/doc.l b/src/doc.l
index 2c0dab5..46cc73d 100644
--- a/src/doc.l
+++ b/src/doc.l
@@ -625,7 +625,8 @@ static void forceEndItemList()
enum ImageTypes
{
IT_Html,
- IT_Latex
+ IT_Latex,
+ IT_RTF
};
// search for an image in the imageNameDict and if found
@@ -657,6 +658,9 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
case IT_Latex:
outputDir = Config::latexOutputDir;
break;
+ case IT_RTF:
+ outputDir = Config::rtfOutputDir;
+ break;
}
QCString outputFile = outputDir+"/"+result;
QFile outImage(QString(outputFile.data()));
@@ -731,6 +735,16 @@ void writeImage(ImageTypes it,const char *size)
outDoc->endImage(hasCaption);
}
break;
+ case IT_RTF:
+ {
+ outDoc->disableAllBut(OutputGenerator::RTF);
+ outDoc->startImage(curImageName,0,hasCaption);
+ if (hasCaption)
+ {
+ scanString(curImageCaption);
+ }
+ outDoc->endImage(hasCaption);
+ }
}
outDoc->popGeneratorState();
}
@@ -864,6 +878,8 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
%x DocHtmlImageOpt
%x DocLatexImageName
%x DocLatexImageOpt
+%x DocRtfImageName
+%x DocRtfImageOpt
%%
@@ -1708,6 +1724,9 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
<DocImage>[lL][aA][tT][eE][xX] {
BEGIN(DocLatexImageName);
}
+<DocImage>[rR][tT][fF] {
+ BEGIN(DocRtfImageName);
+ }
<DocHtmlImageName>{FILE}|{URLMASK} {
curImageName = findAndCopyImage(stripQuotes(yytext),IT_Html);
curImageCaption.resize(0);
@@ -1727,6 +1746,24 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
<DocHtmlImageOpt>\"[^\n"]*\" {
curImageCaption=stripQuotes(yytext);
}
+<DocRtfImageName>{FILE} {
+ curImageName = findAndCopyImage(stripQuotes(yytext),IT_RTF);
+ curImageCaption.resize(0);
+ if (curImageName.isEmpty())
+ {
+ BEGIN(DocScan);
+ }
+ else
+ {
+ BEGIN(DocRtfImageOpt);
+ }
+ }
+<DocRtfImageOpt>\n {
+ writeImage(IT_RTF,0);
+ }
+<DocRtfImageOpt>\"[^\n"]*\" {
+ curImageCaption=stripQuotes(yytext);
+ }
<DocLatexImageName>{FILE} {
curImageName = findAndCopyImage(stripQuotes(yytext),IT_Latex);
curImageCaption.resize(0);