X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fobjects%2Fcalendarobject%2FCalendarObject.cpp;h=ab21f148fb88562258d0b7820efa62f4e82a5f30;hb=88a5b0d1ed4ffe6e7bfb2e7c41d651eb8745bcc6;hp=d3c6f14cf7385939b91f79b2d51e7887a47ce5fe;hpb=e9da688490068209f433022a0d7b0c182ab7569e;p=xestiacalendar%2F.git diff --git a/source/objects/calendarobject/CalendarObject.cpp b/source/objects/calendarobject/CalendarObject.cpp index d3c6f14..ab21f14 100644 --- a/source/objects/calendarobject/CalendarObject.cpp +++ b/source/objects/calendarobject/CalendarObject.cpp @@ -52,6 +52,7 @@ CalendarObjectLoadResult CalendarObject::LoadString(std::string *LoadStringData) bool NewLine = false; bool SkipMode = false; bool ColonFound = false; + bool QuoteMode = false; char BufferChar = 0; int StringDataSize = LoadStringData->size(); int SeekCount = 0; @@ -73,6 +74,22 @@ CalendarObjectLoadResult CalendarObject::LoadString(std::string *LoadStringData) NewLine = false; + } else if ((*LoadStringData)[SeekCount] == '\"'){ + + if (QuoteMode == false){ + QuoteMode = true; + } else { + QuoteMode = false; + } + + BufferChar = (*LoadStringData)[SeekCount]; + + if (ColonFound == false){ + PropertyName += BufferChar; + } else { + PropertyValue += BufferChar; + } + } else if (NewLine == true){ // Character is on a new line but not a space or @@ -100,7 +117,8 @@ CalendarObjectLoadResult CalendarObject::LoadString(std::string *LoadStringData) NewLine = true; - } else if ((*LoadStringData)[SeekCount] == ':'){ + } else if ((*LoadStringData)[SeekCount] == ':' && + QuoteMode == false){ // Character is the colon. Set the colon // found boolen to true. @@ -282,7 +300,7 @@ void CalendarObject::ProcessBaseData(){ } - // Get the method (CALSCALE). + // Get the calendar scale (CALSCALE). DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "CALSCALE");