From: Steve Brokenshire Date: Fri, 12 Jan 2018 00:09:07 +0000 (+0000) Subject: vCard: Look at full name if no names exist X-Git-Tag: release-0.22~9 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=2031be04c0036b44c40c473a07fdd31e898b2a11;p=xestiaab%2F.git vCard: Look at full name if no names exist --- diff --git a/source/vcard/vcard.cpp b/source/vcard/vcard.cpp index bc9cd81..fb34ab4 100644 --- a/source/vcard/vcard.cpp +++ b/source/vcard/vcard.cpp @@ -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 SplitPoints; std::map SplitLength;