Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: fpdfsdk/pdfwindow/PWL_EditCtrl.cpp

Issue 1960043003: Fix some misc nits. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h" 7 #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h"
8 8
9 #include "core/fpdfdoc/include/cpvt_section.h" 9 #include "core/fpdfdoc/include/cpvt_section.h"
10 #include "core/fpdfdoc/include/cpvt_word.h" 10 #include "core/fpdfdoc/include/cpvt_word.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 case 'A': 166 case 'A':
167 case 'Z': 167 case 'Z':
168 case 'c': 168 case 'c':
169 case 'v': 169 case 'v':
170 case 'x': 170 case 'x':
171 case 'a': 171 case 'a':
172 case 'z': 172 case 'z':
173 break; 173 break;
174 } 174 }
175 175
176 if (nChar == FWL_VKEY_Delete) { 176 if (nChar == FWL_VKEY_Delete && m_pEdit->IsSelected())
177 if (m_pEdit->IsSelected()) 177 nChar = FWL_VKEY_Unknown;
178 nChar = FWL_VKEY_Unknown;
179 }
180 178
181 switch (nChar) { 179 switch (nChar) {
182 case FWL_VKEY_Delete: 180 case FWL_VKEY_Delete:
183 Delete(); 181 Delete();
184 return TRUE; 182 return TRUE;
185 case FWL_VKEY_Insert: 183 case FWL_VKEY_Insert:
186 if (IsSHIFTpressed(nFlag)) 184 if (IsSHIFTpressed(nFlag))
187 PasteText(); 185 PasteText();
188 return TRUE; 186 return TRUE;
189 case FWL_VKEY_Up: 187 case FWL_VKEY_Up:
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 CPVT_WordPlace wpEnd = m_pEdit->WordIndexToWordPlace(nEndChar); 600 CPVT_WordPlace wpEnd = m_pEdit->WordIndexToWordPlace(nEndChar);
603 return m_pEdit->GetRangeText(CPVT_WordRange(wpStart, wpEnd)); 601 return m_pEdit->GetRangeText(CPVT_WordRange(wpStart, wpEnd));
604 } 602 }
605 603
606 void CPWL_EditCtrl::SetReadyToInput() { 604 void CPWL_EditCtrl::SetReadyToInput() {
607 if (m_bMouseDown) { 605 if (m_bMouseDown) {
608 ReleaseCapture(); 606 ReleaseCapture();
609 m_bMouseDown = FALSE; 607 m_bMouseDown = FALSE;
610 } 608 }
611 } 609 }
OLDNEW
« core/fpdfdoc/cpdf_variabletext.cpp ('K') | « fpdfsdk/fxedit/fxet_pageobjs.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698