Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
vCard: Look at full name if no names exist
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Fri, 12 Jan 2018 00:09:07 +0000 (00:09 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Fri, 12 Jan 2018 00:09:07 +0000 (00:09 +0000)
source/vcard/vcard.cpp

index bc9cd81..fb34ab4 100644 (file)
@@ -190,6 +190,15 @@ vCardName vCard::GetName(){
        vCardName NameData;
        ArrayvCardOutData NameArray = this->GetByPartial(wxT("N"));
        //wxString NameDataGet = NameArray.PropValues[0];
+       
+       if (NameArray.PropValues.Count() == 0)
+       {
+               // Use FN if there is no N values set.
+               wxString fullName = this->Get(wxT("FN"));
+               NameData.Forename = fullName;
+               return NameData; 
+       }
+       
        wxString NameDataGet = NameArray.PropValues[0];
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
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