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

Side by Side Diff: fpdfsdk/src/pdfwindow/PWL_ListBox.cpp

Issue 1409743004: Remove dead code that was reactivated when fixing overrides. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 5 years, 2 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
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_Edit.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "../../include/pdfwindow/PDFWindow.h" 7 #include "../../include/pdfwindow/PDFWindow.h"
8 #include "../../include/pdfwindow/PWL_Wnd.h" 8 #include "../../include/pdfwindow/PWL_Wnd.h"
9 #include "../../include/pdfwindow/PWL_ListBox.h" 9 #include "../../include/pdfwindow/PWL_ListBox.h"
10 #include "../../include/pdfwindow/PWL_Utils.h" 10 #include "../../include/pdfwindow/PWL_Utils.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 void CPWL_ListBox::RePosChildWnd() { 367 void CPWL_ListBox::RePosChildWnd() {
368 CPWL_Wnd::RePosChildWnd(); 368 CPWL_Wnd::RePosChildWnd();
369 369
370 if (m_pList) 370 if (m_pList)
371 m_pList->SetPlateRect(GetListRect()); 371 m_pList->SetPlateRect(GetListRect());
372 } 372 }
373 373
374 void CPWL_ListBox::OnNotifySelChanged(FX_BOOL bKeyDown, 374 void CPWL_ListBox::OnNotifySelChanged(FX_BOOL bKeyDown,
375 FX_BOOL& bExit, 375 FX_BOOL& bExit,
376 FX_DWORD nFlag) { 376 FX_DWORD nFlag) {
377 if (m_pFillerNotify) { 377 if (!m_pFillerNotify)
378 FX_BOOL bRC = TRUE; 378 return;
379 CFX_WideString swChange = GetText();
380 CFX_WideString strChangeEx;
381 int nSelStart = 0;
382 int nSelEnd = swChange.GetLength();
383 m_pFillerNotify->OnBeforeKeyStroke(FALSE, GetAttachedData(), 0, swChange,
384 strChangeEx, nSelStart, nSelEnd,
385 bKeyDown, bRC, bExit, nFlag);
386 if (bExit)
387 return;
388 379
389 m_pFillerNotify->OnAfterKeyStroke(FALSE, GetAttachedData(), bExit, nFlag); 380 FX_BOOL bRC = TRUE;
390 } 381 CFX_WideString swChange = GetText();
382 CFX_WideString strChangeEx;
383 int nSelStart = 0;
384 int nSelEnd = swChange.GetLength();
385 m_pFillerNotify->OnBeforeKeyStroke(GetAttachedData(), swChange, strChangeEx,
386 nSelStart, nSelEnd, bKeyDown, bRC, bExit,
387 nFlag);
391 } 388 }
392 389
393 CPDF_Rect CPWL_ListBox::GetFocusRect() const { 390 CPDF_Rect CPWL_ListBox::GetFocusRect() const {
394 if (m_pList && m_pList->IsMultipleSel()) { 391 if (m_pList && m_pList->IsMultipleSel()) {
395 CPDF_Rect rcCaret = m_pList->GetItemRect(m_pList->GetCaret()); 392 CPDF_Rect rcCaret = m_pList->GetItemRect(m_pList->GetCaret());
396 rcCaret.Intersect(GetClientRect()); 393 rcCaret.Intersect(GetClientRect());
397 return rcCaret; 394 return rcCaret;
398 } 395 }
399 396
400 return CPWL_Wnd::GetFocusRect(); 397 return CPWL_Wnd::GetFocusRect();
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 if (zDelta < 0) { 530 if (zDelta < 0) {
534 m_pList->OnVK_DOWN(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag)); 531 m_pList->OnVK_DOWN(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag));
535 } else { 532 } else {
536 m_pList->OnVK_UP(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag)); 533 m_pList->OnVK_UP(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag));
537 } 534 }
538 535
539 FX_BOOL bExit = FALSE; 536 FX_BOOL bExit = FALSE;
540 OnNotifySelChanged(FALSE, bExit, nFlag); 537 OnNotifySelChanged(FALSE, bExit, nFlag);
541 return TRUE; 538 return TRUE;
542 } 539 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_Edit.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698