Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added SORT-AS and extra tokens code and unit tests for the N vCard parameter in Conta...
[xestiaab/.git] / source / contacteditor / ContactDataObject.cpp
index 54e0bfd..5f9ca27 100644 (file)
@@ -479,9 +479,39 @@ void ContactDataObject::ProcessN(wxString PropertySeg1, wxString PropertySeg2){
                
                        NameLanguage = PropertyValue;
                
+               } else if (PropertyName == wxT("SORT-AS")){
+               
+                       if (PropertyValue.Left(1) == wxT("\"") && PropertyValue.Right(1) == wxT("\"") &&
+                               PropertyValue.Len() >= 3){
+                               NameDisplayAs = PropertyValue.Mid(1, (PropertyValue.Len() - 2));
+                       }
+               
+               } else if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty()){
+                       
+                       if (FirstToken == TRUE){
+                               
+                               PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
+                               FirstToken = FALSE;
+                               
+                       } else {
+                       
+                               PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
+                               
+                       }
+                       
                }
        
        }
+       
+       // Split the name data.
+       
+       // Add the name token data.
+       
+       if (!PropertyTokens.IsEmpty()){
+       
+               NameTokens = PropertyTokens;
+       
+       }
 
 } 
 
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