[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdenetwork/kopete/protocols/yahoo
From: Andre Duffeck <andre () duffeck ! de>
Date: 2005-08-30 8:30:58
Message-ID: 1125390658.636397.23401.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 454900 by duffeck:
deal with font and size changes.
M +22 -0 yahoocontact.cpp
--- branches/KDE/3.5/kdenetwork/kopete/protocols/yahoo/yahoocontact.cpp \
#454899:454900 @@ -229,6 +229,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