Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiacalendar
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added unit tests for DTSTART in iCalendarEvent/ObjectDataTests
[xestiacalendar/.git]
/
source
/
objects
/
calendarevent
/
CalendarEvent.cpp
diff --git
a/source/objects/calendarevent/CalendarEvent.cpp
b/source/objects/calendarevent/CalendarEvent.cpp
index
720c7bd
..
f737cc1
100644
(file)
--- a/
source/objects/calendarevent/CalendarEvent.cpp
+++ b/
source/objects/calendarevent/CalendarEvent.cpp
@@
-100,31
+100,37
@@
CalendarObjectValidResult CalendarEventObject::ValidObject(){
SeekCount = 0;
SeekCount = 0;
- // Look for DTSTART.
+ // Look for DTSTART
if nothing is set for METHOD.
.
- for (vector<string>::iterator iter = ObjectName.begin();
- iter != ObjectName.end(); iter++){
+ if (MethodData.size() == 0){
+
+ for (vector<string>::iterator iter = ObjectName.begin();
+ iter != ObjectName.end(); iter++){
- try{
- PropertyName = ObjectName[SeekCount].substr(0,7);
- }
+
try{
+
PropertyName = ObjectName[SeekCount].substr(0,7);
+
}
- catch(const out_of_range& oor){
- continue;
- }
+
catch(const out_of_range& oor){
+
continue;
+
}
- if (PropertyName == "DTSTART"){
+
if (PropertyName == "DTSTART"){
- if (ValidDateTimeStart == false){
- ValidDateTimeStart = true;
- } else {
- return CALENDAROBJECTVALID_INVALIDFORMAT;
- }
+
if (ValidDateTimeStart == false){
+
ValidDateTimeStart = true;
+
} else {
+
return CALENDAROBJECTVALID_INVALIDFORMAT;
+
}
- }
+
}
- SeekCount++;
+
SeekCount++;
+ }
+
+ } else {
+ ValidDateTimeStart = true;
}
SeekCount = 0;
}
SeekCount = 0;
@@
-197,7
+203,7
@@
void CalendarEventObject::ProcessData(){
DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "UID");
DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "UID");
- // Process the data from
DTSTAMP
.
+ // Process the data from
UID
.
if (DataReceived.begin() != DataReceived.end()){
if (DataReceived.begin() != DataReceived.end()){
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy