Monotone-Parent: 2cb4c559e76b3864636b0072594c02216e619485

Monotone-Revision: 6573eb6d5779706b5935161822c561cf325f7fa6

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-07-20T18:30:05
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-07-20 18:30:05 +00:00
parent 95fb350599
commit f438ad520f
4 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2011-07-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreMailMessage.m (-subject): new overridable
accessor common to certain properties.
* OpenChange/MAPIStoreObject.m: moved "-getEmptyString:inMemCtx:",
"-getLongZero:inMemCtx:", "-getYes:inMemCtx:", "-getNo:inMemCtx:"
into NSObject+MAPIStore.m

View File

@ -214,6 +214,11 @@ e)
[self logWithFormat: @"ignored scheduling message"];
}
- (NSString *) subject
{
return [[sogoObject headers] objectForKey: @"subject"];
}
- (NSCalendarDate *) creationTime
{
return [newProperties objectForKey: MAPIPropertyKey (PR_CREATION_TIME)];

View File

@ -37,6 +37,8 @@
NSString *bodyCharset;
}
- (NSString *) subject;
@end
#endif /* MAPISTOREMAILMESSAGE_H */

View File

@ -144,12 +144,17 @@ static Class NSExceptionK, MAPIStoreSentItemsFolderK, MAPIStoreDraftsFolderK;
return MAPISTORE_SUCCESS;
}
- (NSString *) subject
{
return [sogoObject decodedSubject];
}
- (int) getPrSubject: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
NSString *stringValue;
stringValue = [sogoObject decodedSubject];
stringValue = [self subject];
if (!stringValue)
stringValue = @"";
*data = [stringValue asUnicodeInMemCtx: memCtx];
@ -164,7 +169,7 @@ static Class NSExceptionK, MAPIStoreSentItemsFolderK, MAPIStoreDraftsFolderK;
NSUInteger colIdx;
NSString *stringValue;
subject = [sogoObject decodedSubject];
subject = [self subject];
colIdx = [subject rangeOfString: @":"].location;
if (colIdx != NSNotFound && colIdx < 4)
stringValue = [NSString stringWithFormat: @"%@: ",
@ -183,7 +188,7 @@ static Class NSExceptionK, MAPIStoreSentItemsFolderK, MAPIStoreDraftsFolderK;
NSUInteger colIdx;
NSString *stringValue;
subject = [sogoObject decodedSubject];
subject = [self subject];
colIdx = [subject rangeOfString: @":"].location;
if (colIdx != NSNotFound && colIdx < 4)
stringValue = [[subject substringFromIndex: colIdx + 1]