summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kaimportoldialog.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/kaimportoldialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaimportoldialog.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/kaimportoldialog.cpp b/kaddressbook/kaimportoldialog.cpp
index 848d8af..7bb8bd8 100644
--- a/kaddressbook/kaimportoldialog.cpp
+++ b/kaddressbook/kaimportoldialog.cpp
@@ -252,128 +252,129 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem )
//GetLastModificationTime()
//addressee.setName( const QString &name );
//addressee.setFormattedName( const QString &formattedName );
addressee.setFamilyName( QString::fromUcs2(aItem->GetLastName().GetBuffer()) );
addressee.setGivenName( QString::fromUcs2(aItem->GetFirstName().GetBuffer()) );
addressee.setAdditionalName( QString::fromUcs2(aItem->GetMiddleName().GetBuffer()) );
addressee.setPrefix(QString::fromUcs2(aItem->GetTitle().GetBuffer()) );
addressee.setSuffix( QString::fromUcs2(aItem->GetSuffix().GetBuffer()) );
addressee.setNickName( QString::fromUcs2(aItem->GetNickName().GetBuffer()) );
QDateTime dtb = mDdate2Qdtr(aItem->GetBirthday());
if ( dtb.isValid() )
addressee.setBirthday( mDdate2Qdtr(aItem->GetBirthday()));
//QString::fromUcs2(aItem->.GetBuffer())
//addressee.setMailer( const QString &mailer );
//addressee.setTimeZone( const TimeZone &timeZone );
//addressee.setGeo( const Geo &geo );
//addressee.setTitle( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );// titel is the prefix
addressee.setRole( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );
addressee.setOrganization( QString::fromUcs2(aItem->GetCompanyName().GetBuffer()).replace( QRegExp("\\r"), "") );
QString notesStr = QString::fromUcs2(aItem->GetBody().GetBuffer());
notesStr.replace( QRegExp("\\r"), "");
addressee.setProductId( QString::fromUcs2(aItem->GetCustomerID().GetBuffer()) );
//addressee.setRevision( const QDateTime &revision );
// addressee.setSortString( const QString &sortString );
addressee.setUrl( QString::fromUcs2(aItem->GetWebPage().GetBuffer()) );
QString tempS;
tempS = QString::fromUcs2(aItem->GetNetMeetingAlias().GetBuffer())+" AT SERVER: " +QString::fromUcs2(aItem->GetNetMeetingServer().GetBuffer());
if ( tempS.length() > 12 )
addressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", tempS );
tempS = QString::fromUcs2(aItem->GetSpouse().GetBuffer());
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", tempS );
tempS = QString::fromUcs2(aItem->GetManagerName().GetBuffer());
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", tempS );
tempS = QString::fromUcs2(aItem->GetAssistantName().GetBuffer());
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", tempS );
tempS = QString::fromUcs2(aItem->GetDepartment().GetBuffer());
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-Department", tempS );
tempS = QString::fromUcs2(aItem->GetOfficeLocation().GetBuffer()).replace( QRegExp("\\r"), "");
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-Office",tempS );
tempS = QString::fromUcs2(aItem->GetProfession().GetBuffer());
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-Profession", tempS );
dtb = mDdate2Qdtr(aItem->GetAnniversary());
if (dtb.isValid() ) {
QString dt = KGlobal::locale()->formatDate( dtb.date() , true, KLocale::ISODate);
addressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt);
}
int sec = aItem->GetSensitivity() ;
if ( sec > 1 )// mapping pers -> private
--sec;
addressee.setSecrecy( sec );
//addressee.setLogo( const Picture &logo );
//addressee.setPhoto( const Picture &photo );
//addressee.setSound( const Sound &sound );
//addressee.setAgent( const Agent &agent );
QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()).replace( QRegExp("\\r"), "");
+ cat = cat.replace( QRegExp("; "), ";");
addressee.setCategories( QStringList::split( ";", cat ));
QString phoneS;
phoneS = QString::fromUcs2( aItem->GetAssistantTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Voice ) );
phoneS = QString::fromUcs2( aItem->GetBusinessTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work ) );
phoneS = QString::fromUcs2( aItem->GetBusiness2TelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work ) );
phoneS = QString::fromUcs2( aItem->GetBusinessFaxNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Fax ) );
phoneS = QString::fromUcs2( aItem->GetCarTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Car ) );
phoneS = QString::fromUcs2( aItem->GetHomeTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home ) );
phoneS = QString::fromUcs2( aItem->GetHome2TelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home ) );
phoneS = QString::fromUcs2( aItem->GetHomeFaxNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home + KABC::PhoneNumber::Fax ) );
phoneS = QString::fromUcs2( aItem->GetISDNNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Isdn ) );
phoneS = QString::fromUcs2( aItem->GetMobileTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Cell ) );
phoneS = QString::fromUcs2( aItem->GetOtherFaxNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Fax ) );
phoneS = QString::fromUcs2( aItem->GetOtherTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Voice ) );
phoneS = QString::fromUcs2( aItem->GetPagerNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Pager ) );
phoneS = QString::fromUcs2( aItem->GetPrimaryTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Pref ) );
phoneS = QString::fromUcs2( aItem->GetTTYTDDTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Modem ) );
phoneS = QString::fromUcs2( aItem->GetTelexNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Fax + KABC::PhoneNumber::Bbs ) );
phoneS = QString::fromUcs2( aItem->GetCompanyMainTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Pref ) );
phoneS = QString::fromUcs2( aItem->GetRadioTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Video ) );
phoneS = QString::fromUcs2( aItem->GetCallbackTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Voice + KABC::PhoneNumber::Pref ) );
bool preferred = true;
phoneS = QString::fromUcs2( aItem->GetEmail1Address().GetBuffer());