summaryrefslogtreecommitdiff
path: root/src/rtfgen.cpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 10:46:26 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 10:46:26 +0900
commitb7b8bd24feb1363d7d84d030b9ea688fe2f149de (patch)
tree83a30b06a24a934bb4120199cd0c180ece6fc1ed /src/rtfgen.cpp
parent046aece77e373b5280b56bf871fa6e974d06e85d (diff)
downloaddoxygen-b7b8bd24feb1363d7d84d030b9ea688fe2f149de.tar.gz
doxygen-b7b8bd24feb1363d7d84d030b9ea688fe2f149de.tar.bz2
doxygen-b7b8bd24feb1363d7d84d030b9ea688fe2f149de.zip
Imported Upstream version 1.8.4upstream/1.8.4
Diffstat (limited to 'src/rtfgen.cpp')
-rw-r--r--src/rtfgen.cpp47
1 files changed, 21 insertions, 26 deletions
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index b51245c..9a7dbee 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -2,7 +2,7 @@
*
*
*
- * Copyright (C) 1997-2012 by Parker Waechter & Dimitri van Heesch.
+ * Copyright (C) 1997-2013 by Parker Waechter & Dimitri van Heesch.
*
* Style sheet additions by Alexander Bartolich
*
@@ -178,7 +178,7 @@ void RTFGenerator::init()
while(def->reference != 0)
{
if (def->definition == 0)
- err("Internal error: rtf_Style_Default[%s] has no definition.\n", def->name);
+ err("Internal: rtf_Style_Default[%s] has no definition.\n", def->name);
StyleData* styleData = new StyleData(def->reference, def->definition);
rtf_Style.insert(def->name, styleData);
def++;
@@ -1773,21 +1773,6 @@ void RTFGenerator::codify(const char *str)
c=*p++;
-#if 0
- if( MultiByte )
- {
- t << getMultiByte( c );
- MultiByte = FALSE;
- continue;
- }
- if( c >= 0x80 )
- {
- MultiByte = TRUE;
- t << getMultiByte( c );
- continue;
- }
-#endif
-
switch(c)
{
case '\t': spacesToNextTabStop = Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
@@ -1800,7 +1785,7 @@ void RTFGenerator::codify(const char *str)
case '{': t << "\\{"; col++; break;
case '}': t << "\\}"; col++; break;
case '\\': t << "\\\\"; col++; break;
- default: t << (char)c; col++; break;
+ default: p=(const unsigned char *)writeUtf8Char(t,(const char *)p-1); col++; break;
}
}
}
@@ -2024,7 +2009,7 @@ void RTFGenerator::incrementIndentLevel()
m_listLevel++;
if (m_listLevel>rtf_maxIndentLevels-1)
{
- err("error: Maximum indent level (%d) exceeded while generating RTF output!\n",rtf_maxIndentLevels);
+ err("Maximum indent level (%d) exceeded while generating RTF output!\n",rtf_maxIndentLevels);
m_listLevel=rtf_maxIndentLevels-1;
}
}
@@ -2034,7 +2019,7 @@ void RTFGenerator::decrementIndentLevel()
m_listLevel--;
if (m_listLevel<0)
{
- err("error: Negative indent level while generating RTF output!\n");
+ err("Negative indent level while generating RTF output!\n");
m_listLevel=0;
}
}
@@ -2352,7 +2337,7 @@ static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncl
QFile f(infName);
if (!f.open(IO_ReadOnly))
{
- err("error: problems opening rtf file %s for reading\n",infName.data());
+ err("problems opening rtf file %s for reading\n",infName.data());
return FALSE;
}
@@ -2367,7 +2352,7 @@ static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncl
{
if (f.readLine(lineBuf.data(),maxLineLength)==-1)
{
- err("ERROR - read error in %s before end of RTF header!\n",infName.data());
+ err("read error in %s before end of RTF header!\n",infName.data());
return FALSE;
}
if (bIncludeHeader) encodeForOutput(t,lineBuf);
@@ -2550,9 +2535,9 @@ void testRTFOutput(const char *name)
}
if (bcount==0) return; // file is OK.
err:
- err("error: RTF integrity test failed at line %d of %s due to a bracket mismatch.\n",line,name);
- err(" Please try to create a small code example that produces this error \n"
- " and send that to dimitri@stack.nl.\n");
+ err("RTF integrity test failed at line %d of %s due to a bracket mismatch.\n"
+ " Please try to create a small code example that produces this error \n"
+ " and send that to dimitri@stack.nl.\n",line,name);
}
/**
@@ -2565,7 +2550,7 @@ bool RTFGenerator::preProcessFileInplace(const char *path,const char *name)
// store the original directory
if (!d.exists())
{
- err("error: Output dir %s does not exist!\n",path);
+ err("Output dir %s does not exist!\n",path);
return FALSE;
}
QCString oldDir = QDir::currentDirPath().utf8();
@@ -2716,6 +2701,16 @@ void RTFGenerator::endParameterType()
t << " ";
}
+void RTFGenerator::exceptionEntry(const char* prefix,bool closeBracket)
+{
+ DBG_RTF(t << "{\\comment (exceptionEntry)}" << endl)
+ if (prefix)
+ t << " " << prefix;
+ else if (closeBracket)
+ t << ")";
+ t << " ";
+}
+
void RTFGenerator::writeDoc(DocNode *n,Definition *ctx,MemberDef *)
{
RTFDocVisitor *visitor = new RTFDocVisitor(t,*this,ctx?ctx->getDefFileExtension():QCString(""));