mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-01 03:22:43 +00:00
Monotone-Parent: ead3fff3d76689011b8b8b7eac980671612662e5
Monotone-Revision: 2448001ef69730541ee1c822cf80c131176b1ed0 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-11-09T20:10:31 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -27,10 +27,12 @@
|
||||
#import <Foundation/NSString.h>
|
||||
#import <NGExtensions/NGBase64Coding.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <NGCards/NSArray+NGCards.h>
|
||||
#import <NGCards/NGVCard.h>
|
||||
#import <NGCards/NGVCardPhoto.h>
|
||||
#import <NGCards/NSArray+NGCards.h>
|
||||
#import <NGCards/NSString+NGCards.h>
|
||||
#import <Contacts/SOGoContactGCSEntry.h>
|
||||
#import <Mailer/NSString+Mail.h>
|
||||
|
||||
#import "MAPIStoreContactsAttachment.h"
|
||||
#import "MAPIStoreContactsFolder.h"
|
||||
@@ -337,10 +339,16 @@
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
NSString *stringValue;
|
||||
NSArray *values;
|
||||
|
||||
stringValue = [[sogoObject vCard] note];
|
||||
if ([stringValue length] > 0)
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
{
|
||||
/* FIXME: this is a temporary hack: we unescape things although NGVCards
|
||||
should already have done it at this stage... */
|
||||
values = [stringValue asCardAttributeValues];
|
||||
*data = [[values objectAtIndex: 0] asUnicodeInMemCtx: memCtx];
|
||||
}
|
||||
else
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
@@ -1117,6 +1125,22 @@
|
||||
fromProperties: [attachment properties]];
|
||||
}
|
||||
|
||||
/* Note */
|
||||
value = [properties objectForKey: MAPIPropertyKey (PR_BODY_UNICODE)];
|
||||
if (!value)
|
||||
{
|
||||
value = [properties objectForKey: MAPIPropertyKey (PR_HTML)];
|
||||
if (value)
|
||||
{
|
||||
value = [[NSString alloc] initWithData: value
|
||||
encoding: NSUTF8StringEncoding];
|
||||
[value autorelease];
|
||||
value = [value htmlToText];
|
||||
}
|
||||
}
|
||||
if (value)
|
||||
[newCard setNote: value];
|
||||
|
||||
//
|
||||
// we save the new/modified card
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user