summaryrefslogtreecommitdiffstats
path: root/src/rtfgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtfgen.cpp')
-rw-r--r--src/rtfgen.cpp31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 181f1a8..efae422 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1317,27 +1317,30 @@ void RTFGenerator::writeIndexItem(const char *ref,const char *fn,
// t << "}{\\pageref{" << text << "}}" << endl;
//}
-void RTFGenerator::writeHtmlLink(const char *url,const char *text)
+void RTFGenerator::startHtmlLink(const char *url)
{
- if (url && Config::rtfHyperFlag)
+ if (Config::rtfHyperFlag)
{
t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
t << url;
t << "\" }{}";
t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
+ }
+ else
+ {
+ startTypewriter();
+ }
+}
- if (text)
- docify(text);
- else
- docify(url);
-
+void RTFGenerator::endHtmlLink()
+{
+ if (Config::rtfHyperFlag)
+ {
t << "}}}" << endl;
}
else
{
- startTypewriter();
- docify(text);
endTypewriter();
}
}
@@ -2264,6 +2267,16 @@ void RTFGenerator::writeRing(char c)
}
}
+void RTFGenerator::writeCCedil(char c)
+{
+ switch(c)
+ {
+ case 'C' : t << '\307'; break;
+ case 'c' : t << '\347'; break;
+ default: t << '?'; break;
+ }
+}
+
/**
* VERY brittle routine inline RTF's included by other RTF's.
* it is recursive and ugly.