From 1de3848cab4847816081554f148139090994d9a6 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Mon, 30 Jul 2007 14:11:12 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1129 d1b88da0-ebda-0310-925b-ed51d893ca5b --- .../UIxKolabPartContactViewer.m | 6 +-- UI/MailPartViewers/UIxKolabPartEventViewer.m | 4 +- UI/MailPartViewers/UIxKolabPartTaskViewer.m | 4 +- UI/MailPartViewers/UIxKolabPartViewer.h | 9 ++-- UI/MailPartViewers/UIxKolabPartViewer.m | 8 +-- .../UIxMailPartAlternativeViewer.m | 13 +++-- UI/MailPartViewers/UIxMailPartICalAction.m | 9 ++-- UI/MailPartViewers/UIxMailPartICalViewer.m | 14 ++++-- UI/MailPartViewers/UIxMailPartImageViewer.m | 4 +- UI/MailPartViewers/UIxMailPartLinkViewer.h | 2 +- UI/MailPartViewers/UIxMailPartLinkViewer.m | 3 +- UI/MailPartViewers/UIxMailPartMixedViewer.m | 10 ++-- UI/MailPartViewers/UIxMailPartViewer.m | 49 +++++++++++-------- UI/MailPartViewers/common.h | 35 ------------- 14 files changed, 76 insertions(+), 94 deletions(-) delete mode 100644 UI/MailPartViewers/common.h diff --git a/UI/MailPartViewers/UIxKolabPartContactViewer.m b/UI/MailPartViewers/UIxKolabPartContactViewer.m index 663a9fdc..dc8f65d1 100644 --- a/UI/MailPartViewers/UIxKolabPartContactViewer.m +++ b/UI/MailPartViewers/UIxKolabPartContactViewer.m @@ -19,7 +19,9 @@ 02111-1307, USA. */ -#include "UIxKolabPartViewer.h" +#import + +#import "UIxKolabPartViewer.h" /* UIxKolabPartContactViewer @@ -30,8 +32,6 @@ @interface UIxKolabPartContactViewer : UIxKolabPartViewer @end -#include "common.h" - @implementation UIxKolabPartContactViewer - (id)addressElements { diff --git a/UI/MailPartViewers/UIxKolabPartEventViewer.m b/UI/MailPartViewers/UIxKolabPartEventViewer.m index 9745be08..30381b00 100644 --- a/UI/MailPartViewers/UIxKolabPartEventViewer.m +++ b/UI/MailPartViewers/UIxKolabPartEventViewer.m @@ -19,7 +19,7 @@ 02111-1307, USA. */ -#include "UIxKolabPartViewer.h" +#import "UIxKolabPartViewer.h" /* UIxKolabPartEventViewer @@ -30,7 +30,5 @@ @interface UIxKolabPartEventViewer : UIxKolabPartViewer @end -#include "common.h" - @implementation UIxKolabPartEventViewer @end /* UIxKolabPartEventViewer */ diff --git a/UI/MailPartViewers/UIxKolabPartTaskViewer.m b/UI/MailPartViewers/UIxKolabPartTaskViewer.m index 87a361c1..be330f9c 100644 --- a/UI/MailPartViewers/UIxKolabPartTaskViewer.m +++ b/UI/MailPartViewers/UIxKolabPartTaskViewer.m @@ -19,7 +19,7 @@ 02111-1307, USA. */ -#include "UIxKolabPartViewer.h" +#import "UIxKolabPartViewer.h" /* UIxKolabPartTaskViewer @@ -30,7 +30,5 @@ @interface UIxKolabPartTaskViewer : UIxKolabPartViewer @end -#include "common.h" - @implementation UIxKolabPartTaskViewer @end /* UIxKolabPartTaskViewer */ diff --git a/UI/MailPartViewers/UIxKolabPartViewer.h b/UI/MailPartViewers/UIxKolabPartViewer.h index a47608b6..cb9a8648 100644 --- a/UI/MailPartViewers/UIxKolabPartViewer.h +++ b/UI/MailPartViewers/UIxKolabPartViewer.h @@ -22,7 +22,7 @@ #ifndef __Mailer_UIxKolabPartViewer_H__ #define __Mailer_UIxKolabPartViewer_H__ -#include "UIxMailPartViewer.h" +#import "UIxMailPartViewer.h" /* UIxKolabPartContactViewer @@ -30,17 +30,18 @@ Superclass for viewers which show the application/x-vnd.* XML documents. */ -#include +@protocol NSObject; +@protocol DOMDocument; @interface UIxKolabPartViewer : UIxMailPartViewer { - id domDocument; + id domDocument; id item; } /* getting a DOM representation */ -- (id)domDocument; +- (id ) domDocument; @end diff --git a/UI/MailPartViewers/UIxKolabPartViewer.m b/UI/MailPartViewers/UIxKolabPartViewer.m index e5ac1cd6..4afa120e 100644 --- a/UI/MailPartViewers/UIxKolabPartViewer.m +++ b/UI/MailPartViewers/UIxKolabPartViewer.m @@ -19,9 +19,11 @@ 02111-1307, USA. */ -#include "UIxKolabPartViewer.h" -#include "common.h" -#include +#import +#import +#import + +#import "UIxKolabPartViewer.h" @implementation UIxKolabPartViewer diff --git a/UI/MailPartViewers/UIxMailPartAlternativeViewer.m b/UI/MailPartViewers/UIxMailPartAlternativeViewer.m index e7ff28aa..182894f8 100644 --- a/UI/MailPartViewers/UIxMailPartAlternativeViewer.m +++ b/UI/MailPartViewers/UIxMailPartAlternativeViewer.m @@ -19,7 +19,14 @@ 02111-1307, USA. */ -#include "UIxMailPartViewer.h" +#import + +#import + +#import + +#import "UIxMailPartViewer.h" +#import "UIxMailRenderingContext.h" /* UIxMailPartAlternativeViewer @@ -40,10 +47,6 @@ @end -#include "UIxMailRenderingContext.h" -#include -#include "common.h" - @implementation UIxMailPartAlternativeViewer - (void)dealloc { diff --git a/UI/MailPartViewers/UIxMailPartICalAction.m b/UI/MailPartViewers/UIxMailPartICalAction.m index 196549d2..7f1cf9e8 100644 --- a/UI/MailPartViewers/UIxMailPartICalAction.m +++ b/UI/MailPartViewers/UIxMailPartICalAction.m @@ -19,13 +19,16 @@ 02111-1307, USA. */ -#include +#import +#import +#import +#import +#import +#import @interface UIxMailPartICalAction : WODirectAction @end -#include "common.h" - @implementation UIxMailPartICalAction - (id)redirectToViewerWithError:(NSString *)_error { diff --git a/UI/MailPartViewers/UIxMailPartICalViewer.m b/UI/MailPartViewers/UIxMailPartICalViewer.m index 7d18eb0e..600a473a 100644 --- a/UI/MailPartViewers/UIxMailPartICalViewer.m +++ b/UI/MailPartViewers/UIxMailPartICalViewer.m @@ -25,14 +25,22 @@ Show plain/calendar mail parts. */ +#import +#import +#import + +#import + +#import +#import +#import +#import + #import #import #import #import #import -#import -#import -#import "common.h" #import "UIxMailPartICalViewer.h" diff --git a/UI/MailPartViewers/UIxMailPartImageViewer.m b/UI/MailPartViewers/UIxMailPartImageViewer.m index b975a324..cb9b82e5 100644 --- a/UI/MailPartViewers/UIxMailPartImageViewer.m +++ b/UI/MailPartViewers/UIxMailPartImageViewer.m @@ -19,7 +19,7 @@ 02111-1307, USA. */ -#include "UIxMailPartViewer.h" +#import "UIxMailPartViewer.h" @interface UIxMailPartImageViewer : UIxMailPartViewer { @@ -27,8 +27,6 @@ @end -#include "common.h" - @implementation UIxMailPartImageViewer /* URLs */ diff --git a/UI/MailPartViewers/UIxMailPartLinkViewer.h b/UI/MailPartViewers/UIxMailPartLinkViewer.h index a7422186..d8942151 100644 --- a/UI/MailPartViewers/UIxMailPartLinkViewer.h +++ b/UI/MailPartViewers/UIxMailPartLinkViewer.h @@ -22,7 +22,7 @@ #ifndef __Mailer_UIxMailPartLinkViewer_H__ #define __Mailer_UIxMailPartLinkViewer_H__ -#include "UIxMailPartViewer.h" +#import "UIxMailPartViewer.h" /* UIxMailPartLinkViewer diff --git a/UI/MailPartViewers/UIxMailPartLinkViewer.m b/UI/MailPartViewers/UIxMailPartLinkViewer.m index d9ce05d4..e030db1a 100644 --- a/UI/MailPartViewers/UIxMailPartLinkViewer.m +++ b/UI/MailPartViewers/UIxMailPartLinkViewer.m @@ -19,8 +19,7 @@ 02111-1307, USA. */ -#include "UIxMailPartLinkViewer.h" -#include "common.h" +#import "UIxMailPartLinkViewer.h" @implementation UIxMailPartLinkViewer diff --git a/UI/MailPartViewers/UIxMailPartMixedViewer.m b/UI/MailPartViewers/UIxMailPartMixedViewer.m index 191d35b7..457c5d2b 100644 --- a/UI/MailPartViewers/UIxMailPartMixedViewer.m +++ b/UI/MailPartViewers/UIxMailPartMixedViewer.m @@ -19,7 +19,11 @@ 02111-1307, USA. */ -#include "UIxMailPartViewer.h" +#import + +#import "UIxMailRenderingContext.h" + +#import "UIxMailPartViewer.h" @interface UIxMailPartMixedViewer : UIxMailPartViewer { @@ -29,10 +33,6 @@ @end -#include "UIxMailRenderingContext.h" -#include -#include "common.h" - @implementation UIxMailPartMixedViewer - (void)dealloc { diff --git a/UI/MailPartViewers/UIxMailPartViewer.m b/UI/MailPartViewers/UIxMailPartViewer.m index 9f6285ac..73ff7282 100644 --- a/UI/MailPartViewers/UIxMailPartViewer.m +++ b/UI/MailPartViewers/UIxMailPartViewer.m @@ -21,19 +21,26 @@ #import -#import "UIxMailPartViewer.h" +#import +#import +#import +#import +#import +#import +#import + +#import "UI/MailerUI/WOContext+UIxMailer.h" #import "UIxMailRenderingContext.h" #import "UIxMailSizeFormatter.h" -#import "../MailerUI/WOContext+UIxMailer.h" -#import -#import "common.h" + +#import "UIxMailPartViewer.h" @implementation UIxMailPartViewer - (void)dealloc { - [self->flatContent release]; - [self->bodyInfo release]; - [self->partPath release]; + [flatContent release]; + [bodyInfo release]; + [partPath release]; [super dealloc]; } @@ -41,7 +48,7 @@ - (void)resetPathCaches { /* this is called when -setPartPath: is called */ - [self->flatContent release]; self->flatContent = nil; + [flatContent release]; flatContent = nil; } - (void)resetBodyInfoCaches { } @@ -51,39 +58,39 @@ - (void)sleep { [self resetPathCaches]; [self resetBodyInfoCaches]; - [self->partPath release]; self->partPath = nil; - [self->bodyInfo release]; self->bodyInfo = nil; + [partPath release]; partPath = nil; + [bodyInfo release]; bodyInfo = nil; [super sleep]; } /* accessors */ - (void)setPartPath:(NSArray *)_path { - if ([_path isEqual:self->partPath]) + if ([_path isEqual:partPath]) return; - ASSIGN(self->partPath, _path); + ASSIGN(partPath, _path); [self resetPathCaches]; } - (NSArray *)partPath { - return self->partPath; + return partPath; } - (void)setBodyInfo:(id)_info { - ASSIGN(self->bodyInfo, _info); + ASSIGN(bodyInfo, _info); } - (id)bodyInfo { - return self->bodyInfo; + return bodyInfo; } - (NSData *)flatContent { - if (self->flatContent != nil) - return [self->flatContent isNotNull] ? self->flatContent : nil; + if (flatContent != nil) + return [flatContent isNotNull] ? flatContent : nil; - self->flatContent = - [[[[self context] mailRenderingContext] flatContentForPartPath: + flatContent = + [[[context mailRenderingContext] flatContentForPartPath: [self partPath]] retain]; - return self->flatContent; + return flatContent; } - (NSData *)decodedFlatContent { @@ -237,7 +244,7 @@ /* path to mail controller object */ - url = [[self clientObject] baseURLInContext:[self context]]; + url = [[self clientObject] baseURLInContext:context]; if (![url hasSuffix:@"/"]) url = [url stringByAppendingString:@"/"]; /* mail relative path to body-part */ diff --git a/UI/MailPartViewers/common.h b/UI/MailPartViewers/common.h deleted file mode 100644 index 6cda6842..00000000 --- a/UI/MailPartViewers/common.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2004 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo 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 Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#import - -#if LIB_FOUNDATION_LIBRARY -# include -#elif NeXT_Foundation_LIBRARY || COCOA_Foundation_LIBRARY -# include -# include -#endif - -#include -#include -#include - -#warning importing common.h is baaad -- 2.39.5