-rw-r--r-- | korganizer/koimportoldialog.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp index 16f2eca..0a3c2d5 100644 --- a/korganizer/koimportoldialog.cpp +++ b/korganizer/koimportoldialog.cpp | |||
@@ -434,18 +434,26 @@ void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRe | |||
434 | role = KCal::Attendee::Chair; | 434 | role = KCal::Attendee::Chair; |
435 | else if ( reqAtt.find( name ) >= 0 ) | 435 | else if ( reqAtt.find( name ) >= 0 ) |
436 | role = KCal::Attendee::ReqParticipant; | 436 | role = KCal::Attendee::ReqParticipant; |
437 | else if ( optAtt.find( name ) >= 0 ) | 437 | else if ( optAtt.find( name ) >= 0 ) |
438 | role = KCal::Attendee::OptParticipant; | 438 | role = KCal::Attendee::OptParticipant; |
439 | else | 439 | else |
440 | role = KCal::Attendee::NonParticipant; | 440 | role = KCal::Attendee::NonParticipant; |
441 | QString mail = QString::fromUcs2(pItem->GetAddress().GetBuffer()); | 441 | QString mail = QString::fromUcs2(pItem->GetAddress().GetBuffer()); |
442 | if( mail.isEmpty() && name.find("@") > 0 ) | 442 | if( mail.isEmpty() && name.find("@") > 0 ) { |
443 | mail = name; | 443 | int kl = name.find("<"); |
444 | int gr = name.find(">"); | ||
445 | if ( kl >= 0 && gr >= 0) { | ||
446 | mail = name.mid (kl+1, gr - kl -1); | ||
447 | name = name.left( kl ); | ||
448 | } | ||
449 | else | ||
450 | mail = name; | ||
451 | } | ||
444 | mail = mail.stripWhiteSpace(); | 452 | mail = mail.stripWhiteSpace(); |
445 | 453 | ||
446 | QString uid = getUidByEmail( mail ); | 454 | QString uid = getUidByEmail( mail ); |
447 | //uid = QString::fromUcs2( pItem->GetEntryID().GetBuffer()); | 455 | //uid = QString::fromUcs2( pItem->GetEntryID().GetBuffer()); |
448 | KCal::Attendee * a = new KCal::Attendee( name, mail,rsvp,stat,role,uid) ; | 456 | KCal::Attendee * a = new KCal::Attendee( name, mail,rsvp,stat,role,uid) ; |
449 | event->addAttendee( a , false ); | 457 | event->addAttendee( a , false ); |
450 | itm->Release(); | 458 | itm->Release(); |
451 | } | 459 | } |