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

Side by Side Diff: fpdfsdk/src/formfiller/FFL_FormFiller.cpp

Issue 1283493004: Cleanup: Mark methods with the override keyword. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 4 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 "../../include/formfiller/FFL_FormFiller.h" 7 #include "../../include/formfiller/FFL_FormFiller.h"
8 #include "../../include/formfiller/FFL_Notify.h" 8 #include "../../include/formfiller/FFL_Notify.h"
9 #include "../../include/formfiller/FFL_CBA_Fontmap.h" 9 #include "../../include/formfiller/FFL_CBA_Fontmap.h"
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 ASSERT(pPageView != NULL); 235 ASSERT(pPageView != NULL);
236 236
237 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) { 237 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) {
238 return pWnd->OnChar(nChar, nFlags); 238 return pWnd->OnChar(nChar, nFlags);
239 } 239 }
240 } 240 }
241 241
242 return FALSE; 242 return FALSE;
243 } 243 }
244 244
245 FX_BOOL CFFL_FormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) { 245 FX_BOOL CFFL_FormFiller::SetFocusForAnnot(CPDFSDK_Annot* pAnnot,
246 FX_UINT nFlag) {
246 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; 247 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
247 CPDF_Page* pPage = pWidget->GetPDFPage(); 248 CPDF_Page* pPage = pWidget->GetPDFPage();
248 CPDFSDK_Document* pDoc = m_pApp->GetSDKDocument(); 249 CPDFSDK_Document* pDoc = m_pApp->GetSDKDocument();
249 CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage); 250 CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage);
250 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE)) 251 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
251 pWnd->SetFocus(); 252 pWnd->SetFocus();
252 253
253 m_bValid = TRUE; 254 m_bValid = TRUE;
254 FX_RECT rcRect = GetViewBBox(pPageView, pAnnot); 255 FX_RECT rcRect = GetViewBBox(pPageView, pAnnot);
255 InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom); 256 InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom);
256 return TRUE; 257 return TRUE;
257 } 258 }
258 259
259 FX_BOOL CFFL_FormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) { 260 FX_BOOL CFFL_FormFiller::KillFocusForAnnot(CPDFSDK_Annot* pAnnot,
261 FX_UINT nFlag) {
260 if (!IsValid()) 262 if (!IsValid())
261 return TRUE; 263 return TRUE;
262 264
263 CPDFSDK_PageView* pPageView = GetCurPageView(); 265 CPDFSDK_PageView* pPageView = GetCurPageView();
264 CommitData(pPageView, nFlag); 266 CommitData(pPageView, nFlag);
265 267
266 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) 268 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
267 pWnd->KillFocus(); 269 pWnd->KillFocus();
268 270
269 switch (m_pWidget->GetFieldType()) { 271 switch (m_pWidget->GetFieldType()) {
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 FX_BOOL bRestoreValue) { 592 FX_BOOL bRestoreValue) {
591 return GetPDFWindow(pPageView, FALSE); 593 return GetPDFWindow(pPageView, FALSE);
592 } 594 }
593 595
594 void CFFL_FormFiller::TimerProc() {} 596 void CFFL_FormFiller::TimerProc() {}
595 597
596 IFX_SystemHandler* CFFL_FormFiller::GetSystemHandler() const { 598 IFX_SystemHandler* CFFL_FormFiller::GetSystemHandler() const {
597 return m_pApp->GetSysHandler(); 599 return m_pApp->GetSysHandler();
598 } 600 }
599 601
600 void CFFL_FormFiller::OnKeyStroke(FX_BOOL bKeyDown) {} 602 void CFFL_FormFiller::OnKeyStroke(FX_BOOL bKeyDown, FX_DWORD nFlag) {}
601 603
602 void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView, 604 void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView,
603 FX_BOOL bDestroyPDFWindow) { 605 FX_BOOL bDestroyPDFWindow) {
604 m_bValid = FALSE; 606 m_bValid = FALSE;
605 607
606 FX_RECT rcRect = GetViewBBox(pPageView, m_pWidget); 608 FX_RECT rcRect = GetViewBBox(pPageView, m_pWidget);
607 InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom); 609 InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom);
608 610
609 if (bDestroyPDFWindow) 611 if (bDestroyPDFWindow)
610 DestroyPDFWindow(pPageView); 612 DestroyPDFWindow(pPageView);
611 } 613 }
612 614
613 FX_BOOL CFFL_FormFiller::CanCopy(CPDFSDK_Document* pDocument) {
614 return FALSE;
615 }
616
617 FX_BOOL CFFL_FormFiller::CanCut(CPDFSDK_Document* pDocument) {
618 return FALSE;
619 }
620
621 FX_BOOL CFFL_FormFiller::CanPaste(CPDFSDK_Document* pDocument) {
622 return FALSE;
623 }
624
625 void CFFL_FormFiller::DoCopy(CPDFSDK_Document* pDocument) {}
626
627 void CFFL_FormFiller::DoCut(CPDFSDK_Document* pDocument) {}
628
629 void CFFL_FormFiller::DoPaste(CPDFSDK_Document* pDocument) {}
630
631 void CFFL_FormFiller::InvalidateRect(double left, 615 void CFFL_FormFiller::InvalidateRect(double left,
632 double top, 616 double top,
633 double right, 617 double right,
634 double bottom) { 618 double bottom) {
635 CPDF_Page* pPage = m_pWidget->GetPDFPage(); 619 CPDF_Page* pPage = m_pWidget->GetPDFPage();
636 m_pApp->FFI_Invalidate(pPage, left, top, right, bottom); 620 m_pApp->FFI_Invalidate(pPage, left, top, right, bottom);
637 } 621 }
638 622
639 /* ------------------------- CFFL_Button ------------------------- */ 623 /* ------------------------- CFFL_Button ------------------------- */
640 624
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); 715 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
732 } 716 }
733 717
734 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, 718 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView,
735 CPDFSDK_Annot* pAnnot, 719 CPDFSDK_Annot* pAnnot,
736 CFX_RenderDevice* pDevice, 720 CFX_RenderDevice* pDevice,
737 CPDF_Matrix* pUser2Device, 721 CPDF_Matrix* pUser2Device,
738 FX_DWORD dwFlags) { 722 FX_DWORD dwFlags) {
739 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); 723 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags);
740 } 724 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698