[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/protocols/yahoo
From: Andre Duffeck <andre () duffeck ! de>
Date: 2005-08-30 8:31:14
Message-ID: 1125390674.704211.23444.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 454901 by duffeck:
forwardport: deal with font and size changes.
M +22 -0 yahoocontact.cpp
--- trunk/KDE/kdenetwork/kopete/protocols/yahoo/yahoocontact.cpp #454900:454901
@@ -232,6 +232,28 @@
}
}
+ // find and replace Font-formattings
+ regExp.setPattern( "<span([^>]*)font-family:([^;\"]*)([^>]*)>(.*)</span>" );
+ pos = 0;
+ while ( pos >= 0 ) {
+ pos = regExp.search( messageText, pos );
+ if ( pos >= 0 ) {
+ pos += regExp.matchedLength();
+ messageText.replace( regExp, QString::fromLatin1("<span\\1\\3><font \
face=\"\\2\">\\4</font></span>" ) ); + }
+ }
+
+ // find and replace Size-formattings
+ regExp.setPattern( "<span([^>]*)font-size:([0-9]*)pt([^>]*)>(.*)</span>" );
+ pos = 0;
+ while ( pos >= 0 ) {
+ pos = regExp.search( messageText, pos );
+ if ( pos >= 0 ) {
+ pos += regExp.matchedLength();
+ messageText.replace( regExp, QString::fromLatin1("<span\\1\\3><font \
size=\"\\2\">\\4</font></span>" ) ); + }
+ }
+
// remove span-tags
regExp.setPattern( "<span([^>]*)>(.*)</span>" );
pos = 0;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic