diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/groupwise/libgroupwise/rtf.cc | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/groupwise/libgroupwise/rtf.cc')
-rw-r--r-- | kopete/protocols/groupwise/libgroupwise/rtf.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kopete/protocols/groupwise/libgroupwise/rtf.cc b/kopete/protocols/groupwise/libgroupwise/rtf.cc index 9a691ec9..35fea9d1 100644 --- a/kopete/protocols/groupwise/libgroupwise/rtf.cc +++ b/kopete/protocols/groupwise/libgroupwise/rtf.cc @@ -1732,17 +1732,17 @@ void ParStyle::clearFormatting() TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode) { TQString str = _str; - str.replace(TQRegExp("&"), "&"); - str.replace(TQRegExp("<"), "<"); - str.replace(TQRegExp(">"), ">"); - str.replace(TQRegExp("\""), """); - str.replace(TQRegExp("\r"), ""); + str.tqreplace(TQRegExp("&"), "&"); + str.tqreplace(TQRegExp("<"), "<"); + str.tqreplace(TQRegExp(">"), ">"); + str.tqreplace(TQRegExp("\""), """); + str.tqreplace(TQRegExp("\r"), ""); switch (mode){ case quoteHTML: - str.replace(TQRegExp("\n"), "<br>\n"); + str.tqreplace(TQRegExp("\n"), "<br>\n"); break; case quoteXML: - str.replace(TQRegExp("\n"), "<br/>\n"); + str.tqreplace(TQRegExp("\n"), "<br/>\n"); break; default: break; @@ -1759,7 +1759,7 @@ TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode) TQString s = " "; for (int i = 1; i < len; i++) s += " "; - str.replace(pos, len, s); + str.tqreplace(pos, len, s); } return str; } @@ -1994,7 +1994,7 @@ void RTF2HTML::FlushParagraph() /* s += "<p dir=\""; - // Note: Lower-case 'ltr' and 'rtl' are important for Qt. + // Note: Lower-case 'ltr' and 'rtl' are important for TQt. s += (parStyle.dir == ParStyle::DirRTL ? "rtl" : "ltr"); s += "\">"; s += sParagraph; @@ -2182,7 +2182,7 @@ void Level::clearParagraphFormatting() // implicitly start a paragraph if (!isParagraphOpen()) startParagraph(); - // Since we don't implement any of the paragraph formatting tags (e.g. alignment), + // Since we don't implement any of the paragraph formatting tags (e.g. tqalignment), // we don't clean up anything here. Note that \pard does NOT clean character // formatting (such as font size, font weight, italics...). p->parStyle.clearFormatting(); @@ -2273,7 +2273,7 @@ void Level::flush() /* const char *encoding = NULL; if (m_nEncoding){ - for (const ENCODING *c = ICQPlugin::core->encodings; c->language; c++){ + for (const ENCODING *c = ICTQPlugin::core->encodings; c->language; c++){ if (!c->bMain) continue; if ((unsigned)c->rtf_code == m_nEncoding){ @@ -2285,7 +2285,7 @@ void Level::flush() if (encoding == NULL) encoding = p->encoding; - TQTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICTQClient::_getCodec(encoding); */ //p->PrintQuoted(codec->toUnicode(text.c_str(), text.length())); p->PrintQuoted(text.c_str()); @@ -2374,15 +2374,15 @@ TQString RTF2HTML::Parse(const char *rtf, const char *_encoding) } case IMG:{ cur_level.flush(); - const char ICQIMAGE[] = "icqimage"; + const char ICTQIMAGE[] = "icqimage"; const char *smiles[] = { ":-)" , ":-O" , ":-|" , ":-/" , // 0-3 ":-(" , ":-*" , ":-/" , ":'(" , // 4-7 ";-)" , ":-@" , ":-$" , ":-X" , // 8-B ":-P" , "8-)" , "O:)" , ":-D" }; // C-F const char *p = rtftext + 3; - if ((strlen(p) > strlen(ICQIMAGE)) && !memcmp(p, ICQIMAGE, strlen(ICQIMAGE))){ + if ((strlen(p) > strlen(ICTQIMAGE)) && !memcmp(p, ICTQIMAGE, strlen(ICTQIMAGE))){ unsigned n = 0; - for (p += strlen(ICQIMAGE); *p; p++){ + for (p += strlen(ICTQIMAGE); *p; p++){ if ((*p >= '0') && (*p <= '9')){ n = n << 4; n += (*p - '0'); @@ -2516,7 +2516,7 @@ TQString RTF2HTML::Parse(const char *rtf, const char *_encoding) } /* -bool ICQClient::parseRTF(const char *rtf, const char *encoding, TQString &res) +bool ICTQClient::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, TQString &res) res = p.Parse(rtf, encoding); return true; } - TQTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICTQClient::_getCodec(encoding); res = codec->toUnicode(rtf, strlen(rtf)); return false; } |