Monotone-Parent: 2448001ef69730541ee1c822cf80c131176b1ed0
Monotone-Revision: e5a4a8243c282c12538ab38c9b5c23722be35e99 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-11-09T20:47:08 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
1e9a61705c
commit
5be374313f
|
@ -1,5 +1,12 @@
|
|||
2011-11-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreCalendarMessage.m (-save): set the DESCRIPTION
|
||||
field to the value of PR_BODY_UNICODE or, a textual version of
|
||||
PR_HTML. COMMENT would be nice later.
|
||||
|
||||
* OpenChange/MAPIStoreAppointmentWrapper.m (-getPrBody:inMemCtx:):
|
||||
make use of -[NSString asCardAttributeValues].
|
||||
|
||||
* OpenChange/MAPIStoreContactsMessage.m (-save): set the NOTE
|
||||
field to the value of PR_BODY_UNICODE or, a textual version of
|
||||
PR_HTML.
|
||||
|
|
|
@ -92,8 +92,6 @@ extern NSTimeZone *utcTZ;
|
|||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrStartDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidAppointmentStateFlags: (void **) data
|
||||
|
@ -129,6 +127,8 @@ extern NSTimeZone *utcTZ;
|
|||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrImportance: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidIsRecurring: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidRecurring: (void **) data
|
||||
|
|
|
@ -629,20 +629,6 @@ static NSCharacterSet *hexCharacterSet = nil;
|
|||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPrBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
stringValue = [event comment];
|
||||
if (!stringValue)
|
||||
stringValue = @"";
|
||||
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPrStartDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
@ -1035,6 +1021,28 @@ static NSCharacterSet *hexCharacterSet = nil;
|
|||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPrBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
NSString *stringValue;
|
||||
NSArray *values;
|
||||
|
||||
/* FIXME: there is a confusion in NGCards around "comment" and "description" */
|
||||
stringValue = [event comment];
|
||||
if ([stringValue length] > 0)
|
||||
{
|
||||
/* 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;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidLidIsRecurring: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#import <Appointments/SOGoAppointmentFolder.h>
|
||||
#import <Appointments/SOGoAppointmentObject.h>
|
||||
#import <Appointments/iCalEntityObject+SOGo.h>
|
||||
#import <Mailer/NSString+Mail.h>
|
||||
|
||||
#import "MAPIStoreAppointmentWrapper.h"
|
||||
#import "MAPIStoreCalendarAttachment.h"
|
||||
|
@ -241,6 +242,12 @@
|
|||
return [[self appointmentWrapper] getPrImportance: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPrBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [[self appointmentWrapper] getPrBody: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidIsRecurring: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
@ -798,6 +805,22 @@
|
|||
}
|
||||
}
|
||||
|
||||
/* Comment */
|
||||
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)
|
||||
[newEvent setComment: value];
|
||||
|
||||
/* recurrence */
|
||||
value = [properties
|
||||
objectForKey: MAPIPropertyKey (PidLidAppointmentRecur)];
|
||||
|
|
Loading…
Reference in a new issue