summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker/src/ardialog.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-12-12 18:28:12 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-12-12 18:28:12 +0000
commit02899659835bd6352f42a90a344b1de896f6a6a8 (patch)
tree7180775a9005a3f10d7f208129c3f831c558917a /plugins/SpellChecker/src/ardialog.cpp
parent4e02f499326971bce39ee041f336043431ad3913 (diff)
SpellChecker: changed warning lavel to w4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11354 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src/ardialog.cpp')
-rw-r--r--plugins/SpellChecker/src/ardialog.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/plugins/SpellChecker/src/ardialog.cpp b/plugins/SpellChecker/src/ardialog.cpp
index 1bf94a01f6..720f64a27b 100644
--- a/plugins/SpellChecker/src/ardialog.cpp
+++ b/plugins/SpellChecker/src/ardialog.cpp
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2006-2010 Ricardo Pescuma Domenecci
This is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this file; see the file license.txt. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
+Boston, MA 02111-1307, USA.
*/
#include "commons.h"
@@ -36,7 +36,7 @@ struct Data
void *param;
};
-BOOL ShowAutoReplaceDialog(HWND parent, BOOL modal,
+BOOL ShowAutoReplaceDialog(HWND parent, BOOL modal,
Dictionary *dict, const TCHAR *find, const TCHAR *replace, BOOL useVariables,
BOOL findReadOnly, AutoReplaceDialogCallback callback, void *param)
{
@@ -68,9 +68,9 @@ BOOL ShowAutoReplaceDialog(HWND parent, BOOL modal,
static LRESULT CALLBACK OnlyCharsEditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- Data *data = (Data *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ Data *data = (Data *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
- switch(msg) {
+ switch (msg) {
case WM_CHAR:
if (wParam == VK_BACK)
break;
@@ -79,7 +79,7 @@ static LRESULT CALLBACK OnlyCharsEditProc(HWND hwnd, UINT msg, WPARAM wParam, LP
if (GetKeyState(VK_CONTROL) & 0x8000) // CTRL key
break;
{
- TCHAR c = (TCHAR) wParam;
+ TCHAR c = (TCHAR)wParam;
if (!data->dict->autoReplace->isWordChar(c))
return 1;
@@ -93,7 +93,7 @@ static LRESULT CALLBACK OnlyCharsEditProc(HWND hwnd, UINT msg, WPARAM wParam, LP
LRESULT ret = mir_callNextSubclass(hwnd, OnlyCharsEditProc, msg, wParam, lParam);
- switch(msg) {
+ switch (msg) {
case EM_PASTESPECIAL:
case WM_PASTE:
TCHAR text[256];
@@ -197,8 +197,8 @@ static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa
rc_new.right = rc_old.right;
SetWindowPos(GetDlgItem(hwndDlg, IDC_NEW), NULL, 0, 0,
- rc_new.right - rc_new.left, rc_new.bottom - rc_new.top,
- SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOREDRAW | SWP_NOZORDER);
+ rc_new.right - rc_new.left, rc_new.bottom - rc_new.top,
+ SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOREDRAW | SWP_NOZORDER);
}
else {
variables_skin_helpbutton(hwndDlg, IDC_VAR_HELP);
@@ -212,38 +212,38 @@ static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa
case WM_COMMAND:
switch (wParam) {
case IDOK:
- {
- Data *data = (Data *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- TCHAR find[256];
- if (data->findReadOnly)
- mir_tstrncpy(find, data->find.c_str(), SIZEOF(find));
- else {
- GetDlgItemText(hwndDlg, IDC_OLD, find, SIZEOF(find));
- lstrtrim(find);
- }
-
- TCHAR replace[256];
- GetDlgItemText(hwndDlg, IDC_NEW, replace, SIZEOF(replace));
- lstrtrim(replace);
-
- if (!data->findReadOnly && find[0] == 0)
- MessageBox(hwndDlg, TranslateT("The wrong word can't be empty!"), TranslateT("Wrong Correction"), MB_OK | MB_ICONERROR);
-
- else if (replace[0] == 0)
- MessageBox(hwndDlg, TranslateT("The correction can't be empty!"), TranslateT("Wrong Correction"), MB_OK | MB_ICONERROR);
-
- else if (_tcscmp(find, replace) == 0)
- MessageBox(hwndDlg, TranslateT("The correction can't be equal to the wrong word!"), TranslateT("Wrong Correction"), MB_OK | MB_ICONERROR);
-
- else {
- data->callback(FALSE, data->dict,
- find, replace, IsDlgButtonChecked(hwndDlg, IDC_VARIABLES),
- data->find.c_str(), data->param);
- Close(hwndDlg, 1);
- }
+ {
+ Data *data = (Data *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+
+ TCHAR find[256];
+ if (data->findReadOnly)
+ mir_tstrncpy(find, data->find.c_str(), SIZEOF(find));
+ else {
+ GetDlgItemText(hwndDlg, IDC_OLD, find, SIZEOF(find));
+ lstrtrim(find);
}
- break;
+
+ TCHAR replace[256];
+ GetDlgItemText(hwndDlg, IDC_NEW, replace, SIZEOF(replace));
+ lstrtrim(replace);
+
+ if (!data->findReadOnly && find[0] == 0)
+ MessageBox(hwndDlg, TranslateT("The wrong word can't be empty!"), TranslateT("Wrong Correction"), MB_OK | MB_ICONERROR);
+
+ else if (replace[0] == 0)
+ MessageBox(hwndDlg, TranslateT("The correction can't be empty!"), TranslateT("Wrong Correction"), MB_OK | MB_ICONERROR);
+
+ else if (_tcscmp(find, replace) == 0)
+ MessageBox(hwndDlg, TranslateT("The correction can't be equal to the wrong word!"), TranslateT("Wrong Correction"), MB_OK | MB_ICONERROR);
+
+ else {
+ data->callback(FALSE, data->dict,
+ find, replace, IsDlgButtonChecked(hwndDlg, IDC_VARIABLES),
+ data->find.c_str(), data->param);
+ Close(hwndDlg, 1);
+ }
+ }
+ break;
case IDCANCEL:
Close(hwndDlg, 0);