Monotone-Parent: 2045ada3c4deb0418109ebabb66ee2bc784546fd

Monotone-Revision: 40f77d0f9e67b4e3fd56c1a7eb0b966cabaca41f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-08-21T02:34:23
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2008-08-21 02:34:23 +00:00
parent dd381b906b
commit e9c35d8950
4 changed files with 0 additions and 136 deletions

View File

@ -13,26 +13,10 @@
{ name = CommonUIProduct; },
{ name = UIxComponent; },
{ name = UIxPageFrame; },
{ name = UIxWinClose; },
{ name = UIxAppNavView; },
{ name = "UIxElemBuilder"; },
{ name = "UIxTabView"; },
{ name = "UIxTabItem"; },
);
WOComponents = (
{ name = UIxPageFrame; },
{ name = UIxWinClose; },
{ name = UIxAppNavView; },
);
WOxElemBuilder = (
{ name = "UIxElemBuilder"; },
);
WODynamicElements = (
{ name = "UIxTabView"; },
{ name = "UIxTabItem"; },
);
};
}

View File

@ -17,7 +17,6 @@ libSOGoUI_HEADER_FILES += \
UIxJSClose.h \
UIxComponent.h \
SOGoAptFormatter.h \
SOGoJSStringFormatter.h \
WOContext+UIx.h \
libSOGoUI_OBJC_FILES += \
@ -25,7 +24,6 @@ libSOGoUI_OBJC_FILES += \
UIxJSClose.m \
UIxComponent.m \
SOGoAptFormatter.m \
SOGoJSStringFormatter.m \
WOContext+UIx.m \
SOGoACLAdvisory.m \
SOGoFolderAdvisory.m

View File

@ -1,43 +0,0 @@
/*
Copyright (C) 2000-2004 SKYRIX Software AG
This file is part of OGo
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.
*/
// $Id: SOGoJSStringFormatter.h 415 2004-10-20 15:47:45Z znek $
#ifndef __SOGoJSStringFormatter_H_
#define __SOGoJSStringFormatter_H_
#import <Foundation/Foundation.h>
#include <NGExtensions/NSString+Escaping.h>
@interface SOGoJSStringFormatter : NSObject <NGStringEscaping>
{
}
+ (id)sharedFormatter;
- (NSString *)stringByEscapingQuotesInString:(NSString *)_s;
- (NSString *)stringByEscapingSingleQuotesInString:(NSString *)_s;
- (NSString *)stringByEscapingDoubleQuotesInString:(NSString *)_s;
@end
#endif /* __SOGoJSStringFormatter_H_ */

View File

@ -1,75 +0,0 @@
/*
Copyright (C) 2000-2004 SKYRIX Software AG
This file is part of OGo
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 "SOGoJSStringFormatter.h"
@implementation SOGoJSStringFormatter
static NSCharacterSet *quotesSet = nil;
static NSCharacterSet *squoteSet = nil;
static NSCharacterSet *dquoteSet = nil;
+ (void)initialize {
static BOOL didInit = NO;
if(didInit)
return;
didInit = YES;
quotesSet = \
[[NSCharacterSet characterSetWithCharactersInString:@"'\""] retain];
squoteSet = \
[[NSCharacterSet characterSetWithCharactersInString:@"'"] retain];
dquoteSet = \
[[NSCharacterSet characterSetWithCharactersInString:@"\""] retain];
}
+ (id)sharedFormatter {
static id sharedInstance = nil;
if(!sharedInstance) {
sharedInstance = [[self alloc] init];
}
return sharedInstance;
}
- (NSString *)stringByEscapingQuotesInString:(NSString *)_s {
return [_s stringByEscapingCharactersFromSet:quotesSet
usingStringEscaping:self];
}
- (NSString *)stringByEscapingSingleQuotesInString:(NSString *)_s {
return [_s stringByEscapingCharactersFromSet:squoteSet
usingStringEscaping:self];
}
- (NSString *)stringByEscapingDoubleQuotesInString:(NSString *)_s {
return [_s stringByEscapingCharactersFromSet:dquoteSet
usingStringEscaping:self];
}
- (NSString *)stringByEscapingString:(NSString *)_s {
if([_s isEqualToString:@"'"]) {
return @"&amp;apos;";
}
return @"&amp;quot;";
}
@end