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
Updated comment checking for DTSTAMP.
[xestiacalendar/.git]
/
source
/
objects
/
calendarevent
/
CalendarEvent.cpp
diff --git
a/source/objects/calendarevent/CalendarEvent.cpp
b/source/objects/calendarevent/CalendarEvent.cpp
index
6c1887d
..
0450b2e
100644
(file)
--- a/
source/objects/calendarevent/CalendarEvent.cpp
+++ b/
source/objects/calendarevent/CalendarEvent.cpp
@@
-9,6
+9,7
@@
CalendarObjectValidResult CalendarEventObject::ValidObject(){
bool ValidDateTimeStamp = false;
bool ValidUniqueID = false;
int SeekCount = 0;
bool ValidDateTimeStamp = false;
bool ValidUniqueID = false;
int SeekCount = 0;
+ string PropertyName;
// Look for BEGIN:VEVENT.
// Look for BEGIN:VEVENT.
@@
-44,8
+45,16
@@
CalendarObjectValidResult CalendarEventObject::ValidObject(){
for (vector<string>::iterator iter = ObjectName.begin();
iter != ObjectName.end(); iter++){
for (vector<string>::iterator iter = ObjectName.begin();
iter != ObjectName.end(); iter++){
-
- if (ObjectName[SeekCount] == "DTSTAMP"){
+
+ try{
+ PropertyName = ObjectName[SeekCount].substr(0,7);
+ }
+
+ catch(const out_of_range& oor){
+ continue;
+ }
+
+ if (PropertyName == "DTSTAMP"){
if (ValidDateTimeStamp == false){
ValidDateTimeStamp = true;
if (ValidDateTimeStamp == false){
ValidDateTimeStamp = true;
@@
-66,7
+75,15
@@
CalendarObjectValidResult CalendarEventObject::ValidObject(){
for (vector<string>::iterator iter = ObjectName.begin();
iter != ObjectName.end(); iter++){
for (vector<string>::iterator iter = ObjectName.begin();
iter != ObjectName.end(); iter++){
- if (ObjectName[SeekCount] == "UID"){
+ try{
+ PropertyName = ObjectName[SeekCount].substr(0,3);
+ }
+
+ catch(const out_of_range& oor){
+ continue;
+ }
+
+ if (PropertyName == "UID"){
if (ValidUniqueID == false){
ValidUniqueID = true;
if (ValidUniqueID == false){
ValidUniqueID = true;
@@
-129,10
+146,18
@@
void CalendarEventObject::ProcessData(){
DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DTSTAMP");
DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DTSTAMP");
- // Process the data.
+ // Process the data
from DTSTAMP
.
if (DataReceived.begin() != DataReceived.end()){
if (DataReceived.begin() != DataReceived.end()){
+ try {
+ DateTimeStampTokens = DataReceived.begin()->first.substr(8);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
DateTimeStampData = DataReceived.begin()->second;
}
DateTimeStampData = DataReceived.begin()->second;
}
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy