2007-11-01 21:22:56 +01:00
|
|
|
/* SOGoMailReply.m - this file is part of SOGo
|
|
|
|
*
|
2015-12-15 16:05:21 +01:00
|
|
|
* Copyright (C) 2007-2015 Inverse inc.
|
2007-11-01 21:22:56 +01:00
|
|
|
*
|
|
|
|
* 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>
|
2009-08-20 22:06:43 +02:00
|
|
|
#import <NGImap4/NGImap4Envelope.h>
|
2007-11-01 21:22:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
#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"];
|
|
|
|
}
|
|
|
|
|
2007-11-01 21:22:56 +01:00
|
|
|
- (NSString *) messageBody
|
|
|
|
{
|
2009-06-25 21:18:02 +02:00
|
|
|
NSString *s, *msgid;
|
|
|
|
NSRange r;
|
2007-11-25 18:26:56 +01:00
|
|
|
|
|
|
|
s = [sourceMail contentForEditing];
|
|
|
|
|
|
|
|
if (s)
|
|
|
|
{
|
2009-06-25 21:18:02 +02:00
|
|
|
if (htmlComposition)
|
2009-06-23 19:53:18 +02:00
|
|
|
{
|
2009-06-25 21:18:02 +02:00
|
|
|
msgid = [[sourceMail envelope] messageID];
|
|
|
|
r = NSMakeRange (1, [msgid length] - 2);
|
|
|
|
msgid = [msgid substringWithRange: r];
|
|
|
|
s = [NSString stringWithFormat:
|
|
|
|
@"<blockquote type=\"cite\" cite=\"%@\">%@</blockquote>",
|
|
|
|
msgid, s];
|
2009-06-23 19:53:18 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
s = [s stringByApplyingMailQuoting]; //adds "> " on each line
|
|
|
|
}
|
2007-11-25 18:26:56 +01:00
|
|
|
}
|
|
|
|
|
2009-06-23 19:53:18 +02:00
|
|
|
return s;
|
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
|
|
|
|
2013-04-08 17:05:45 +02:00
|
|
|
@implementation SOGoMailArabicReply
|
|
|
|
@end
|
|
|
|
|
2009-08-05 13:30:23 +02:00
|
|
|
@implementation SOGoMailBrazilianPortugueseReply
|
|
|
|
@end
|
|
|
|
|
2010-11-17 14:43:07 +01:00
|
|
|
@implementation SOGoMailCatalanReply
|
|
|
|
@end
|
|
|
|
|
2015-07-23 17:09:04 +02:00
|
|
|
@implementation SOGoMailChineseTaiwanReply
|
|
|
|
@end
|
2016-01-25 16:50:07 +01:00
|
|
|
|
|
|
|
@implementation SOGoMailCroatianReply
|
|
|
|
@end
|
2015-07-23 17:09:04 +02:00
|
|
|
|
2009-08-05 13:06:06 +02:00
|
|
|
@implementation SOGoMailCzechReply
|
|
|
|
@end
|
|
|
|
|
2011-12-19 18:16:23 +01:00
|
|
|
@implementation SOGoMailDanishReply
|
|
|
|
@end
|
|
|
|
|
2008-09-05 18:50:22 +02:00
|
|
|
@implementation SOGoMailDutchReply
|
2007-11-01 21:22:56 +01:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation SOGoMailEnglishReply
|
|
|
|
@end
|
|
|
|
|
2013-08-26 14:59:43 +02:00
|
|
|
@implementation SOGoMailFinnishReply
|
|
|
|
@end
|
|
|
|
|
2007-11-01 21:22:56 +01:00
|
|
|
@implementation SOGoMailFrenchReply
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation SOGoMailGermanReply
|
|
|
|
@end
|
2008-03-20 14:48:17 +01:00
|
|
|
|
2009-08-05 13:30:23 +02:00
|
|
|
@implementation SOGoMailHungarianReply
|
|
|
|
@end
|
|
|
|
|
2011-05-11 21:12:47 +02:00
|
|
|
@implementation SOGoMailIcelandicReply
|
|
|
|
@end
|
|
|
|
|
2008-03-20 14:48:17 +01:00
|
|
|
@implementation SOGoMailItalianReply
|
|
|
|
@end
|
|
|
|
|
2016-03-16 15:50:01 +01:00
|
|
|
@implementation SOGoMailLithuanianReply
|
|
|
|
@end
|
|
|
|
|
2015-11-11 15:31:54 +01:00
|
|
|
@implementation SOGoMailMacedonianReply
|
|
|
|
@end
|
|
|
|
|
2011-11-17 16:22:09 +01:00
|
|
|
@implementation SOGoMailNorwegianBokmalReply
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation SOGoMailNorwegianNynorskReply
|
|
|
|
@end
|
|
|
|
|
2015-12-15 16:05:21 +01:00
|
|
|
@implementation SOGoMailPolishReply
|
2011-11-17 16:22:09 +01:00
|
|
|
@end
|
|
|
|
|
2015-12-15 16:05:21 +01:00
|
|
|
@implementation SOGoMailPortugueseReply
|
2008-09-05 18:50:22 +02:00
|
|
|
@end
|
2009-05-23 13:12:34 +02:00
|
|
|
|
2016-06-10 15:45:49 +02:00
|
|
|
@implementation SOGoMailRussianReply
|
2011-08-17 18:05:49 +02:00
|
|
|
@end
|
|
|
|
|
2016-06-10 15:45:49 +02:00
|
|
|
@implementation SOGoMailSlovakReply
|
2010-08-03 17:13:58 +02:00
|
|
|
@end
|
|
|
|
|
2016-06-10 15:45:49 +02:00
|
|
|
@implementation SOGoMailSlovenianReply
|
2015-11-10 22:33:11 +01:00
|
|
|
@end
|
|
|
|
|
2016-06-10 15:45:49 +02:00
|
|
|
@implementation SOGoMailSpanishSpainReply
|
2009-05-23 13:12:34 +02:00
|
|
|
@end
|
2009-08-05 13:30:23 +02:00
|
|
|
|
2016-06-10 15:45:49 +02:00
|
|
|
@implementation SOGoMailSpanishArgentinaReply
|
2013-03-05 16:22:20 +01:00
|
|
|
@end
|
|
|
|
|
2016-06-10 15:45:49 +02:00
|
|
|
@implementation SOGoMailSwedishReply
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation SOGoMailTurkishTurkeyReply
|
2015-07-22 22:41:37 +02:00
|
|
|
@end
|
|
|
|
|
2010-09-13 23:37:07 +02:00
|
|
|
@implementation SOGoMailUkrainianReply
|
|
|
|
@end
|
|
|
|
|
2009-08-05 13:30:23 +02:00
|
|
|
@implementation SOGoMailWelshReply
|
|
|
|
@end
|