summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/groupwise/libgroupwise/rtf.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/groupwise/libgroupwise/rtf.cc
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/groupwise/libgroupwise/rtf.cc')
-rw-r--r--kopete/protocols/groupwise/libgroupwise/rtf.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/kopete/protocols/groupwise/libgroupwise/rtf.cc b/kopete/protocols/groupwise/libgroupwise/rtf.cc
index 14a3005a..9a691ec9 100644
--- a/kopete/protocols/groupwise/libgroupwise/rtf.cc
+++ b/kopete/protocols/groupwise/libgroupwise/rtf.cc
@@ -1729,25 +1729,25 @@ void ParStyle::clearFormatting()
// dir is not a formatting item.
}
-QString RTF2HTML::quoteString(const QString &_str, quoteMode mode)
-{
- QString str = _str;
- str.replace(QRegExp("&"), "&amp;");
- str.replace(QRegExp("<"), "&lt;");
- str.replace(QRegExp(">"), "&gt;");
- str.replace(QRegExp("\""), "&quot;");
- str.replace(QRegExp("\r"), "");
+TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode)
+{
+ TQString str = _str;
+ str.replace(TQRegExp("&"), "&amp;");
+ str.replace(TQRegExp("<"), "&lt;");
+ str.replace(TQRegExp(">"), "&gt;");
+ str.replace(TQRegExp("\""), "&quot;");
+ str.replace(TQRegExp("\r"), "");
switch (mode){
case quoteHTML:
- str.replace(QRegExp("\n"), "<br>\n");
+ str.replace(TQRegExp("\n"), "<br>\n");
break;
case quoteXML:
- str.replace(QRegExp("\n"), "<br/>\n");
+ str.replace(TQRegExp("\n"), "<br/>\n");
break;
default:
break;
}
- QRegExp re(" +");
+ TQRegExp re(" +");
int len;
int pos = 0;
@@ -1756,7 +1756,7 @@ QString RTF2HTML::quoteString(const QString &_str, quoteMode mode)
if (len == 1)
continue;
- QString s = " ";
+ TQString s = " ";
for (int i = 1; i < len; i++)
s += "&nbsp;";
str.replace(pos, len, s);
@@ -1792,7 +1792,7 @@ void RTF2HTML::FlushOutTags()
// RTF colors are 1-based; colors[] is a 0-based array.
if (t.param > colors.size() || t.param == 0)
break;
- QColor &c = colors[t.param-1];
+ TQColor &c = colors[t.param-1];
PrintUnquoted("<span style=\"color:#%02X%02X%02X\">", c.red(), c.green(), c.blue());
}
break;
@@ -1811,7 +1811,7 @@ void RTF2HTML::FlushOutTags()
case TAG_BG_COLOR:{
if (t.param > colors.size() || t.param == 0)
break;
- QColor &c = colors[t.param-1];
+ TQColor &c = colors[t.param-1];
PrintUnquoted("<span style=\"background-color:#%02X%02X%02X;\">", c.red(), c.green(), c.blue());
break;
}
@@ -1982,7 +1982,7 @@ void RTF2HTML::PrintUnquoted(const char *str, ...)
sParagraph += buff;
}
-void RTF2HTML::PrintQuoted(const QString &str)
+void RTF2HTML::PrintQuoted(const TQString &str)
{
sParagraph += quoteString(str);
}
@@ -2214,7 +2214,7 @@ void Level::reset()
resetTag(TAG_ALL);
if (m_bColors){
if (m_bColorInit){
- QColor c(m_nRed, m_nGreen, m_nBlue);
+ TQColor c(m_nRed, m_nGreen, m_nBlue);
p->colors.push_back(c);
resetColors();
}
@@ -2285,7 +2285,7 @@ void Level::flush()
if (encoding == NULL)
encoding = p->encoding;
- QTextCodec *codec = ICQClient::_getCodec(encoding);
+ TQTextCodec *codec = ICQClient::_getCodec(encoding);
*/
//p->PrintQuoted(codec->toUnicode(text.c_str(), text.length()));
p->PrintQuoted(text.c_str());
@@ -2349,7 +2349,7 @@ static char h2d(char c)
return 0;
}
-QString RTF2HTML::Parse(const char *rtf, const char *_encoding)
+TQString RTF2HTML::Parse(const char *rtf, const char *_encoding)
{
encoding = _encoding;
YY_BUFFER_STATE yy_current_buffer = rtf_scan_string(rtf);
@@ -2417,7 +2417,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding)
break;
case UNICODE_CHAR:{
cur_level.flush();
- sParagraph += QChar((unsigned short)(atol(rtftext + 2)));
+ sParagraph += TQChar((unsigned short)(atol(rtftext + 2)));
break;
}
case HEX:{
@@ -2516,7 +2516,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding)
}
/*
-bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res)
+bool ICQClient::parseRTF(const char *rtf, const char *encoding, TQString &res)
{
char _RTF[] = "{\\rtf";
if ((strlen(rtf) > strlen(_RTF)) && !memcmp(rtf, _RTF, strlen(_RTF))){
@@ -2524,7 +2524,7 @@ bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res)
res = p.Parse(rtf, encoding);
return true;
}
- QTextCodec *codec = ICQClient::_getCodec(encoding);
+ TQTextCodec *codec = ICQClient::_getCodec(encoding);
res = codec->toUnicode(rtf, strlen(rtf));
return false;
}