Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Replaced token processing in FN with ProcessTokens.
[xestiaab/.git] / source / contacteditor / ContactDataObject.cpp
index ddb6a57..ae15502 100644 (file)
@@ -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 {
                        
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy