author | zautrix <zautrix> | 2004-09-15 15:08:01 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-15 15:08:01 (UTC) |
commit | 93d16eea6d3324611d6150e7ee3e7f7f36320eff (patch) (side-by-side diff) | |
tree | f0437e15f455ddfe1bd4ed8908fdaee67c26d38c | |
parent | d37aeeb9aa023d52b364c971fa4aabd0c8f339b9 (diff) | |
download | kdepimpi-93d16eea6d3324611d6150e7ee3e7f7f36320eff.zip kdepimpi-93d16eea6d3324611d6150e7ee3e7f7f36320eff.tar.gz kdepimpi-93d16eea6d3324611d6150e7ee3e7f7f36320eff.tar.bz2 |
KOPi OLE import changes
-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 @@ -418,50 +418,58 @@ void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRe break; case 2: //tentative stat = Attendee::Tentative ; break; case 3: //accepted stat = Attendee::Accepted; break; case 4: //declined stat =Attendee::Declined ; break; default: stat = Attendee::NeedsAction ; } KCal::Attendee::Role role; if ( event->organizer() == name ) role = KCal::Attendee::Chair; else if ( reqAtt.find( name ) >= 0 ) role = KCal::Attendee::ReqParticipant; else if ( optAtt.find( name ) >= 0 ) role = KCal::Attendee::OptParticipant; else role = KCal::Attendee::NonParticipant; QString mail = QString::fromUcs2(pItem->GetAddress().GetBuffer()); - if( mail.isEmpty() && name.find("@") > 0 ) - mail = name; + if( mail.isEmpty() && name.find("@") > 0 ) { + int kl = name.find("<"); + int gr = name.find(">"); + if ( kl >= 0 && gr >= 0) { + mail = name.mid (kl+1, gr - kl -1); + name = name.left( kl ); + } + else + mail = name; + } mail = mail.stripWhiteSpace(); QString uid = getUidByEmail( mail ); //uid = QString::fromUcs2( pItem->GetEntryID().GetBuffer()); KCal::Attendee * a = new KCal::Attendee( name, mail,rsvp,stat,role,uid) ; event->addAttendee( a , false ); itm->Release(); } if ( !mCalendar->addEventNoDup( event )) delete event; else { // QString mes = i18n("Importing %1.\n date: %2 date: %3").arg( event->summary()).arg( event->dtStart().toString()).arg( event->dtEnd().toString()); //KMessageBox::information(this,mes); ++importedItems; } } void KOImportOLdialog::slotCancel() { reject(); } QString KOImportOLdialog::getUidByEmail( QString email ) |