2007-11-01 21:22:56 +01:00
|
|
|
/* SOGoMailReply.m - this file is part of SOGo
|
|
|
|
*
|
2017-12-23 11:48:31 +01:00
|
|
|
* Copyright (C) 2007-2017 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
|
|
|
|
|
2021-08-16 19:41:24 +02:00
|
|
|
@implementation SOGoMailBulgarianReply
|
|
|
|
@end
|
|
|
|
|
2010-11-17 14:43:07 +01:00
|
|
|
@implementation SOGoMailCatalanReply
|
|
|
|
@end
|
|
|
|
|
2017-09-05 18:10:46 +02:00
|
|
|
@implementation SOGoMailChineseChinaReply
|
|
|
|
@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
|
|
|
|
2017-01-27 03:40:52 +01:00
|
|
|
@implementation SOGoMailHebrewReply
|
|
|
|
@end
|
|
|
|
|
2009-08-05 13:30:23 +02:00
|
|
|
@implementation SOGoMailHungarianReply
|
|
|
|
@end
|
|
|
|
|
2019-06-14 16:47:11 +02:00
|
|
|
@implementation SOGoMailIndonesianReply
|
|
|
|
@end
|
|
|
|
|
2011-05-11 21:12:47 +02:00
|
|
|
@implementation SOGoMailIcelandicReply
|
|
|
|
@end
|
|
|
|
|
2008-03-20 14:48:17 +01:00
|
|
|
@implementation SOGoMailItalianReply
|
|
|
|
@end
|
|
|
|
|
2018-06-01 17:29:33 +02:00
|
|
|
@implementation SOGoMailJapaneseReply
|
|
|
|
@end
|
|
|
|
|
2017-05-30 22:19:44 +02:00
|
|
|
@implementation SOGoMailLatvianReply
|
|
|
|
@end
|
|
|
|
|
2016-03-14 15:08:25 +01:00
|
|
|
@implementation SOGoMailLithuanianReply
|
|
|
|
@end
|
|
|
|
|
2015-12-04 19:49:11 +01:00
|
|
|
@implementation SOGoMailMacedonianReply
|
|
|
|
@end
|
|
|
|
|
2021-08-09 17:22:22 +02:00
|
|
|
@implementation SOGoMailMontenegrinReply
|
|
|
|
@end
|
|
|
|
|
2011-11-17 16:22:09 +01:00
|
|
|
@implementation SOGoMailNorwegianBokmalReply
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation SOGoMailNorwegianNynorskReply
|
|
|
|
@end
|
|
|
|
|
2015-12-15 16:05:46 +01:00
|
|
|
@implementation SOGoMailPolishReply
|
|
|
|
@end
|
|
|
|
|
2015-12-04 19:49:11 +01:00
|
|
|
@implementation SOGoMailPortugueseReply
|
|
|
|
@end
|
|
|
|
|
2018-07-30 18:05:14 +02:00
|
|
|
@implementation SOGoMailRomanianReply
|
|
|
|
@end
|
|
|
|
|
2016-05-16 19:28:12 +02:00
|
|
|
@implementation SOGoMailRussianReply
|
2011-11-17 16:22:09 +01:00
|
|
|
@end
|
|
|
|
|
2016-09-14 18:13:00 +02:00
|
|
|
@implementation SOGoMailSerbianReply
|
|
|
|
@end
|
|
|
|
|
2020-12-18 23:40:31 +01:00
|
|
|
@implementation SOGoMailSerbianLatinReply
|
|
|
|
@end
|
|
|
|
|
2016-05-16 19:28:12 +02:00
|
|
|
@implementation SOGoMailSlovakReply
|
2008-09-05 18:50:22 +02:00
|
|
|
@end
|
2009-05-23 13:12:34 +02:00
|
|
|
|
2016-05-16 19:28:12 +02:00
|
|
|
@implementation SOGoMailSlovenianReply
|
2011-08-17 18:05:49 +02:00
|
|
|
@end
|
|
|
|
|
2016-05-16 19:28:12 +02:00
|
|
|
@implementation SOGoMailSpanishSpainReply
|
2009-05-23 13:12:34 +02:00
|
|
|
@end
|
2009-08-05 13:30:23 +02:00
|
|
|
|
2016-05-16 19:28:12 +02:00
|
|
|
@implementation SOGoMailSpanishArgentinaReply
|
2013-03-05 16:22:20 +01:00
|
|
|
@end
|
|
|
|
|
2016-05-16 19:28:12 +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
|