From: helge Date: Tue, 15 Aug 2006 10:47:26 +0000 (+0000) Subject: properly convert numbers to strings (#1701) X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0538f1ed1225dfd41b334b14516dc62cf049f11a;p=sope properly convert numbers to strings (#1701) git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1337 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-gdl1/GDLAccess/ChangeLog b/sope-gdl1/GDLAccess/ChangeLog index c123ec02..460ba493 100644 --- a/sope-gdl1/GDLAccess/ChangeLog +++ b/sope-gdl1/GDLAccess/ChangeLog @@ -1,3 +1,8 @@ +2006-08-15 Helge Hess + + * EOCustomValues.m: added special support for lF NSTemporaryString + to fix OGo bug #1701 (v4.5.58) + 2006-07-05 Helge Hess * EOAdaptor.m: changed to find SAX drivers on 64bit systems diff --git a/sope-gdl1/GDLAccess/EOAttribute.m b/sope-gdl1/GDLAccess/EOAttribute.m index 8642041c..8f7b867d 100644 --- a/sope-gdl1/GDLAccess/EOAttribute.m +++ b/sope-gdl1/GDLAccess/EOAttribute.m @@ -255,7 +255,7 @@ static EONull *null = nil; // Check nil/EONull if (aValue == nil) return nil; - if (aValue == [EONull null]) + if (aValue == null) return aValue; // Check if we need conversion; we use is kind of because @@ -288,10 +288,14 @@ static EONull *null = nil; [date setCalendarFormat:format]; return date; } - + // See if we can alloc a new aValue and initilize it if ([aClass instancesRespondToSelector: @selector(initWithString:type:)]) { + // Note: this is still problematic! Eg NSString instances respond to + // initWithString:type:, but NSTemporaryString doesn't. + // EOCustomValues contains a lF specific for that situation. + return AUTORELEASE([[aClass alloc] initWithString:[aValue stringForType:_type] type:_type]); diff --git a/sope-gdl1/GDLAccess/EOCustomValues.m b/sope-gdl1/GDLAccess/EOCustomValues.m index d63d9f4e..86dd3b2c 100644 --- a/sope-gdl1/GDLAccess/EOCustomValues.m +++ b/sope-gdl1/GDLAccess/EOCustomValues.m @@ -29,6 +29,16 @@ #import "common.h" #import "EOCustomValues.h" +#if LIB_FOUNDATION_LIBRARY +@implementation NSTemporaryString(EOCustomValues) + +- initWithString:(NSString*)string type:(NSString*)type { + return [self initWithString:string]; +} + +@end +#endif + @implementation NSString(EOCustomValues) + stringWithString:(NSString*)string type:(NSString*)type { diff --git a/sope-gdl1/GDLAccess/Version b/sope-gdl1/GDLAccess/Version index 4096e97f..31494853 100644 --- a/sope-gdl1/GDLAccess/Version +++ b/sope-gdl1/GDLAccess/Version @@ -1,3 +1,3 @@ # version file -SUBMINOR_VERSION:=57 +SUBMINOR_VERSION:=58