]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1342 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 28 Jan 2008 15:32:48 +0000 (15:32 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 28 Jan 2008 15:32:48 +0000 (15:32 +0000)
ChangeLog
SOPE/NGCards/ChangeLog
SOPE/NGCards/iCalDailyRecurrenceCalculator.m
UI/Scheduler/UIxComponentEditor.m

index 08e209834b60e4c4b94721fc8140ac2e48fb514d..89bf1d6693a06a1d2ce1ef8cbf67f7cf7fcee0f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-28  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
+       -takeValuesFromRequest:_rqinContext:_ctx]): make use of the <<
+       operator to handle the day masks in custom rules.
+
 2008-01-24  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * SoObjects/SOGo/SOGoUser.m ([SOGoUser
index fbac587b89efbdd11fcd37618d2c1fddac009f3a..b66b3e49db181773b8752f9b9e5ff45346679089 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-28  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * iCalDailyRecurrenceCalculator.m ([iCalDailyRecurrenceCalculator
+       -recurrenceRangesWithinCalendarDateRange:]): make use of <<
+       instead of exp2 to compute the mask.
+
 2008-01-22  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * iCalRecurrenceRule.m ([iCalRecurrenceRule -repeatInterval]):
index 7c7d2656c01eeeffc790de9d52e36a14df408557..6c9fd423befdcd1a1e9dbfb260e2cdd4e26650ce 100644 (file)
 #import <Foundation/NSArray.h>
 
 #import <NGExtensions/NSCalendarDate+misc.h>
+#import <NGExtensions/NGCalendarDateRange.h>
+
+#import "NSCalendarDate+ICal.h"
 
 #import "iCalRecurrenceCalculator.h"
+#import "iCalRecurrenceRule.h"
 
 @interface iCalDailyRecurrenceCalculator : iCalRecurrenceCalculator
 @end
 
-#import <NGExtensions/NGCalendarDateRange.h>
-#import "iCalRecurrenceRule.h"
-#import "NSCalendarDate+ICal.h"
-
-#include <math.h>
-
 @interface iCalRecurrenceCalculator(PrivateAPI)
 - (NSCalendarDate *)lastInstanceStartDate;
 @end
        // FIXME: Should we also check the end date? We might want
        //        to check if the end date is also within it.
        if ([self->rrule byDayMask]) {
-         mask = [start dayOfWeek] == 0 ? iCalWeekDaySunday : (unsigned int)exp2([start dayOfWeek]-1);
+         mask = ([start dayOfWeek]
+                 ? (unsigned int) 1 << ([start dayOfWeek] - 1)
+                 : iCalWeekDaySunday);
          if (([self->rrule byDayMask]&mask) != mask) continue;
        }
 
index 789f21f7b530a4c7a696afa282f2ed9bb6553c9f..1c5ab268de20758ad617b28cdecf983c91ea26e7 100644 (file)
@@ -1370,11 +1370,9 @@ RANGE(2);
        v = [[self repeat2] componentsSeparatedByString: @","];
        c = [v count];
        mask = 0;
-       
+
        while (c--)
-         {
-           mask |= (unsigned int)exp2([[v objectAtIndex: c] intValue]-1);
-         }
+         mask |= 1 << ([[v objectAtIndex: c] intValue] - 1);
        
        [theRule setByDayMask: mask];
       }