-rw-r--r-- | kabc/vcardformatimpl.cpp | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp index f90f813..3fcaf94 100644 --- a/kabc/vcardformatimpl.cpp +++ b/kabc/vcardformatimpl.cpp | |||
@@ -524,15 +524,17 @@ int VCardFormatImpl::readAddressParam( ContentLine *cl ) | |||
524 | int type = 0; | 524 | int type = 0; |
525 | ParamList params = cl->paramList(); | 525 | ParamList params = cl->paramList(); |
526 | ParamListIterator it( params ); | 526 | ParamListIterator it( params ); |
527 | QCString tmpStr; | ||
527 | for( ; it.current(); ++it ) { | 528 | for( ; it.current(); ++it ) { |
528 | if ( (*it)->name() == "TYPE" ) { | 529 | if ( (*it)->name().upper() == "TYPE" ) { |
529 | if ( (*it)->value() == "dom" ) type |= Address::Dom; | 530 | tmpStr = (*it)->value().lower(); |
530 | else if ( (*it)->value() == "intl" ) type |= Address::Intl; | 531 | if ( tmpStr == "dom" ) type |= Address::Dom; |
531 | else if ( (*it)->value() == "parcel" ) type |= Address::Parcel; | 532 | else if ( tmpStr == "intl" ) type |= Address::Intl; |
532 | else if ( (*it)->value() == "postal" ) type |= Address::Postal; | 533 | else if ( tmpStr == "parcel" ) type |= Address::Parcel; |
533 | else if ( (*it)->value() == "work" ) type |= Address::Work; | 534 | else if ( tmpStr == "postal" ) type |= Address::Postal; |
534 | else if ( (*it)->value() == "home" ) type |= Address::Home; | 535 | else if ( tmpStr == "work" ) type |= Address::Work; |
535 | else if ( (*it)->value() == "pref" ) type |= Address::Pref; | 536 | else if ( tmpStr == "home" ) type |= Address::Home; |
537 | else if ( tmpStr == "pref" ) type |= Address::Pref; | ||
536 | } | 538 | } |
537 | } | 539 | } |
538 | return type; | 540 | return type; |
@@ -601,22 +603,24 @@ PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl ) | |||
601 | int type = 0; | 603 | int type = 0; |
602 | ParamList params = cl->paramList(); | 604 | ParamList params = cl->paramList(); |
603 | ParamListIterator it( params ); | 605 | ParamListIterator it( params ); |
606 | QCString tmpStr; | ||
604 | for( ; it.current(); ++it ) { | 607 | for( ; it.current(); ++it ) { |
605 | if ( (*it)->name() == "TYPE" ) { | 608 | if ( (*it)->name() == "TYPE" ) { |
606 | if ( (*it)->value() == "home" ) type |= PhoneNumber::Home; | 609 | tmpStr = (*it)->value().lower(); |
607 | else if ( (*it)->value() == "work" ) type |= PhoneNumber::Work; | 610 | if ( tmpStr == "home" ) type |= PhoneNumber::Home; |
608 | else if ( (*it)->value() == "msg" ) type |= PhoneNumber::Msg; | 611 | else if ( tmpStr == "work" ) type |= PhoneNumber::Work; |
609 | else if ( (*it)->value() == "pref" ) type |= PhoneNumber::Pref; | 612 | else if ( tmpStr == "msg" ) type |= PhoneNumber::Msg; |
610 | else if ( (*it)->value() == "voice" ) type |= PhoneNumber::Voice; | 613 | else if ( tmpStr == "pref" ) type |= PhoneNumber::Pref; |
611 | else if ( (*it)->value() == "fax" ) type |= PhoneNumber::Fax; | 614 | else if ( tmpStr == "voice" ) type |= PhoneNumber::Voice; |
612 | else if ( (*it)->value() == "cell" ) type |= PhoneNumber::Cell; | 615 | else if ( tmpStr == "fax" ) type |= PhoneNumber::Fax; |
613 | else if ( (*it)->value() == "video" ) type |= PhoneNumber::Video; | 616 | else if ( tmpStr == "cell" ) type |= PhoneNumber::Cell; |
614 | else if ( (*it)->value() == "bbs" ) type |= PhoneNumber::Bbs; | 617 | else if ( tmpStr == "video" ) type |= PhoneNumber::Video; |
615 | else if ( (*it)->value() == "modem" ) type |= PhoneNumber::Modem; | 618 | else if ( tmpStr == "bbs" ) type |= PhoneNumber::Bbs; |
616 | else if ( (*it)->value() == "car" ) type |= PhoneNumber::Car; | 619 | else if ( tmpStr == "modem" ) type |= PhoneNumber::Modem; |
617 | else if ( (*it)->value() == "isdn" ) type |= PhoneNumber::Isdn; | 620 | else if ( tmpStr == "car" ) type |= PhoneNumber::Car; |
618 | else if ( (*it)->value() == "pcs" ) type |= PhoneNumber::Pcs; | 621 | else if ( tmpStr == "isdn" ) type |= PhoneNumber::Isdn; |
619 | else if ( (*it)->value() == "pager" ) type |= PhoneNumber::Pager; | 622 | else if ( tmpStr == "pcs" ) type |= PhoneNumber::Pcs; |
623 | else if ( tmpStr == "pager" ) type |= PhoneNumber::Pager; | ||
620 | } | 624 | } |
621 | } | 625 | } |
622 | p.setType( type ); | 626 | p.setType( type ); |