Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added vCard34Conv object for the input format conversion of vCard3 to work properly.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 6 Dec 2015 12:40:48 +0000 (12:40 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 6 Dec 2015 12:40:48 +0000 (12:40 +0000)
source/convert.cpp

index 0cfaa9f..1f19d97 100644 (file)
@@ -136,9 +136,6 @@ ConvertResult ConvertContact(wxString InputFormat, wxString OutputFormat,
                if (vCard4Format.Get("VERSION") != "4.0"){
                        return CONVERTRESULT_INPUTFILEINVALIDFORMAT;
                }
-               
-               // No conversion needs to be as the card is already
-               // in the vCard 4.0 format.
        
        } else if (InputFormat == "vCard3"){
        
@@ -154,7 +151,15 @@ ConvertResult ConvertContact(wxString InputFormat, wxString OutputFormat,
                if (InputvCard.Get("VERSION") != "3.0"){
                        return CONVERTRESULT_INPUTFILEINVALIDFORMAT;
                }
-       
+
+               vCard34Conv vCard34ConvObj;
+               
+               vCard vCard4Format;
+               
+               vCard34ConvObj.ConvertToV4(&InputFileData, &vCard4Format);
+               
+               FinalData = vCard4Format.WriteString();
+               
        }
        
        // Convert the vCard into the required format and
@@ -188,7 +193,8 @@ ConvertResult ConvertContact(wxString InputFormat, wxString OutputFormat,
        } else {
        
                // Write out the data to the console.
-       
+               
+               FinalData.Trim();
                std::cout << FinalData << std::endl;
        
        }
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