diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2001-03-19 21:28:43 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2001-03-19 21:28:43 (GMT) |
commit | b11bb229001fbb79399e3c21860ae6fb4608e77a (patch) | |
tree | 15189b5b8aea028e7ff9c9ad19867cb3be0fee9d /src/doc.l | |
parent | ce5e0dcf2d3d55df510b76519ef43642bc331d96 (diff) | |
download | Doxygen-b11bb229001fbb79399e3c21860ae6fb4608e77a.zip Doxygen-b11bb229001fbb79399e3c21860ae6fb4608e77a.tar.gz Doxygen-b11bb229001fbb79399e3c21860ae6fb4608e77a.tar.bz2 |
Release-1.2.6-20010319
Diffstat (limited to 'src/doc.l')
-rw-r--r-- | src/doc.l | 39 |
1 files changed, 38 insertions, 1 deletions
@@ -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); |