From e38d2351b83fa65c66ccde443777647ef5cb6cff Mon Sep 17 00:00:00 2001
From: tpearson
Date: Mon, 1 Mar 2010 19:17:32 +0000
Subject: Added KDE3 version of Tellico
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1097620 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
---
src/rtf2html/Makefile.am | 15 ++
src/rtf2html/common.h | 38 ++++
src/rtf2html/dbg_iter.h | 67 ++++++
src/rtf2html/fmt_opts.cpp | 221 ++++++++++++++++++
src/rtf2html/fmt_opts.h | 154 +++++++++++++
src/rtf2html/rtf2html.cpp | 531 +++++++++++++++++++++++++++++++++++++++++++
src/rtf2html/rtf2html.h | 28 +++
src/rtf2html/rtf_keyword.cpp | 107 +++++++++
src/rtf2html/rtf_keyword.h | 1 +
src/rtf2html/rtf_table.cpp | 235 +++++++++++++++++++
src/rtf2html/rtf_table.h | 90 ++++++++
src/rtf2html/rtf_tools.h | 65 ++++++
12 files changed, 1552 insertions(+)
create mode 100644 src/rtf2html/Makefile.am
create mode 100644 src/rtf2html/common.h
create mode 100644 src/rtf2html/dbg_iter.h
create mode 100644 src/rtf2html/fmt_opts.cpp
create mode 100644 src/rtf2html/fmt_opts.h
create mode 100644 src/rtf2html/rtf2html.cpp
create mode 100644 src/rtf2html/rtf2html.h
create mode 100644 src/rtf2html/rtf_keyword.cpp
create mode 100644 src/rtf2html/rtf_keyword.h
create mode 100644 src/rtf2html/rtf_table.cpp
create mode 100644 src/rtf2html/rtf_table.h
create mode 100644 src/rtf2html/rtf_tools.h
(limited to 'src/rtf2html')
diff --git a/src/rtf2html/Makefile.am b/src/rtf2html/Makefile.am
new file mode 100644
index 0000000..ea3d39f
--- /dev/null
+++ b/src/rtf2html/Makefile.am
@@ -0,0 +1,15 @@
+AM_CPPFLAGS = $(all_includes)
+
+noinst_LIBRARIES = librtf2html.a
+librtf2html_a_SOURCES = fmt_opts.cpp rtf2html.cpp rtf_keyword.cpp rtf_table.cpp
+
+librtf2html_a_METASOURCES = AUTO
+
+KDE_OPTIONS = noautodist
+
+EXTRA_DIST = common.h dbg_iter.h fmt_opts.h fmt_opts.cpp \
+rtf2html.h rtf2html.cpp rtf_keyword.h rtf_keyword.cpp \
+rtf_table.h rtf_table.cpp rtf_tools.h
+
+CLEANFILES = *~
+
diff --git a/src/rtf2html/common.h b/src/rtf2html/common.h
new file mode 100644
index 0000000..01b1f5b
--- /dev/null
+++ b/src/rtf2html/common.h
@@ -0,0 +1,38 @@
+/* This is RTF to HTML converter, implemented as a text filter, generally.
+ Copyright (C) 2003 Valentin Lavrinenko, vlavrinenko@users.sourceforge.net
+
+ available at http://rtf2html.sf.net
+
+ Original available under the terms of the GNU LGPL2, and according
+ to those terms, relicensed under the GNU GPL2 for inclusion in Tellico */
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#ifndef __COMMON_H__
+#define __COMMON_H__
+
+#include
+#include
+#include
+
+inline std::string from_int(int value)
+{
+ std::ostringstream buf;
+ buf<
+class dbg_iter_mixin : public virtual T
+{
+ public:
+ int offset;
+ dbg_iter_mixin(const T& t) : T(t)
+ {}
+ T& operator=(const T& t)
+ {
+ return T::operator=(t);
+ }
+ dbg_iter_mixin& operator++ ()
+ {
+ ++offset;
+ T::operator++();
+ return *this;
+ }
+ dbg_iter_mixin operator++ (int i)
+ {
+ ++offset;
+ return T::operator++(i);
+ }
+ char operator *() const
+ {
+ T::value_type c=T::operator*();
+// std::cerr<
+class dbg_iter : public dbg_iter_mixin
+{
+ public:
+ dbg_iter(const T& t) : dbg_iter_mixin(t)
+ {}
+};
+
+template
+class dbg_iter > :
+ public virtual std::istreambuf_iterator,
+ public dbg_iter_mixin >
+{
+ public:
+ dbg_iter(std::basic_streambuf *buf) : std::istreambuf_iterator(buf)
+ {}
+};
+
+}
\ No newline at end of file
diff --git a/src/rtf2html/fmt_opts.cpp b/src/rtf2html/fmt_opts.cpp
new file mode 100644
index 0000000..25a2f24
--- /dev/null
+++ b/src/rtf2html/fmt_opts.cpp
@@ -0,0 +1,221 @@
+/* This is RTF to HTML converter, implemented as a text filter, generally.
+ Copyright (C) 2003 Valentin Lavrinenko, vlavrinenko@users.sourceforge.net
+
+ available at http://rtf2html.sf.net
+
+ Original available under the terms of the GNU LGPL2, and according
+ to those terms, relicensed under the GNU GPL2 for inclusion in Tellico */
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#include "fmt_opts.h"
+
+using namespace rtf;
+
+std::string formatting_options::get_par_str() const
+{
+ std::string style;
+ switch (papAlign)
+ {
+ case formatting_options::align_right:
+ style+="text-align:right;";
+ break;
+ case formatting_options::align_center:
+ style+="text-align:center;";
+ break;
+ case formatting_options::align_justify:
+ style+="text-align:justify;";
+ default: break;
+ }
+ if (papFirst!=0)
+ {
+ style+="text-indent:";
+ style+=from_int(papFirst);
+ style+="pt;";
+ }
+ if (papLeft!=0)
+ {
+ style+="margin-left:";
+ style+=from_int(papLeft);
+ style+="pt;";
+ }
+ if (papRight!=0)
+ {
+ style+="margin-right:";
+ style+=from_int(papRight);
+ style+="pt;";
+ }
+ if (papBefore!=0)
+ {
+ style+="margin-top:";
+ style+=from_int(papBefore);
+ style+="pt;";
+ }
+ if (papAfter!=0)
+ {
+ style+="margin-bottom:";
+ style+=from_int(papAfter);
+ style+="pt;";
+ }
+ if (style.empty())
+ return std::string("");
+ else
+ {
+ style.insert(0, "
";
+ }
+}
+
+std::string formatter::format(const formatting_options &_opt)
+{
+ formatting_options last_opt, opt(_opt);
+ std::string result;
+ if (!opt_stack.empty())
+ {
+ int cnt=0;
+ fo_deque::reverse_iterator i;
+ for (i=opt_stack.rbegin(); i!=opt_stack.rend(); ++i)
+ {
+ if (*i==opt)
+ break;
+ ++cnt;
+ }
+ if (cnt==0)
+ return "";
+ if (i!=opt_stack.rend())
+ {
+ while (cnt--)
+ {
+ result+="";
+ opt_stack.pop_back();
+ }
+ return result;
+ }
+ last_opt=opt_stack.back();
+ }
+ if (last_opt.chpVAlign!=formatting_options::va_normal
+ && last_opt.chpVAlign!=opt.chpVAlign)
+ {
+ int cnt=0;
+ fo_deque::reverse_iterator i;
+ for (i=opt_stack.rbegin(); i!=opt_stack.rend(); ++i)
+ {
+ if (i->chpVAlign==formatting_options::va_normal)
+ break;
+ ++cnt;
+ }
+ while (cnt--)
+ {
+ result+="";
+ opt_stack.pop_back();
+ }
+ last_opt=opt_stack.empty()?formatting_options():opt_stack.back();
+ }
+ std::string style;
+ if (opt.chpBold!=last_opt.chpBold)
+ {
+ style+="font-weight:";
+ style+=opt.chpBold?"bold":"normal";
+ style+=";";
+ }
+ if (opt.chpItalic!=last_opt.chpItalic)
+ {
+ style+="font-style:";
+ style+=opt.chpItalic?"italic":"normal";
+ style+=";";
+ }
+ if (opt.chpUnderline!=last_opt.chpUnderline)
+ {
+ style+="text-decoration:";
+ style+=opt.chpUnderline?"underline":"none";
+ style+=";";
+ }
+ if (opt.chpVAlign!=formatting_options::va_normal)
+ opt.chpFontSize=(int)(0.7*(opt.chpFontSize?opt.chpFontSize:24));
+ if (opt.chpFontSize!=last_opt.chpFontSize)
+ {
+ style+="font-size:";
+ style+=from_int(opt.chpFontSize/2);
+ style+="pt;";
+ }
+ if (opt.chpVAlign!=last_opt.chpVAlign)
+ {
+ style+="vertical-align:";
+ style+=opt.chpVAlign==formatting_options::va_sub?"sub":"super";
+ style+=";";
+ }
+ if (opt.chpFColor!=last_opt.chpFColor)
+ {
+ style+="color:";
+ style+=opt.chpFColor.r>0?"#"+hex(opt.chpFColor.r&0xFF)
+ +hex(opt.chpFColor.g&0xFF)
+ +hex(opt.chpFColor.b&0xFF)
+ :"WindowText";
+ style+=";";
+ }
+ if (opt.chpBColor!=last_opt.chpBColor)
+ {
+ style+="background-color:";
+ style+=opt.chpBColor.r>0?"#"+hex(opt.chpBColor.r&0xFF)
+ +hex(opt.chpBColor.g&0xFF)
+ +hex(opt.chpBColor.b&0xFF)
+ :"Window";
+ style+=";";
+ }
+ if (opt.chpHighlight!=last_opt.chpHighlight)
+ {
+ style+="background-color:";
+ switch (opt.chpHighlight)
+ {
+ case 0: style+="Window"; break;
+ case 1: style+="black"; break;
+ case 2: style+="blue"; break;
+ case 3: style+="aqua"; break;
+ case 4: style+="lime"; break;
+ case 5: style+="fuchsia"; break;
+ case 6: style+="red"; break;
+ case 7: style+="yellow"; break;
+ case 9: style+="navy"; break;
+ case 10: style+="teal"; break;
+ case 11: style+="green"; break;
+ case 12: style+="purple"; break;
+ case 13: style+="maroon"; break;
+ case 14: style+="olive"; break;
+ case 15: style+="gray"; break;
+ case 16: style+="silver"; break;
+ }
+ style+=";";
+ }
+ if (opt.chpFont!=last_opt.chpFont)
+ {
+ style+="font-family:'";
+ style+=opt.chpFont.name.empty()?"serif":opt.chpFont.name;
+ style+="'";
+ switch (opt.chpFont.family)
+ {
+ case font::ff_serif: style+=", serif"; break;
+ case font::ff_sans_serif: style+=", sans-serif"; break;
+ case font::ff_cursive: style+=", cursive"; break;
+ case font::ff_fantasy: style+=", fantasy"; break;
+ case font::ff_monospace: style+=", monospace"; break;
+ default: break;
+ }
+ style+=";";
+ }
+ opt_stack.push_back(opt);
+ return result+"";
+}
+
+std::string formatter::close()
+{
+ std::string result;
+ for (fo_deque::iterator i=opt_stack.begin(); i!=opt_stack.end(); ++i)
+ result+="";
+ return result;
+}
diff --git a/src/rtf2html/fmt_opts.h b/src/rtf2html/fmt_opts.h
new file mode 100644
index 0000000..6845d60
--- /dev/null
+++ b/src/rtf2html/fmt_opts.h
@@ -0,0 +1,154 @@
+/* This is RTF to HTML converter, implemented as a text filter, generally.
+ Copyright (C) 2003 Valentin Lavrinenko, vlavrinenko@users.sourceforge.net
+
+ available at http://rtf2html.sf.net
+
+ Original available under the terms of the GNU LGPL2, and according
+ to those terms, relicensed under the GNU GPL2 for inclusion in Tellico */
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#ifndef __FMT_OPTS_H__
+#define __FMT_OPTS_H__
+
+#include "common.h"
+#include
+#include
+#include
+#include
\n";
+ if (!bInTable)
+ {
+ html+=t_str;
+ }
+ else
+ {
+ if (cur_options.papInTbl)
+ {
+ tcCurCell->Text+=t_str;
+ }
+ else
+ {
+ html+=tblCurTable->make()+t_str;
+ bInTable=false;
+ tblCurTable=new table;
+ }
+ }
+ par_html.clear();
+ break;
+ // character formatting
+ case rtf_keyword::rkw_super:
+ cur_options.chpVAlign=
+ kw.parameter()==0?formatting_options::va_normal
+ :formatting_options::va_sup;
+ break;
+ case rtf_keyword::rkw_sub:
+ cur_options.chpVAlign=
+ kw.parameter()==0?formatting_options::va_normal
+ :formatting_options::va_sub;
+ break;
+ case rtf_keyword::rkw_b:
+ cur_options.chpBold=!(kw.parameter()==0);
+ break;
+ case rtf_keyword::rkw_i:
+ cur_options.chpItalic=!(kw.parameter()==0);
+ break;
+ case rtf_keyword::rkw_ul:
+ cur_options.chpUnderline=!(kw.parameter()==0);
+ break;
+ case rtf_keyword::rkw_ulnone:
+ cur_options.chpUnderline=false;
+ break;
+ case rtf_keyword::rkw_fs:
+ cur_options.chpFontSize=kw.parameter();
+ break;
+ case rtf_keyword::rkw_cf:
+ cur_options.chpFColor=colortbl[kw.parameter()];
+ break;
+ case rtf_keyword::rkw_cb:
+ cur_options.chpBColor=colortbl[kw.parameter()];
+ break;
+ case rtf_keyword::rkw_highlight:
+ cur_options.chpHighlight=kw.parameter();
+ break;
+ case rtf_keyword::rkw_f:
+ cur_options.chpFont=fonttbl[kw.parameter()];
+ break;
+ case rtf_keyword::rkw_plain:
+ cur_options.chpBold=cur_options.chpItalic
+ =cur_options.chpUnderline=false;
+ cur_options.chpVAlign=formatting_options::va_normal;
+ cur_options.chpFontSize=cur_options.chpHighlight=0;
+ cur_options.chpFColor=cur_options.chpBColor=color();
+ cur_options.chpFont=font();
+ break;
+ // table formatting
+ case rtf_keyword::rkw_intbl:
+ cur_options.papInTbl=true;
+ break;
+ case rtf_keyword::rkw_trowd:
+ CurCellDefs=CellDefsList.insert(CellDefsList.end(),
+ table_cell_defs());
+ case rtf_keyword::rkw_row:
+ if (!trCurRow->Cells.empty())
+ {
+ trCurRow->CellDefs=CurCellDefs;
+ if (trCurRow->Left==-1000)
+ trCurRow->Left=iLastRowLeft;
+ if (trCurRow->Height==-1000)
+ trCurRow->Height=iLastRowHeight;
+ tblCurTable->push_back(trCurRow);
+ trCurRow=new table_row;
+ }
+ bInTable=true;
+ break;
+ case rtf_keyword::rkw_cell:
+ t_str=cur_options.get_par_str()+par_html.str()
+ +" "+par_html.close()+"
\n";
+ tcCurCell->Text+=t_str;
+ par_html.clear();
+ trCurRow->Cells.push_back(tcCurCell);
+ tcCurCell=new table_cell;
+ break;
+ case rtf_keyword::rkw_cellx:
+ tcdCurCellDef->Right=kw.parameter();
+ CurCellDefs->push_back(tcdCurCellDef);
+ tcdCurCellDef=new table_cell_def;
+ break;
+ case rtf_keyword::rkw_trleft:
+ trCurRow->Left=kw.parameter();
+ iLastRowLeft=kw.parameter();
+ break;
+ case rtf_keyword::rkw_trrh:
+ trCurRow->Height=kw.parameter();
+ iLastRowHeight=kw.parameter();
+ break;
+ case rtf_keyword::rkw_clvmgf:
+ tcdCurCellDef->FirstMerged=true;
+ break;
+ case rtf_keyword::rkw_clvmrg:
+ tcdCurCellDef->Merged=true;
+ break;
+ case rtf_keyword::rkw_clbrdrb:
+ tcdCurCellDef->BorderBottom=true;
+ tcdCurCellDef->ActiveBorder=&(tcdCurCellDef->BorderBottom);
+ break;
+ case rtf_keyword::rkw_clbrdrt:
+ tcdCurCellDef->BorderTop=true;
+ tcdCurCellDef->ActiveBorder=&(tcdCurCellDef->BorderTop);
+ break;
+ case rtf_keyword::rkw_clbrdrl:
+ tcdCurCellDef->BorderLeft=true;
+ tcdCurCellDef->ActiveBorder=&(tcdCurCellDef->BorderLeft);
+ break;
+ case rtf_keyword::rkw_clbrdrr:
+ tcdCurCellDef->BorderRight=true;
+ tcdCurCellDef->ActiveBorder=&(tcdCurCellDef->BorderRight);
+ break;
+ case rtf_keyword::rkw_brdrnone:
+ if (tcdCurCellDef->ActiveBorder!=NULL)
+ {
+ *(tcdCurCellDef->ActiveBorder)=false;
+ }
+ break;
+ case rtf_keyword::rkw_clvertalt:
+ tcdCurCellDef->VAlign=table_cell_def::valign_top;
+ break;
+ case rtf_keyword::rkw_clvertalc:
+ tcdCurCellDef->VAlign=table_cell_def::valign_center;
+ break;
+ case rtf_keyword::rkw_clvertalb:
+ tcdCurCellDef->VAlign=table_cell_def::valign_bottom;
+ break;
+ // page formatting
+ case rtf_keyword::rkw_paperw:
+ iDocWidth=kw.parameter();
+ break;
+ case rtf_keyword::rkw_margl:
+ iMarginLeft=kw.parameter();
+ break;
+ default: break;
+ }
+ }
+ break;
+ }
+ case '{':
+ // perform group opening actions here
+ foStack.push(cur_options);
+ ++buf_in;
+ break;
+ case '}':
+ // perform group closing actions here
+ cur_options=foStack.top();
+ foStack.pop();
+ ++buf_in;
+ break;
+ case 13:
+ case 10:
+ ++buf_in;
+ break;
+ case '<':
+ par_html.write("<");
+ ++buf_in;
+ break;
+ case '>':
+ par_html.write(">");
+ ++buf_in;
+ break;
+/* case ' ':
+ par_html.write(" ");
+ ++buf_in;
+ break;*/
+ default:
+ par_html.write(*buf_in++);
+ }
+ }
+
+ t_str=cur_options.get_par_str()+par_html.str()
+ +" "+par_html.close()+"\n";
+ html+=t_str;
+
+ delete tcCurCell;
+ delete trCurRow;
+ delete tblCurTable;
+ delete tcdCurCellDef;
+
+ return html;
+}
+
diff --git a/src/rtf2html/rtf2html.h b/src/rtf2html/rtf2html.h
new file mode 100644
index 0000000..a4e1d2f
--- /dev/null
+++ b/src/rtf2html/rtf2html.h
@@ -0,0 +1,28 @@
+/***************************************************************************
+ copyright : (C) 2007 by Robby Stephenson
+ email : robby@periapsis.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#include
+
+namespace Tellico {
+
+class RTF2HTML {
+public:
+ RTF2HTML(const QString& text);
+
+ QString toHTML() const;
+
+private:
+ QString m_text;
+};
+
+}
diff --git a/src/rtf2html/rtf_keyword.cpp b/src/rtf2html/rtf_keyword.cpp
new file mode 100644
index 0000000..ee4774c
--- /dev/null
+++ b/src/rtf2html/rtf_keyword.cpp
@@ -0,0 +1,107 @@
+/* This is RTF to HTML converter, implemented as a text filter, generally.
+ Copyright (C) 2003 Valentin Lavrinenko, vlavrinenko@users.sourceforge.net
+
+ available at http://rtf2html.sf.net
+
+ Original available under the terms of the GNU LGPL2, and according
+ to those terms, relicensed under the GNU GPL2 for inclusion in Tellico */
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#include "rtf_keyword.h"
+
+using namespace rtf;
+
+rtf_keyword::keyword_map::keyword_map() : base_class()
+{
+ insert(value_type("b", rkw_b));
+ insert(value_type("bin", rkw_bin));
+ insert(value_type("blue", rkw_blue));
+ insert(value_type("brdrnone", rkw_brdrnone));
+ insert(value_type("bullet", rkw_bullet));
+ insert(value_type("cb", rkw_cb));
+ insert(value_type("cell", rkw_cell));
+ insert(value_type("cellx", rkw_cellx));
+ insert(value_type("cf", rkw_cf));
+ insert(value_type("clbrdrb", rkw_clbrdrb));
+ insert(value_type("clbrdrl", rkw_clbrdrl));
+ insert(value_type("clbrdrr", rkw_clbrdrr));
+ insert(value_type("clbrdrt", rkw_clbrdrt));
+ insert(value_type("clvertalb", rkw_clvertalb));
+ insert(value_type("clvertalc", rkw_clvertalc));
+ insert(value_type("clvertalt", rkw_clvertalt));
+ insert(value_type("clvmgf", rkw_clvmgf));
+ insert(value_type("clvmrg", rkw_clvmrg));
+ insert(value_type("colortbl", rkw_colortbl));
+ insert(value_type("emdash", rkw_emdash));
+ insert(value_type("emspace", rkw_emspace));
+ insert(value_type("endash", rkw_endash));
+ insert(value_type("enspace", rkw_enspace));
+ insert(value_type("f", rkw_f));
+ insert(value_type("fprq", rkw_fprq));
+ insert(value_type("fcharset", rkw_fcharset));
+ insert(value_type("fnil", rkw_fnil));
+ insert(value_type("froman", rkw_froman));
+ insert(value_type("fswiss", rkw_fswiss));
+ insert(value_type("fmodern", rkw_fmodern));
+ insert(value_type("fscript", rkw_fscript));
+ insert(value_type("fdecor", rkw_fdecor));
+ insert(value_type("ftech", rkw_ftech));
+ insert(value_type("fbidi", rkw_fbidi));
+ insert(value_type("field", rkw_field));
+ insert(value_type("filetbl", rkw_filetbl));
+ insert(value_type("fldrslt", rkw_fldrslt));
+ insert(value_type("fonttbl", rkw_fonttbl));
+ insert(value_type("footer", rkw_footer));
+ insert(value_type("footerf", rkw_footerf));
+ insert(value_type("fs", rkw_fs));
+ insert(value_type("green", rkw_green));
+ insert(value_type("header", rkw_header));
+ insert(value_type("headerf", rkw_headerf));
+ insert(value_type("highlight", rkw_highlight));
+ insert(value_type("i", rkw_i));
+ insert(value_type("info", rkw_info));
+ insert(value_type("intbl", rkw_intbl));
+ insert(value_type("ldblquote", rkw_ldblquote));
+ insert(value_type("li", rkw_li));
+ insert(value_type("line", rkw_line));
+ insert(value_type("lquote", rkw_lquote));
+ insert(value_type("margl", rkw_margl));
+ insert(value_type("object", rkw_object));
+ insert(value_type("paperw", rkw_paperw));
+ insert(value_type("par", rkw_par));
+ insert(value_type("pard", rkw_pard));
+ insert(value_type("pict", rkw_pict));
+ insert(value_type("plain", rkw_plain));
+ insert(value_type("qc", rkw_qc));
+ insert(value_type("qj", rkw_qj));
+ insert(value_type("ql", rkw_ql));
+ insert(value_type("qr", rkw_qr));
+ insert(value_type("rdblquote", rkw_rdblquote));
+ insert(value_type("red", rkw_red));
+ insert(value_type("ri", rkw_ri));
+ insert(value_type("row", rkw_row));
+ insert(value_type("rquote", rkw_rquote));
+ insert(value_type("sa", rkw_sa));
+ insert(value_type("sb", rkw_sb));
+ insert(value_type("sect", rkw_sect));
+ insert(value_type("softline", rkw_softline));
+ insert(value_type("stylesheet", rkw_stylesheet));
+ insert(value_type("sub", rkw_sub));
+ insert(value_type("super", rkw_super));
+ insert(value_type("tab", rkw_tab));
+ insert(value_type("title", rkw_title));
+ insert(value_type("trleft", rkw_trleft));
+ insert(value_type("trowd", rkw_trowd));
+ insert(value_type("trrh", rkw_trrh));
+ insert(value_type("ul", rkw_ul));
+ insert(value_type("ulnone", rkw_ulnone));
+}
+
+rtf_keyword::keyword_map rtf_keyword::keymap;
diff --git a/src/rtf2html/rtf_keyword.h b/src/rtf2html/rtf_keyword.h
new file mode 100644
index 0000000..c510ea0
--- /dev/null
+++ b/src/rtf2html/rtf_keyword.h
@@ -0,0 +1 @@
+/* This is RTF to HTML converter, implemented as a text filter, generally.
Copyright (C) 2003 Valentin Lavrinenko, vlavrinenko@users.sourceforge.net
available at http://rtf2html.sf.net
Original available under the terms of the GNU LGPL2, and according
to those terms, relicensed under the GNU GPL2 for inclusion in Tellico */
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License as *
* published by the Free Software Foundation; *
* *
***************************************************************************/
#ifndef __RTF_KEYWORD_H__
#define __RTF_KEYWORD_H__
#include
#include