summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-10-08 20:03:23 (UTC)
committer zautrix <zautrix>2004-10-08 20:03:23 (UTC)
commit10a0e05cc4962d9412a7a5faf3d69a3caf6d1c34 (patch) (unidiff)
tree3105b985a9dbedd31dff52e14fe667eeff4f9ff4 /kaddressbook
parent13bd085e06b76228321f5a004759fcdf19cca711 (diff)
downloadkdepimpi-10a0e05cc4962d9412a7a5faf3d69a3caf6d1c34.zip
kdepimpi-10a0e05cc4962d9412a7a5faf3d69a3caf6d1c34.tar.gz
kdepimpi-10a0e05cc4962d9412a7a5faf3d69a3caf6d1c34.tar.bz2
added contact phone support
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index c5406bf..939296f 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -701,2 +701,5 @@ void KABCore::export2phone()
701 continue; 701 continue;
702 a.simplifyEmails();
703 a.simplifyPhoneNumbers();
704 a.simplifyPhoneNumberTypes();
702 705
@@ -704,4 +707,4 @@ void KABCore::export2phone()
704 description = a.formattedName(); 707 description = a.formattedName();
705
706 QString vcard; 708 QString vcard;
709 QString vcardnew;
707 converter.addresseeToVCard( a, vcard ); 710 converter.addresseeToVCard( a, vcard );
@@ -717,7 +720,19 @@ void KABCore::export2phone()
717 sep = dopp; 720 sep = dopp;
718 datastream +=vcard.mid( start, next - start); 721 vcardnew +=vcard.mid( start, next - start);
719 datastream +=vcard.mid( next+5,sep -next -5 ).upper(); 722 vcardnew +=vcard.mid( next+5,sep -next -5 ).upper();
720 start = sep; 723 start = sep;
721 } 724 }
722 datastream += vcard.mid( start,vcard.length() ); 725 vcardnew += vcard.mid( start,vcard.length() );
726 vcard = "";
727 start = 0;
728 while ( (next = vcardnew.find("ADR", start) )>= 0 ) {
729 int sep = vcardnew.find(":", next);
730 vcard +=vcardnew.mid( start, next - start+3);
731 start = sep;
732 }
733 vcard += vcardnew.mid( start,vcardnew.length() );
734 vcard.replace ( QRegExp(";;;") , "" );
735 vcard.replace ( QRegExp(";;") , "" );
736 datastream += vcard;
737
723 } 738 }