summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-19 14:14:48 -0700
committerLei Zhang <thestig@chromium.org>2015-10-19 14:14:48 -0700
commit9ddafc82bddb984ae46ee0df801ba20b446d5158 (patch)
treef33eb91c89cb3534dc72b76843b54609abafaf36 /fpdfsdk/src/pdfwindow/PWL_Edit.cpp
parent6d34d056a7188b7ae9800fe3ceb68645e0442879 (diff)
downloadpdfium-9ddafc82bddb984ae46ee0df801ba20b446d5158.tar.xz
Remove dead code that was reactivated when fixing overrides.chromium/2545chromium/2544chromium/2543chromium/2542chromium/2541
BUG=pdfium:205 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1409743004 .
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_Edit.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Edit.cpp51
1 files changed, 10 insertions, 41 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index 3271c80fdb..8e45060ea9 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -163,7 +163,7 @@ void CPWL_Edit::PasteText() {
int nSelStart = 0;
int nSelEnd = 0;
GetSel(nSelStart, nSelEnd);
- m_pFillerNotify->OnBeforeKeyStroke(TRUE, GetAttachedData(), 0, swClipboard,
+ m_pFillerNotify->OnBeforeKeyStroke(GetAttachedData(), swClipboard,
strChangeEx, nSelStart, nSelEnd, TRUE,
bRC, bExit, 0);
if (!bRC)
@@ -176,13 +176,6 @@ void CPWL_Edit::PasteText() {
Clear();
InsertText(swClipboard.c_str());
}
-
- if (m_pFillerNotify) {
- FX_BOOL bExit = FALSE;
- m_pFillerNotify->OnAfterKeyStroke(TRUE, GetAttachedData(), bExit, 0);
- if (bExit)
- return;
- }
}
void CPWL_Edit::CutText() {
@@ -883,9 +876,9 @@ FX_BOOL CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
if (nSelStart == nSelEnd)
nSelEnd = nSelStart + 1;
- m_pFillerNotify->OnBeforeKeyStroke(
- TRUE, GetAttachedData(), FWL_VKEY_Delete, strChange, strChangeEx,
- nSelStart, nSelEnd, TRUE, bRC, bExit, nFlag);
+ m_pFillerNotify->OnBeforeKeyStroke(GetAttachedData(), strChange,
+ strChangeEx, nSelStart, nSelEnd, TRUE,
+ bRC, bExit, nFlag);
if (!bRC)
return FALSE;
if (bExit)
@@ -895,15 +888,6 @@ FX_BOOL CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
FX_BOOL bRet = CPWL_EditCtrl::OnKeyDown(nChar, nFlag);
- if (nChar == FWL_VKEY_Delete) {
- if (m_pFillerNotify) {
- FX_BOOL bExit = FALSE;
- m_pFillerNotify->OnAfterKeyStroke(TRUE, GetAttachedData(), bExit, nFlag);
- if (bExit)
- return FALSE;
- }
- }
-
// In case of implementation swallow the OnKeyDown event.
if (IsProceedtoOnChar(nChar, nFlag))
return TRUE;
@@ -940,9 +924,8 @@ FX_BOOL CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag) {
case FWL_VKEY_Space:
return TRUE;
default:
- break;
+ return FALSE;
}
- return FALSE;
}
FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
@@ -952,11 +935,9 @@ FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
FX_BOOL bRC = TRUE;
FX_BOOL bExit = FALSE;
- FX_BOOL bCtrl = IsCTRLpressed(nFlag);
- if (!bCtrl) {
+ if (!IsCTRLpressed(nFlag)) {
if (m_pFillerNotify) {
CFX_WideString swChange;
- int32_t nKeyCode;
int nSelStart = 0;
int nSelEnd = 0;
@@ -964,23 +945,20 @@ FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
switch (nChar) {
case FWL_VKEY_Back:
- nKeyCode = nChar;
if (nSelStart == nSelEnd)
nSelStart = nSelEnd - 1;
break;
case FWL_VKEY_Return:
- nKeyCode = nChar;
break;
default:
- nKeyCode = 0;
swChange += nChar;
break;
}
CFX_WideString strChangeEx;
- m_pFillerNotify->OnBeforeKeyStroke(TRUE, GetAttachedData(), nKeyCode,
- swChange, strChangeEx, nSelStart,
- nSelEnd, TRUE, bRC, bExit, nFlag);
+ m_pFillerNotify->OnBeforeKeyStroke(GetAttachedData(), swChange,
+ strChangeEx, nSelStart, nSelEnd, TRUE,
+ bRC, bExit, nFlag);
}
}
@@ -996,17 +974,8 @@ FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
SetCharSet(nNewCharSet);
}
}
- FX_BOOL bRet = CPWL_EditCtrl::OnChar(nChar, nFlag);
-
- if (!bCtrl) {
- if (m_pFillerNotify) {
- m_pFillerNotify->OnAfterKeyStroke(TRUE, GetAttachedData(), bExit, nFlag);
- if (bExit)
- return FALSE;
- }
- }
- return bRet;
+ return CPWL_EditCtrl::OnChar(nChar, nFlag);
}
FX_BOOL CPWL_Edit::OnMouseWheel(short zDelta,