X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FContactDataObject.cpp;h=ae15502109f66d0c10f9f1b8c34fef2a27ddbb9b;hb=e872c31783158c4a2d4bcfe689faccd6e54b8779;hp=ddb6a573c0dad0532ed314662467c390f69e5b29;hpb=fc09ab48fbdbbe77b63ce30e051b3118eb006f0b;p=xestiaab%2F.git diff --git a/source/contacteditor/ContactDataObject.cpp b/source/contacteditor/ContactDataObject.cpp index ddb6a57..ae15502 100644 --- a/source/contacteditor/ContactDataObject.cpp +++ b/source/contacteditor/ContactDataObject.cpp @@ -511,17 +511,8 @@ void ContactDataObject::ProcessRevision(wxString PropertySeg1, wxString Property } CaptureString(&PropertyValue, FALSE); - - if (FirstToken == TRUE){ - - PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue); - FirstToken = FALSE; - - } else { - - PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue); - - } + + ProcessTokens(&PropertyName, &PropertyValue, &PropertyTokens, &FirstToken); } @@ -612,20 +603,7 @@ void ContactDataObject::ProcessSource(wxString PropertySeg1, wxString PropertySe } - if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){ - - if (FirstToken == TRUE){ - - PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue); - FirstToken = FALSE; - - } else { - - PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue); - - } - - } + ProcessTokens(&PropertyName, &PropertyValue, &PropertyTokens, &FirstToken); } @@ -760,20 +738,7 @@ void ContactDataObject::ProcessMember(wxString PropertySeg1, wxString PropertySe } - if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty()){ - - if (FirstToken == TRUE){ - - PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue); - FirstToken = FALSE; - - } else { - - PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue); - - } - - } + ProcessTokens(&PropertyName, &PropertyValue, &PropertyTokens, &FirstToken); } @@ -850,20 +815,7 @@ void ContactDataObject::ProcessFN(wxString PropertySeg1, wxString PropertySeg2, } - if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty()){ - - if (FirstToken == TRUE){ - - PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue); - FirstToken = FALSE; - - } else { - - PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue); - - } - - } + ProcessTokens(&PropertyName, &PropertyValue, &PropertyTokens, &FirstToken); } @@ -5161,14 +5113,14 @@ void ContactDataObject::ProcessVendor(wxString PropertySeg1, wxString PropertySe void ProcessTokens(wxString *PropertyName, wxString *PropertyValue, wxString *PropertyTokens, - bool FirstToken){ + bool *FirstToken){ if (!PropertyName->IsEmpty() && !PropertyValue->IsEmpty() && *PropertyName != wxT("TYPE")){ - if (FirstToken == TRUE){ + if (*FirstToken == TRUE){ PropertyTokens->Append(*PropertyName + wxT("=") + *PropertyValue); - FirstToken = FALSE; + *FirstToken = FALSE; } else {