6 #include "textprocessing.h"
8 void EscapeString(wxString *ReceivedString, bool StripQuotes)
11 ReceivedString->Replace(wxT("\\"), wxT("\\\\"), TRUE);
12 ReceivedString->Replace(wxT(","), wxT("\\,"), TRUE);
13 ReceivedString->Replace(wxT(";"), wxT("\\;"), TRUE);
14 ReceivedString->Replace(wxT("\r\n"), wxT("\\n"), TRUE);
15 ReceivedString->Replace(wxT("\n"), wxT("\\n"), TRUE);
17 if (StripQuotes == TRUE){
19 ReceivedString->Replace(wxT("\""), wxT(""), TRUE);
25 void GetEscapeString(wxTextCtrl *TextCtrl, wxString *ProcessString, bool StripQuotes)
28 *ProcessString = TextCtrl->GetValue();
29 EscapeString(ProcessString, StripQuotes);
33 void GetEscapeString(wxComboBox *ComboCtrl, wxString *ProcessString, bool StripQuotes)
36 *ProcessString = ComboCtrl->GetValue();
37 EscapeString(ProcessString, StripQuotes);
41 void GetEscapeString(wxChoice *ChoiceCtrl, wxString *ProcessString, bool StripQuotes)
44 *ProcessString = ChoiceCtrl->GetString(ChoiceCtrl->GetSelection());
45 EscapeString(ProcessString, StripQuotes);
49 void CaptureString(wxString *ProcessString, bool StripQuotes)
52 ProcessString->Replace(wxT("\\n"), wxT("\n"), TRUE);
53 ProcessString->Replace(wxT("\\;"), wxT(";"), TRUE);
54 ProcessString->Replace(wxT("\\,"), wxT(","), TRUE);
55 ProcessString->Replace(wxT("\\\\"), wxT("\\"), TRUE);
57 if (StripQuotes == TRUE){
59 ProcessString->Replace(wxT("\""), wxT(""), TRUE);
65 void ConvertToHTML(wxString *ProcessString)
68 ProcessString->Replace(wxT("&"), wxT("&"), TRUE);
69 ProcessString->Replace(wxT("<"), wxT("<"), TRUE);
70 ProcessString->Replace(wxT(">"), wxT(">"), TRUE);
71 ProcessString->Replace(wxT("\n"), wxT("<br>"), TRUE);
75 void DeleteMapDataProcess(int IndexNum, std::map<int, std::string>* MapData){
76 MapData->erase(IndexNum);
79 void DeleteMapDataProcess(int IndexNum, std::map<int, wxString>* MapData){
80 MapData->erase(IndexNum);
83 void DeleteMapDataProcess(int IndexNum, std::map<int, int>* MapData){
84 MapData->erase(IndexNum);
87 void DeleteMapDataProcess(int IndexNum, std::map<int, bool>* MapData){
88 MapData->erase(IndexNum);
92 template <typename ArgMap, typename... Args>
93 void DeleteMapData(ArgMap* ArgMapPtr, Args*... ArgsList){
95 //DeleteMapDataProcess(ArgMapPtr);
97 DeleteMapData(ArgsList...);