From 7c7382aec816add24a96a03f4cd37c461f48e9b6 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 13 Mar 2016 16:08:16 +0000 Subject: [PATCH] Indented code properly contacteditor/frmContactEditor-Calendar.cpp --- .../frmContactEditor-Calendar.cpp | 336 ++++++++++-------- 1 file changed, 182 insertions(+), 154 deletions(-) diff --git a/source/contacteditor/frmContactEditor-Calendar.cpp b/source/contacteditor/frmContactEditor-Calendar.cpp index c31fd92..95235c1 100644 --- a/source/contacteditor/frmContactEditor-Calendar.cpp +++ b/source/contacteditor/frmContactEditor-Calendar.cpp @@ -21,195 +21,223 @@ void frmContactEditor::AddCalendarAddress( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); - frameCECalAdr->SetEditorMode(FALSE); - intResult = GetLastInt(&ContactEditorData.CalendarList); - frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList, - &ContactEditorData.CalendarListAltID, - &ContactEditorData.CalendarListPID, - &ContactEditorData.CalendarListType, - &ContactEditorData.CalendarListTokens, - &ContactEditorData.CalendarListPref, - lboCalendarAddresses, - (intValueSeek)); - frameCECalAdr->ShowModal(); - delete frameCECalAdr; - frameCECalAdr = NULL; + + int intResult = 0; + + frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); + frameCECalAdr->SetEditorMode(FALSE); + intResult = GetLastInt(&ContactEditorData.CalendarList); + frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList, + &ContactEditorData.CalendarListAltID, + &ContactEditorData.CalendarListPID, + &ContactEditorData.CalendarListType, + &ContactEditorData.CalendarListTokens, + &ContactEditorData.CalendarListPref, + lboCalendarAddresses, + (intValueSeek)); + frameCECalAdr->ShowModal(); + delete frameCECalAdr; + frameCECalAdr = NULL; + } void frmContactEditor::ModifyCalendarAddress( wxCommandEvent& event ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!GetSelectedItem(lboCalendarAddresses, - &longSelected, - &intSelectedData)){ - return; - } - - frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); - frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList, - &ContactEditorData.CalendarListAltID, - &ContactEditorData.CalendarListPID, - &ContactEditorData.CalendarListType, - &ContactEditorData.CalendarListTokens, - &ContactEditorData.CalendarListPref, - lboCalendarAddresses, - intSelectedData); - frameCECalAdr->SetEditorMode(TRUE); - frameCECalAdr->ShowModal(); - delete frameCECalAdr; - frameCECalAdr = NULL; + + long longSelected = -1; + int intSelectedData = 0; + + if (!GetSelectedItem(lboCalendarAddresses, + &longSelected, + &intSelectedData)){ + + return; + + } + + frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); + frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList, + &ContactEditorData.CalendarListAltID, + &ContactEditorData.CalendarListPID, + &ContactEditorData.CalendarListType, + &ContactEditorData.CalendarListTokens, + &ContactEditorData.CalendarListPref, + lboCalendarAddresses, + intSelectedData); + frameCECalAdr->SetEditorMode(TRUE); + frameCECalAdr->ShowModal(); + delete frameCECalAdr; + frameCECalAdr = NULL; + } void frmContactEditor::DeleteCalendarAddress( wxCommandEvent& event ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboCalendarAddresses, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboCalendarAddresses, + &longSelected, + &intSelectedData)){ + + return; + + } - lboCalendarAddresses->DeleteItem(longSelected); + lboCalendarAddresses->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.CalendarList, &ContactEditorData.CalendarListAltID, - &ContactEditorData.CalendarListPID, &ContactEditorData.CalendarListType, &ContactEditorData.CalendarListTokens, - &ContactEditorData.CalendarListPref); + DeleteMapData(intSelectedData, &ContactEditorData.CalendarList, &ContactEditorData.CalendarListAltID, + &ContactEditorData.CalendarListPID, &ContactEditorData.CalendarListType, &ContactEditorData.CalendarListTokens, + &ContactEditorData.CalendarListPref); } void frmContactEditor::AddCalendarRequest( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); - frameCECalAdr->SetEditorMode(FALSE); - intResult = GetLastInt(&ContactEditorData.CalendarRequestList); - frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList, - &ContactEditorData.CalendarRequestListAltID, - &ContactEditorData.CalendarRequestListPID, - &ContactEditorData.CalendarRequestListType, - &ContactEditorData.CalendarRequestListTokens, - &ContactEditorData.CalendarRequestListPref, - lboCalendarRequestAddress, - (intValueSeek)); - frameCECalAdr->ShowModal(); - delete frameCECalAdr; - frameCECalAdr = NULL; + + int intResult = 0; + + frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); + frameCECalAdr->SetEditorMode(FALSE); + intResult = GetLastInt(&ContactEditorData.CalendarRequestList); + frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList, + &ContactEditorData.CalendarRequestListAltID, + &ContactEditorData.CalendarRequestListPID, + &ContactEditorData.CalendarRequestListType, + &ContactEditorData.CalendarRequestListTokens, + &ContactEditorData.CalendarRequestListPref, + lboCalendarRequestAddress, + (intValueSeek)); + frameCECalAdr->ShowModal(); + delete frameCECalAdr; + frameCECalAdr = NULL; + } void frmContactEditor::ModifyCalendarRequest( wxCommandEvent& event ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!GetSelectedItem(lboCalendarRequestAddress, - &longSelected, - &intSelectedData)){ - return; - } - - frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); - frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList, - &ContactEditorData.CalendarRequestListAltID, - &ContactEditorData.CalendarRequestListPID, - &ContactEditorData.CalendarRequestListType, - &ContactEditorData.CalendarRequestListTokens, - &ContactEditorData.CalendarRequestListPref, - lboCalendarRequestAddress, - intSelectedData); - frameCECalAdr->SetEditorMode(TRUE); - frameCECalAdr->ShowModal(); - delete frameCECalAdr; - frameCECalAdr = NULL; + + long longSelected = -1; + int intSelectedData = 0; + + if (!GetSelectedItem(lboCalendarRequestAddress, + &longSelected, + &intSelectedData)){ + + return; + + } + + frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); + frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList, + &ContactEditorData.CalendarRequestListAltID, + &ContactEditorData.CalendarRequestListPID, + &ContactEditorData.CalendarRequestListType, + &ContactEditorData.CalendarRequestListTokens, + &ContactEditorData.CalendarRequestListPref, + lboCalendarRequestAddress, + intSelectedData); + frameCECalAdr->SetEditorMode(TRUE); + frameCECalAdr->ShowModal(); + delete frameCECalAdr; + frameCECalAdr = NULL; + } void frmContactEditor::DeleteCalendarRequest( wxCommandEvent& event ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!GetSelectedItem(lboCalendarRequestAddress, - &longSelected, - &intSelectedData)){ - return; - } - - lboCalendarRequestAddress->DeleteItem(longSelected); - - DeleteMapData(intSelectedData, &ContactEditorData.CalendarRequestList, - &ContactEditorData.CalendarRequestListAltID, &ContactEditorData.CalendarRequestListPID, - &ContactEditorData.CalendarRequestListType, &ContactEditorData.CalendarRequestListTokens, - &ContactEditorData.CalendarRequestListPref); + + long longSelected = -1; + int intSelectedData = 0; + + if (!GetSelectedItem(lboCalendarRequestAddress, + &longSelected, + &intSelectedData)){ + + return; + + } + + lboCalendarRequestAddress->DeleteItem(longSelected); + + DeleteMapData(intSelectedData, &ContactEditorData.CalendarRequestList, + &ContactEditorData.CalendarRequestListAltID, &ContactEditorData.CalendarRequestListPID, + &ContactEditorData.CalendarRequestListType, &ContactEditorData.CalendarRequestListTokens, + &ContactEditorData.CalendarRequestListPref); + } void frmContactEditor::AddFreeBusy( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); - frameCECalAdr->SetEditorMode(FALSE); - intResult = GetLastInt(&ContactEditorData.FreeBusyList); - frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList, - &ContactEditorData.FreeBusyListAltID, - &ContactEditorData.FreeBusyListPID, - &ContactEditorData.FreeBusyListType, - &ContactEditorData.FreeBusyListTokens, - &ContactEditorData.FreeBusyListPref, - lboFreeBusyAddresses, - (intValueSeek)); - frameCECalAdr->ShowModal(); - delete frameCECalAdr; - frameCECalAdr = NULL; + + int intResult = 0; + + frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); + frameCECalAdr->SetEditorMode(FALSE); + intResult = GetLastInt(&ContactEditorData.FreeBusyList); + frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList, + &ContactEditorData.FreeBusyListAltID, + &ContactEditorData.FreeBusyListPID, + &ContactEditorData.FreeBusyListType, + &ContactEditorData.FreeBusyListTokens, + &ContactEditorData.FreeBusyListPref, + lboFreeBusyAddresses, + (intValueSeek)); + frameCECalAdr->ShowModal(); + delete frameCECalAdr; + frameCECalAdr = NULL; + } void frmContactEditor::ModifyFreeBusy( wxCommandEvent& event ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!GetSelectedItem(lboFreeBusyAddresses, - &longSelected, - &intSelectedData)){ - return; - } - - frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); - frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList, - &ContactEditorData.FreeBusyListAltID, - &ContactEditorData.FreeBusyListPID, - &ContactEditorData.FreeBusyListType, - &ContactEditorData.FreeBusyListTokens, - &ContactEditorData.FreeBusyListPref, - lboFreeBusyAddresses, - intSelectedData); - frameCECalAdr->SetEditorMode(TRUE); - frameCECalAdr->ShowModal(); - delete frameCECalAdr; - frameCECalAdr = NULL; + + long longSelected = -1; + int intSelectedData = 0; + + if (!GetSelectedItem(lboFreeBusyAddresses, + &longSelected, + &intSelectedData)){ + + return; + + } + + frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); + frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList, + &ContactEditorData.FreeBusyListAltID, + &ContactEditorData.FreeBusyListPID, + &ContactEditorData.FreeBusyListType, + &ContactEditorData.FreeBusyListTokens, + &ContactEditorData.FreeBusyListPref, + lboFreeBusyAddresses, + intSelectedData); + frameCECalAdr->SetEditorMode(TRUE); + frameCECalAdr->ShowModal(); + delete frameCECalAdr; + frameCECalAdr = NULL; + } void frmContactEditor::DeleteFreeBusy( wxCommandEvent& event ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!GetSelectedItem(lboFreeBusyAddresses, - &longSelected, - &intSelectedData)){ - return; - } - - lboFreeBusyAddresses->DeleteItem(longSelected); - - DeleteMapData(intSelectedData, &ContactEditorData.FreeBusyList, &ContactEditorData.FreeBusyListAltID, - &ContactEditorData.FreeBusyListPID, &ContactEditorData.FreeBusyListType, &ContactEditorData.FreeBusyListTokens, - &ContactEditorData.FreeBusyListPref); + + long longSelected = -1; + int intSelectedData = 0; + + if (!GetSelectedItem(lboFreeBusyAddresses, + &longSelected, + &intSelectedData)){ + + return; + + } + + lboFreeBusyAddresses->DeleteItem(longSelected); + + DeleteMapData(intSelectedData, &ContactEditorData.FreeBusyList, &ContactEditorData.FreeBusyListAltID, + &ContactEditorData.FreeBusyListPID, &ContactEditorData.FreeBusyListType, &ContactEditorData.FreeBusyListTokens, + &ContactEditorData.FreeBusyListPref); } -- 2.39.5