merge of '25877fc1df88b6744ec26e868946fc19cfd28cb8'

and '61fe02b6c3bc4f0aa3797d661d014d8c256b0de9'

Monotone-Parent: 25877fc1df88b6744ec26e868946fc19cfd28cb8
Monotone-Parent: 61fe02b6c3bc4f0aa3797d661d014d8c256b0de9
Monotone-Revision: d8a02a76c20d760d00a46a0e98b6ca134a05cbc7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-12-30T20:40:05
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau committed 2011-12-30 20:40:05 +00:00
commit 7ea37d7cf9
47 files changed
+2121 -1548

No files matched your search

-2
View File
@@ -460,8 +460,6 @@ _orderedValuesAreVoid (NSArray *orderedValues)
NSMutableArray *orderedValues;
NSUInteger count, max;
result = YES;
keys = [values allKeys];
max = [keys count];
for (count = 0; result && count < max; count++)
+4 -1
View File
@@ -46,12 +46,15 @@
- (CardElement *) uniqueChildWithTag: (NSString *) aTag;
- (void) setUniqueChild: (CardElement *) aChild;
- (NSMutableArray *) children;
- (void) addChild: (CardElement *) aChild;
- (void) addChildren: (NSArray *) someChildren;
- (void) removeChild: (CardElement *) aChild;
- (void) removeChildren: (NSArray *) someChildren;
- (NSMutableArray *) children;
- (void) cleanupEmptyChildren;
- (CardElement *) firstChildWithTag: (NSString *) aTag;
- (NSArray *) childrenWithTag: (NSString *) aTag;
- (NSArray *) childrenWithAttribute: (NSString *) anAttribute
+30
View File
@@ -142,6 +142,19 @@ static NGCardsSaxHandler *sax = nil;
return nil;
}
- (BOOL) isVoid
{
BOOL isVoid = YES;
NSUInteger count, max;
max = [children count];
for (count = 0; isVoid && count < max; count++)
if (![[children objectAtIndex: count] isVoid])
isVoid = NO;
return isVoid;
}
- (void) addChild: (CardElement *) aChild
{
Class mappedClass;
@@ -366,6 +379,23 @@ static NGCardsSaxHandler *sax = nil;
[self addChild: newChild];
}
- (void) cleanupEmptyChildren
{
NSUInteger max;
NSInteger count;
CardElement *child;
max = [children count];
for (count = max - 1; count > -1; count--)
{
child = [children objectAtIndex: count];
if ([child isKindOfClass: [CardGroup class]])
[(CardGroup *) child cleanupEmptyChildren];
if ([child isVoid])
[children removeObjectAtIndex: count];
}
}
- (NSString *) description
{
NSMutableString *str;
+8
View File
@@ -1,3 +1,11 @@
2011-12-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* NGVCard.m (-initWithUid:): initialize "CLASS" and "PROFILE".
* CardGroup.m (-isVoid): overriden method.
(-cleanupEmptyChildren): make use of "isVoid" to detect and remove
empty children.
2011-11-21 Francis Lachapelle <flachapelle@inverse.ca>
* iCalTimeZone.m (+knownTimeZoneNames): ignore files that don't
+2
View File
@@ -50,6 +50,8 @@
[self setTag: @"vcard"];
[self setUid: _uid];
[self setVersion: @"3.0"];
[self setVClass: @"PUBLIC"];
[self setProfile: @"VCARD"];
}
return self;