summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-15 15:06:44 (UTC)
committer zautrix <zautrix>2004-09-15 15:06:44 (UTC)
commitd37aeeb9aa023d52b364c971fa4aabd0c8f339b9 (patch) (unidiff)
tree6d818d2c6dae0921b793f09e2ed569cbe7dd7d09
parent12091abdaa7e60e408fc248e286f37e12cb10a23 (diff)
downloadkdepimpi-d37aeeb9aa023d52b364c971fa4aabd0c8f339b9.zip
kdepimpi-d37aeeb9aa023d52b364c971fa4aabd0c8f339b9.tar.gz
kdepimpi-d37aeeb9aa023d52b364c971fa4aabd0c8f339b9.tar.bz2
KAPi OLE import changes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp2
-rw-r--r--kaddressbook/kaimportoldialog.cpp60
2 files changed, 59 insertions, 3 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 013e243..f21507a 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1702,25 +1702,25 @@ void KABCore::initActions()
1702 "set_personal" ); 1702 "set_personal" );
1703 1703
1704 1704
1705 1705
1706 1706
1707 mActionCategories = new KAction( i18n( "Set Categories" ), 0, this, 1707 mActionCategories = new KAction( i18n( "Set Categories" ), 0, this,
1708 SLOT( setCategories() ), actionCollection(), 1708 SLOT( setCategories() ), actionCollection(),
1709 "edit_set_categories" ); 1709 "edit_set_categories" );
1710 1710
1711 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, 1711 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
1712 SLOT( removeVoice() ), actionCollection(), 1712 SLOT( removeVoice() ), actionCollection(),
1713 "remove_voice" ); 1713 "remove_voice" );
1714 mActionImportOL = new KAction( i18n( "Import from OL..." ), 0, this, 1714 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this,
1715 SLOT( importFromOL() ), actionCollection(), 1715 SLOT( importFromOL() ), actionCollection(),
1716 "import_OL" ); 1716 "import_OL" );
1717#ifdef KAB_EMBEDDED 1717#ifdef KAB_EMBEDDED
1718 mActionLicence = new KAction( i18n( "Licence" ), 0, 1718 mActionLicence = new KAction( i18n( "Licence" ), 0,
1719 this, SLOT( showLicence() ), actionCollection(), 1719 this, SLOT( showLicence() ), actionCollection(),
1720 "licence_about_data" ); 1720 "licence_about_data" );
1721 mActionFaq = new KAction( i18n( "Faq" ), 0, 1721 mActionFaq = new KAction( i18n( "Faq" ), 0,
1722 this, SLOT( faq() ), actionCollection(), 1722 this, SLOT( faq() ), actionCollection(),
1723 "faq_about_data" ); 1723 "faq_about_data" );
1724 1724
1725 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, 1725 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
1726 this, SLOT( createAboutData() ), actionCollection(), 1726 this, SLOT( createAboutData() ), actionCollection(),
diff --git a/kaddressbook/kaimportoldialog.cpp b/kaddressbook/kaimportoldialog.cpp
index ef949e7..10e3c76 100644
--- a/kaddressbook/kaimportoldialog.cpp
+++ b/kaddressbook/kaimportoldialog.cpp
@@ -259,25 +259,25 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem )
259 addressee.setNickName( QString::fromUcs2(aItem->GetNickName().GetBuffer()) ); 259 addressee.setNickName( QString::fromUcs2(aItem->GetNickName().GetBuffer()) );
260 QDateTime dtb = mDdate2Qdtr(aItem->GetBirthday()); 260 QDateTime dtb = mDdate2Qdtr(aItem->GetBirthday());
261 if ( dtb.isValid() ) 261 if ( dtb.isValid() )
262 addressee.setBirthday( mDdate2Qdtr(aItem->GetBirthday())); 262 addressee.setBirthday( mDdate2Qdtr(aItem->GetBirthday()));
263 263
264 //QString::fromUcs2(aItem->.GetBuffer()) 264 //QString::fromUcs2(aItem->.GetBuffer())
265 //addressee.setMailer( const QString &mailer ); 265 //addressee.setMailer( const QString &mailer );
266 //addressee.setTimeZone( const TimeZone &timeZone ); 266 //addressee.setTimeZone( const TimeZone &timeZone );
267 //addressee.setGeo( const Geo &geo ); 267 //addressee.setGeo( const Geo &geo );
268 //addressee.setTitle( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );// titel is the prefix 268 //addressee.setTitle( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );// titel is the prefix
269 addressee.setRole( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) ); 269 addressee.setRole( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );
270 addressee.setOrganization( QString::fromUcs2(aItem->GetCompanyName().GetBuffer()) ); 270 addressee.setOrganization( QString::fromUcs2(aItem->GetCompanyName().GetBuffer()) );
271 addressee.setNote( QString::fromUcs2(aItem->GetBody().GetBuffer()) ); 271 QString notesStr = QString::fromUcs2(aItem->GetBody().GetBuffer());
272 272
273 addressee.setProductId( QString::fromUcs2(aItem->GetCustomerID().GetBuffer()) ); 273 addressee.setProductId( QString::fromUcs2(aItem->GetCustomerID().GetBuffer()) );
274 //addressee.setRevision( const QDateTime &revision ); 274 //addressee.setRevision( const QDateTime &revision );
275 // addressee.setSortString( const QString &sortString ); 275 // addressee.setSortString( const QString &sortString );
276 addressee.setUrl( QString::fromUcs2(aItem->GetWebPage().GetBuffer()) ); 276 addressee.setUrl( QString::fromUcs2(aItem->GetWebPage().GetBuffer()) );
277 277
278 QString tempS; 278 QString tempS;
279 tempS = QString::fromUcs2(aItem->GetNetMeetingAlias().GetBuffer())+" AT SERVER: " +QString::fromUcs2(aItem->GetNetMeetingServer().GetBuffer()); 279 tempS = QString::fromUcs2(aItem->GetNetMeetingAlias().GetBuffer())+" AT SERVER: " +QString::fromUcs2(aItem->GetNetMeetingServer().GetBuffer());
280 if ( tempS.length() > 12 ) 280 if ( tempS.length() > 12 )
281 addressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", tempS ); 281 addressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", tempS );
282 tempS = QString::fromUcs2(aItem->GetSpouse().GetBuffer()); 282 tempS = QString::fromUcs2(aItem->GetSpouse().GetBuffer());
283 if ( !tempS.isEmpty() ) 283 if ( !tempS.isEmpty() )
@@ -594,25 +594,81 @@ void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem )
594 if ( !tempS.isEmpty() ) 594 if ( !tempS.isEmpty() )
595 addressee.insertCustom( "KADDRESSBOOK", "X-FreeBusyUrl", tempS ); 595 addressee.insertCustom( "KADDRESSBOOK", "X-FreeBusyUrl", tempS );
596 tempS = QString::fromUcs2(aItem->GetChildren().GetBuffer()); 596 tempS = QString::fromUcs2(aItem->GetChildren().GetBuffer());
597 if ( !tempS.isEmpty() ) 597 if ( !tempS.isEmpty() )
598 addressee.insertCustom( "KADDRESSBOOK", "X-Children", tempS ); 598 addressee.insertCustom( "KADDRESSBOOK", "X-Children", tempS );
599 int gen = aItem->GetGender(); 599 int gen = aItem->GetGender();
600 if ( gen != 0 ) { // 0 undef - 1 female - 2 male 600 if ( gen != 0 ) { // 0 undef - 1 female - 2 male
601 if ( gen == 1 ) 601 if ( gen == 1 )
602 addressee.insertCustom( "KADDRESSBOOK", "X-Gender", "female" ); 602 addressee.insertCustom( "KADDRESSBOOK", "X-Gender", "female" );
603 else 603 else
604 addressee.insertCustom( "KADDRESSBOOK", "X-Gender", "male" ); 604 addressee.insertCustom( "KADDRESSBOOK", "X-Gender", "male" );
605 } 605 }
606 606 QString additionalInfo;
607 QString tempAdd;
608 tempAdd = QString::fromUcs2(aItem->GetLanguage().GetBuffer());
609 if ( ! tempAdd.isEmpty() ) {
610 additionalInfo += i18n("\nLanguage: ");
611 additionalInfo += tempAdd;
612 }
613 tempAdd = QString::fromUcs2(aItem->GetHobby().GetBuffer());
614 if ( ! tempAdd.isEmpty() ) {
615 additionalInfo += i18n("\nHobby: ");
616 additionalInfo += tempAdd;;
617 }
618 tempAdd =QString::fromUcs2(aItem->GetPersonalHomePage().GetBuffer());
619 if ( ! tempAdd.isEmpty() ) {
620 additionalInfo += i18n("\nHomepage: ");
621 additionalInfo += tempAdd;;
622 }
623 tempAdd = QString::fromUcs2(aItem->GetBillingInformation().GetBuffer());
624 if ( ! tempAdd.isEmpty() ) {
625 additionalInfo += i18n("\nBilling information: ");
626 additionalInfo += tempAdd;;
627 }
628 tempAdd = QString::fromUcs2(aItem->GetCustomerID().GetBuffer());
629 if ( ! tempAdd.isEmpty() ) {
630 additionalInfo += i18n("\nCustomer ID: ");
631 additionalInfo += tempAdd;;
632 }
633 tempAdd = QString::fromUcs2(aItem->GetUser1().GetBuffer());
634 if ( ! tempAdd.isEmpty() ) {
635 additionalInfo += i18n("\nUser1: ");
636 additionalInfo += tempAdd;;
637 }
638 tempAdd = QString::fromUcs2(aItem->GetUser2().GetBuffer());
639 if ( ! tempAdd.isEmpty() ) {
640 additionalInfo += i18n("\nUser2: ");
641 additionalInfo += tempAdd;;
642 }
643 tempAdd = QString::fromUcs2(aItem->GetUser3().GetBuffer());
644 if ( ! tempAdd.isEmpty() ) {
645 additionalInfo += i18n("\nUser3: ");
646 additionalInfo += tempAdd;;
647 }
648 tempAdd = QString::fromUcs2(aItem->GetUser4().GetBuffer());
649 if ( ! tempAdd.isEmpty() ) {
650 additionalInfo += i18n("\nUser4: ");
651 additionalInfo += tempAdd;;
652 }
653 if (!additionalInfo.isEmpty() ) {
654 tempAdd = notesStr;
655 notesStr = "+++++++++++++++++++++++++++\n";
656 notesStr += i18n("Additonal fields created\nby KA/Pi Outlook import:");
657 notesStr += additionalInfo;
658 notesStr += i18n("\nEnd additonal fields created\nby KA/Pi Outlook import!\n");
659 notesStr += "+++++++++++++++++++++++++++\n";
660 notesStr += tempAdd;
661 }
662 addressee.setNote( notesStr );
607#if 0 663#if 0
608 // pending 664 // pending
609 - IM address: no clue where to get info about the helper ID 665 - IM address: no clue where to get info about the helper ID
610 -custom fields: difficult to implement - not implemented 666 -custom fields: difficult to implement - not implemented
611 -keys: makes no sense 667 -keys: makes no sense
612#endif 668#endif
613 669
614 if ( addAddressee( addressee )) 670 if ( addAddressee( addressee ))
615 ++importedItems; 671 ++importedItems;
616} 672}
617void KAImportOLdialog::slotCancel() 673void KAImportOLdialog::slotCancel()
618{ 674{