summaryrefslogtreecommitdiffabout
path: root/kabc/vcardformatimpl.cpp
Side-by-side diff
Diffstat (limited to 'kabc/vcardformatimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcardformatimpl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp
index ec5ed80..26fd4f0 100644
--- a/kabc/vcardformatimpl.cpp
+++ b/kabc/vcardformatimpl.cpp
@@ -272,25 +272,25 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v )
for( cl = contentLines.first(); cl; cl = contentLines.next() ) {
EntityType type = cl->entityType();
if ( type == EntityLabel ) {
int type = readAddressParam( cl );
Address address = addressee.address( type );
if ( address.isEmpty() )
address.setType( type );
address.setLabel( QString::fromUtf8( cl->value()->asString() ) );
addressee.insertAddress( address );
}
}
-
+ addressee.makePhoneNumbersOLcompatible();
return true;
}
void VCardFormatImpl::saveAddressee( const Addressee &addressee, VCard *v, bool intern )
{
//US ContentLine cl;
//US QString value;
addTextValue( v, EntityName, addressee.name() );
addTextValue( v, EntityUID, addressee.uid() );
addTextValue( v, EntityFullName, addressee.formattedName() );
@@ -586,25 +586,24 @@ void VCardFormatImpl::addTelephoneValue( VCard *v, const PhoneNumber &p )
if( p.type() & PhoneNumber::Msg ) params.append( new Param( "TYPE", "msg" ) );
if( p.type() & PhoneNumber::Pref ) params.append( new Param( "TYPE", "pref" ) );
if( p.type() & PhoneNumber::Voice ) params.append( new Param( "TYPE", "voice" ) );
if( p.type() & PhoneNumber::Fax ) params.append( new Param( "TYPE", "fax" ) );
if( p.type() & PhoneNumber::Cell ) params.append( new Param( "TYPE", "cell" ) );
if( p.type() & PhoneNumber::Video ) params.append( new Param( "TYPE", "video" ) );
if( p.type() & PhoneNumber::Bbs ) params.append( new Param( "TYPE", "bbs" ) );
if( p.type() & PhoneNumber::Modem ) params.append( new Param( "TYPE", "modem" ) );
if( p.type() & PhoneNumber::Car ) params.append( new Param( "TYPE", "car" ) );
if( p.type() & PhoneNumber::Isdn ) params.append( new Param( "TYPE", "isdn" ) );
if( p.type() & PhoneNumber::Pcs ) params.append( new Param( "TYPE", "pcs" ) );
if( p.type() & PhoneNumber::Pager ) params.append( new Param( "TYPE", "pager" ) );
- if( p.type() & PhoneNumber::Sip ) params.append( new Param( "TYPE", "sip" ) );
cl.setParamList( params );
v->add(cl);
}
PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl )
{
PhoneNumber p;
TelValue *value = (TelValue *)cl->value();
p.setNumber( QString::fromUtf8( value->asString() ) );
int type = 0;
@@ -619,25 +618,24 @@ PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl )
else if ( tmpStr == "msg" ) type |= PhoneNumber::Msg;
else if ( tmpStr == "pref" ) type |= PhoneNumber::Pref;
else if ( tmpStr == "voice" ) type |= PhoneNumber::Voice;
else if ( tmpStr == "fax" ) type |= PhoneNumber::Fax;
else if ( tmpStr == "cell" ) type |= PhoneNumber::Cell;
else if ( tmpStr == "video" ) type |= PhoneNumber::Video;
else if ( tmpStr == "bbs" ) type |= PhoneNumber::Bbs;
else if ( tmpStr == "modem" ) type |= PhoneNumber::Modem;
else if ( tmpStr == "car" ) type |= PhoneNumber::Car;
else if ( tmpStr == "isdn" ) type |= PhoneNumber::Isdn;
else if ( tmpStr == "pcs" ) type |= PhoneNumber::Pcs;
else if ( tmpStr == "pager" ) type |= PhoneNumber::Pager;
- else if ( tmpStr == "sip" ) type |= PhoneNumber::Sip;
}
}
p.setType( type );
return p;
}
QString VCardFormatImpl::readTextValue( ContentLine *cl )
{
VCARD::Value *value = cl->value();
if ( value ) {
return QString::fromUtf8( value->asString() );