X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditor-Load.cpp;h=4049a225fba42284358ebb7140e351cae3988e89;hb=10578374729faf0e812c1953dee1b539a48ce091;hp=6b97937ccf37a851c99cbed02f4af6e2407853ea;hpb=d06d0b1d631e7a48c34738397e98651f541d4000;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditor-Load.cpp b/source/contacteditor/frmContactEditor-Load.cpp index 6b97937..4049a22 100644 --- a/source/contacteditor/frmContactEditor-Load.cpp +++ b/source/contacteditor/frmContactEditor-Load.cpp @@ -30,6 +30,7 @@ #include "../vcard/vcard.h" #include "../common/textprocessing.h" #include "../common/dirs.h" +#include "cdo/ContactDataObject.h" bool frmContactEditor::LoadContact(wxString Filename){ @@ -61,6 +62,8 @@ bool frmContactEditor::LoadContact(wxString Filename){ } + ContactEditorData.LoadFile(Filename); + ContactFile.ReadAll(&wxSContactString, wxConvAuto()); // Split the lines. @@ -87,13 +90,13 @@ bool frmContactEditor::LoadContact(wxString Filename){ bool HasExtraNicknames = FALSE; bool IgnoreGender = FALSE; bool ExtraLineSeek = TRUE; - bool BirthdayProcessed = FALSE; - bool AnniversaryProcessed = FALSE; + //bool BirthdayProcessed = FALSE; + //bool AnniversaryProcessed = FALSE; bool FNProcessed = FALSE; bool GenderProcessed = FALSE; bool NameProcessed = FALSE; - bool UIDProcessed = FALSE; - bool KindProcessed = FALSE; + //bool UIDProcessed = FALSE; + //bool KindProcessed = FALSE; bool ETagFound = FALSE; bool ETagOrigFound = FALSE; bool VersionProcessed = FALSE; @@ -133,6 +136,32 @@ bool frmContactEditor::LoadContact(wxString Filename){ int XTokenCount = 0; //int intValueSeek = 1; + // Process the unique ID (UID) + + UIDToken = ContactEditorData.UIDToken; + + // Process the contact type (KIND) (frmContactEditor-LoadGroup.cpp) + + LoadKind(&ContactEditorData.ContactKind); + + // Process the Birthday (BDAY) (frmContactEditor-LoadBADays.cpp) + + LoadBirthday(&ContactEditorData.Birthday, &ContactEditorData.BirthdayText); + + // Process the Anniversary (ANNIVERSARY) (frmContactEditor-LoadBADays.cpp) + + LoadAnniversary(&ContactEditorData.Anniversary, &ContactEditorData.AnniversaryText); + + // Process the Gender (GENDER) (frmContactEditor-LoadGender.cpp) + + LoadGender(&ContactEditorData.Gender, &ContactEditorData.GenderDetails); + + // Process the Name (N) (frmContactEditor-LoadName.cpp) + + LoadName(&ContactEditorData.NameTitle, &ContactEditorData.NameForename, + &ContactEditorData.NameSurname, &ContactEditorData.NameOtherNames, + &ContactEditorData.NameSuffix); + for (std::map::iterator iter = ContactFileLines.begin(); iter != ContactFileLines.end(); ++iter){ @@ -234,13 +263,13 @@ bool frmContactEditor::LoadContact(wxString Filename){ VersionProcessed = TRUE; - } if (wxSProperty == wxT("KIND") && KindProcessed == FALSE){ + }/* if (wxSProperty == wxT("KIND") && KindProcessed == FALSE){ // See frmContactEditor-LoadGroup.cpp LoadKind(wxSPropertySeg2); - } else if (wxSProperty == wxT("MEMBER")){ + }*/ else if (wxSProperty == wxT("MEMBER")){ // See frmContactEditor-LoadGroup.cpp @@ -252,19 +281,19 @@ bool frmContactEditor::LoadContact(wxString Filename){ LoadFN(wxSPropertySeg1, wxSPropertySeg2, &FNCount, &FNProcessed, &ContactData); - } else if (wxSProperty == wxT("N") && NameProcessed == FALSE){ + }/* else if (wxSProperty == wxT("N") && NameProcessed == FALSE){ // See frmContactEditor-LoadName.cpp LoadN(wxSPropertySeg1, wxSPropertySeg2, &NameProcessed, &ContactData); - } else if (wxSProperty == wxT("NICKNAME")){ + }*/ else if (wxSProperty == wxT("NICKNAME")){ // See frmContactEditor-LoadNickname.cpp LoadNickname(wxSPropertySeg1, wxSPropertySeg2, &NicknameCount, &ContactData); - } else if (wxSProperty == wxT("GENDER") && GenderProcessed == FALSE){ + }/* else if (wxSProperty == wxT("GENDER") && GenderProcessed == FALSE){ // See frmContactEditor-LoadGender.cpp @@ -282,7 +311,7 @@ bool frmContactEditor::LoadContact(wxString Filename){ LoadAnniversary(wxSPropertySeg1, wxSPropertySeg2, &AnniversaryProcessed); - } else if (wxSProperty == wxT("TZ")){ + }*/ else if (wxSProperty == wxT("TZ")){ // See frmContactEditor-LoadTimeZone.cpp @@ -408,12 +437,12 @@ bool frmContactEditor::LoadContact(wxString Filename){ LoadKey(wxSPropertySeg1, wxSPropertySeg2, &KeyCount); - } else if (wxSProperty == wxT("UID") && UIDProcessed == FALSE){ + }/* else if (wxSProperty == wxT("UID") && UIDProcessed == FALSE){ UIDToken = wxSPropertySeg2; UIDProcessed = TRUE; - } else if (wxSProperty.Mid(0, 3) == wxT("VND")){ + }*/ else if (wxSProperty.Mid(0, 3) == wxT("VND")){ // Split the Vendor three ways.