vCardOut->AddRaw(wxT("VERSION"), wxT("4.0"));
vCardOut->AddRaw(wxT("PRODID"), strVer);
- // FN
- // NICKNAME
- // TITLE
- // ORG
- // NOTE
- // PHOTO
+ // FN
+ // NICKNAME
+ // TITLE
+ // ORG
+ // NOTE
+ // PHOTO
// Process the properties which have X-FIRST.
if (wxSPropertyNextLine.Mid(0, 1) == wxT(" ") || wxSPropertyNextLine.Mid(0, 1) == wxT("\t")){
wxSPropertyNextLine.Remove(0, 1);
- //wxSPropertyNextLine.Trim(FALSE);
- //ContactLine.Trim();
ContactLine.Append(wxSPropertyNextLine);
DataLineProcessOriginal.insert(std::make_pair(DataLineSeekOrig, iterboolsub->first));
DataLineSeekOrig++;
- //iterboolsub->second = TRUE;
-
+
} else {
ExtraLineSeek = FALSE;
for (std::map<int,wxString>::iterator itersub = ContactFileLines.begin();
itersub != ContactFileLines.end(); ++itersub){
- //DataLineProcess = DataLineProcessOriginal;
- //DataLineSeek = DataLineSeekOrig;
-
ContactLineSub = itersub->second;
ExtraLineSeekSub = TRUE;
iterboolsub = ContactFileProcessed.find(itersub->first);
- //std::map<int,bool>::iterator iterorig = ContactFileProcessed.find(itersub->first);
- //std::map<int,bool>::iterator itersuborig;
// Ignore certain variables as they are not needed.
continue;
}
-
- //std::map<int,wxString>::iterator itersub = iter;
DataLineProcess.insert(std::make_pair(DataLineSeek, itersub->first));
DataLineSeek++;
-
-
while (ExtraLineSeekSub == TRUE){
if (itersub == ContactFileLines.end()){
if (wxSPropertyNextLine.Mid(0, 1) == wxT(" ") || wxSPropertyNextLine.Mid(0, 1) == wxT("\t")){
wxSPropertyNextLine.Remove(0, 1);
- //wxSPropertyNextLine.Trim(FALSE);
- //ContactLine.Trim();
ContactLineSub.Append(wxSPropertyNextLine);
- //iterboolsub->second = TRUE;
DataLineProcess.insert(std::make_pair(DataLineSeek, itersub->first));
DataLineSeek++;
}
}
-
- /*while (ExtraLineSeekSub == TRUE && iterboolsub != ContactFileProcessedWorking.end()){
-
- // Check if there is extra data on the next line
- // (indicated by space or tab at the start) and add data.
-
- itersub++;
-
- iterboolsub = ContactFileProcessedWorking.find(itersub->first);
-
- if (iterboolsub->second == TRUE){
-
- continue;
-
- }
-
- if (itersub == ContactFileLines.end()){
-
- break;
-
- }
-
- wxSPropertyNextLine = itersub->second;
-
- if (wxSPropertyNextLine.Mid(0, 1) == wxT(" ") || wxSPropertyNextLine.Mid(0, 1) == wxT("\t")){
-
- wxSPropertyNextLine.Remove(0, 1);
- //wxSPropertyNextLine.Trim(FALSE);
- //ContactLine.Trim();
- ContactLineSub.Append(wxSPropertyNextLine);
- //iterboolsub->second = TRUE;
- DataLineProcess.insert(std::make_pair(DataLineSeek, itersub->first));
- DataLineSeek++;
-
- } else {
-
- itersub--;
- ExtraLineSeekSub = FALSE;
-
- }
-
- if (iterboolsub == ContactFileProcessedWorking.end()){
-
- break;
- ExtraLineSeekSub = FALSE;
-
- }
-
- }*/
ContactLineSubLen = ContactLineSub.Len();
PropertyFind = TRUE;
TempPropertyData.clear();
} else {
-
- wxT("PHOTODANCEMATCH!");
for (std::map<wxString, wxString>::iterator xfiter = TempPropertyData.begin();
xfiter != TempPropertyData.end(); ++xfiter){
wxSPropertyData.Clear();
wxSPropertyXVCard4Value.Clear();
wxSPropertyNameConv.Clear();
- //FinalPropertyData.clear();
- //FinalPropValue.clear();
PropertyData.clear();
PropertyLock.clear();
ContactLine.clear();
if (wxSPropertyNextLine.Mid(0, 1) == wxT(" ") || wxSPropertyNextLine.Mid(0, 1) == wxT("\t")){
wxSPropertyNextLine.Remove(0, 1);
- //wxSPropertyNextLine.Trim(FALSE);
- //ContactLine.Trim();
ContactLine.Append(wxSPropertyNextLine);
iterboolsub->second = TRUE;
wxSPropertyData.Clear();
wxSPropertyXVCard4Value.Clear();
wxSPropertyNameConv.Clear();
- //FinalPropertyData.clear();
- //FinalPropValue.clear();
PropertyData.clear();
PropertyLock.clear();
ContactLine.clear();
size_t ItemStringSeekLen = 0;
int ItemSeekSub = 0;
int ItemSeekSecSub = 0;
- //int intValueSeek = 1;
std::map<int, wxString> NumberedName;
std::map<int, wxString> NumberedData;
SeekItemData = FALSE;
std::map<wxString, void*> ItemMapIndex;
- //std::map<wxString, wxString> ItemNameIndex;
// Look for item in the initial line, process into a proper line then
// look for other lines with the same item association.
// Get Item data.
- //ContactLineSeekSub = ContactLineSeek;
std::map<int,wxString>::iterator itersub = iter;
while (ExtraLineSeek == TRUE){
if (wxSPropertyNextLine.Mid(0, 1) == wxT(" ") || wxSPropertyNextLine.Mid(0, 1) == wxT("\t")){
wxSPropertyNextLine.Remove(0, 1);
- //wxSPropertyNextLine.Trim(FALSE);
- //ContactLine.Trim();
ContactLine.Append(wxSPropertyNextLine);
iterboolsub->second = TRUE;
iterboolsub->second = TRUE;
}
-
- //ItemNameIndex.insert(std::make_pair(ItemStringSeek, ItemPropName));
+
ItemListData->insert(std::make_pair(ItemIndex, ContactLineSub));
ItemMapIndex.insert(std::make_pair(ItemStringSeek, ItemListData));
wxSPropertyData.Clear();
wxSPropertyXVCard4Value.Clear();
wxSPropertyNameConv.Clear();
- //FinalPropertyData.clear();
- //FinalPropValue.clear();
PropertyData.clear();
PropertyLock.clear();
ContactLine.clear();
wxSPropertyData.Clear();
wxSPropertyXVCard4Value.Clear();
wxSPropertyNameConv.Clear();
- //FinalPropertyData.clear();
- //FinalPropValue.clear();
PropertyData.clear();
PropertyLock.clear();
ContactLine.clear();
VCard3Value = FALSE;
TempData.clear();
- //PropertyData.clear();
- //PropertyLock.clear();
}