2007-11-01 21:22:56 +01:00
|
|
|
/* SOGoMailReply.m - this file is part of SOGo
|
|
|
|
*
|
2009-04-01 15:49:24 +02:00
|
|
|
* Copyright (C) 2007-2009 Inverse inc.
|
2007-11-01 21:22:56 +01:00
|
|
|
*
|
|
|
|
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
|
|
*
|
|
|
|
* This file is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This file is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
2007-11-06 22:24:13 +01:00
|
|
|
#import <NGExtensions/NSString+misc.h>
|
2007-11-01 21:22:56 +01:00
|
|
|
|
|
|
|
#import <SoObjects/SOGo/SOGoDateFormatter.h>
|
|
|
|
#import <SoObjects/SOGo/SOGoUser.h>
|
|
|
|
|
|
|
|
#import "SOGoMailObject+Draft.h"
|
|
|
|
#import "SOGoMailReply.h"
|
|
|
|
|
|
|
|
@implementation SOGoMailReply
|
|
|
|
|
|
|
|
- (id) init
|
|
|
|
{
|
|
|
|
if ((self = [super init]))
|
|
|
|
{
|
2008-09-05 18:50:22 +02:00
|
|
|
outlookMode = NO;
|
2007-11-01 21:22:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2008-09-05 18:50:22 +02:00
|
|
|
- (void) setOutlookMode: (BOOL) newOutlookMode
|
2007-11-01 21:22:56 +01:00
|
|
|
{
|
2008-09-05 18:50:22 +02:00
|
|
|
outlookMode = newOutlookMode;
|
2007-11-01 21:22:56 +01:00
|
|
|
}
|
|
|
|
|
2008-09-05 18:50:22 +02:00
|
|
|
- (BOOL) outlookMode
|
2007-11-01 21:22:56 +01:00
|
|
|
{
|
2008-09-05 18:50:22 +02:00
|
|
|
return outlookMode;
|
2007-11-01 21:22:56 +01:00
|
|
|
}
|
|
|
|
|
2008-09-28 21:49:17 +02:00
|
|
|
- (void) setReplyPlacement: (NSString *) newPlacement
|
|
|
|
{
|
|
|
|
replyPlacement = newPlacement;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (BOOL) replyPlacementOnTop
|
|
|
|
{
|
|
|
|
return [replyPlacement isEqual: @"above"];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) setSignaturePlacement: (NSString *) newPlacement
|
|
|
|
{
|
|
|
|
signaturePlacement = newPlacement;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (BOOL) signaturePlacementOnTop
|
|
|
|
{
|
|
|
|
return [signaturePlacement isEqual: @"above"];
|
|
|
|
}
|
|
|
|
|
2007-11-01 21:22:56 +01:00
|
|
|
- (NSString *) messageBody
|
|
|
|
{
|
2007-11-25 18:26:56 +01:00
|
|
|
NSString *s;
|
|
|
|
|
|
|
|
s = [sourceMail contentForEditing];
|
|
|
|
|
|
|
|
if (s)
|
|
|
|
{
|
|
|
|
NSRange r;
|
|
|
|
|
|
|
|
r = [s rangeOfString: @"\n-- \n" options: NSBackwardsSearch];
|
|
|
|
|
|
|
|
if (r.length)
|
|
|
|
s = [s substringToIndex: r.location];
|
|
|
|
}
|
|
|
|
|
|
|
|
return [s stringByApplyingMailQuoting];
|
2007-11-01 21:22:56 +01:00
|
|
|
}
|
|
|
|
|
2008-09-05 18:50:22 +02:00
|
|
|
@end
|
2007-11-19 23:44:12 +01:00
|
|
|
|
2008-09-05 18:50:22 +02:00
|
|
|
@implementation SOGoMailDutchReply
|
2007-11-01 21:22:56 +01:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation SOGoMailEnglishReply
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation SOGoMailFrenchReply
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation SOGoMailGermanReply
|
|
|
|
@end
|
2008-03-20 14:48:17 +01:00
|
|
|
|
|
|
|
@implementation SOGoMailItalianReply
|
|
|
|
@end
|
|
|
|
|
2008-09-05 18:50:22 +02:00
|
|
|
@implementation SOGoMailSpanishReply
|
|
|
|
@end
|
2009-05-23 13:12:34 +02:00
|
|
|
|
|
|
|
@implementation SOGoMailRussianReply
|
|
|
|
@end
|