Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Indented code properly in vcard/vcard34conv-v3conv.cpp
[xestiaab/.git] / source / vcard / vcard34conv-v3conv.cpp
index 608af19..54be62b 100644 (file)
@@ -134,7 +134,7 @@ bool vCard34Conv::ConvertToV3(wxString Filename, wxString *wxSData){
        
        wxString strVer;
     
-    // Setup the version string.
+       // Setup the version string.
        
        strVer.Append(wxT("-//Xestia//Address Book Version "));
        strVer.Append(wxT(XSDAB_VERSION));
@@ -1703,16 +1703,70 @@ bool vCard34Conv::ConvertToV3(wxString Filename, wxString *wxSData){
                        
                        size_t intPrevValue = (wxSProperty.Len() + 1);
                        
-            if (((QuoteBreakPoint + 1) - intPrevValue) <= 0){
+                       if (((QuoteBreakPoint + 1) - intPrevValue) <= 0){
+                        
+                               ContactDatav3.AddRaw(wxSProperty, wxSPropertySeg2);
+
+                       } else {
+                        
+                               ContactDatav3.AddRaw(wxSProperty + wxT(";") + ContactLine.Mid(intPrevValue, ((QuoteBreakPoint + 1) - (intPrevValue + 1))), wxSPropertySeg2);
+
+                       }
+                       
+               } else if (wxSProperty.Mid(0, 12) == wxT("CLIENTPIDMAP")){
+               
+                       // Process the Client PID maps.
+                       
+                       int intPrevValue = 14;
+                       
+                       intPrevValue = 12;
+                       
+                       if (((QuoteBreakPoint + 1) - intPrevValue) <= 0){
+                        
+                               ContactDatav3.AddRaw(wxT("X-VCARD4-CLIENTPIDMAP"), wxSPropertySeg2);
+
+                       } else {
+                        
+                               ContactDatav3.AddRaw(wxT("X-VCARD4-CLIENTPIDMAP;") + ContactLine.Mid(intPrevValue, ((QuoteBreakPoint + 1) - (intPrevValue + 1))), wxSPropertySeg2);
+
+                       }
+               
+               } else if (wxSProperty.Mid(0, 3) == wxT("XML")){
+               
+                       // Process the XML values.
+                       
+                       int intPrevValue = 5;
+                       
+                       intPrevValue = 3;
+                       
+                       if (((QuoteBreakPoint + 1) - intPrevValue) <= 0){
                         
-                ContactDatav3.AddRaw(wxSProperty, wxSPropertySeg2);
+                               ContactDatav3.AddRaw(wxT("X-VCARD4-XML"), wxSPropertySeg2);
 
-            } else {
+                       } else {
                         
-                ContactDatav3.AddRaw(wxSProperty + wxT(";") + ContactLine.Mid(intPrevValue, ((QuoteBreakPoint + 1) - (intPrevValue + 1))), wxSPropertySeg2);
+                               ContactDatav3.AddRaw(wxT("X-VCARD4-XML;") + ContactLine.Mid(intPrevValue, ((QuoteBreakPoint + 1) - (intPrevValue + 1))), wxSPropertySeg2);
 
-            }
+                       }
+               
+               } else if (wxSProperty.Mid(0, 6) == wxT("SOURCE")){
+               
+                       // Process the source links.
+                       
+                       int intPrevValue = 8;
+                       
+                       intPrevValue = 6;
                        
+                       if (((QuoteBreakPoint + 1) - intPrevValue) <= 0){
+                        
+                               ContactDatav3.AddRaw(wxT("X-VCARD4-SOURCE"), wxSPropertySeg2);
+
+                       } else {
+                        
+                               ContactDatav3.AddRaw(wxT("X-VCARD4-SOURCE;") + ContactLine.Mid(intPrevValue, ((QuoteBreakPoint + 1) - (intPrevValue + 1))), wxSPropertySeg2);
+
+                       }
+               
                }
                
                // Reset the variables.
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