From f786c267e290c259b38afe900b8abd23812a575b Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 13 Sep 2016 06:21:52 -0700 Subject: Make ipdf_formnotify a pure virtual interface Removes some unused code for the default implementation, Review-Url: https://codereview.chromium.org/2332983002 --- core/fpdfdoc/include/ipdf_formnotify.h | 20 +++++++++--------- core/fpdfdoc/ipdf_formnotify.cpp | 37 ---------------------------------- 2 files changed, 10 insertions(+), 47 deletions(-) delete mode 100644 core/fpdfdoc/ipdf_formnotify.cpp (limited to 'core') diff --git a/core/fpdfdoc/include/ipdf_formnotify.h b/core/fpdfdoc/include/ipdf_formnotify.h index 65be2df3d7..49bb84d81e 100644 --- a/core/fpdfdoc/include/ipdf_formnotify.h +++ b/core/fpdfdoc/include/ipdf_formnotify.h @@ -14,19 +14,19 @@ class CPDF_InterForm; class IPDF_FormNotify { public: - virtual ~IPDF_FormNotify(); + virtual ~IPDF_FormNotify() {} virtual int BeforeValueChange(CPDF_FormField* pField, - const CFX_WideString& csValue); - virtual void AfterValueChange(CPDF_FormField* pField); + const CFX_WideString& csValue) = 0; + virtual void AfterValueChange(CPDF_FormField* pField) = 0; virtual int BeforeSelectionChange(CPDF_FormField* pField, - const CFX_WideString& csValue); - virtual void AfterSelectionChange(CPDF_FormField* pField); - virtual void AfterCheckedStatusChange(CPDF_FormField* pField); - virtual int BeforeFormReset(CPDF_InterForm* pForm); - virtual void AfterFormReset(CPDF_InterForm* pForm); - virtual int BeforeFormImportData(CPDF_InterForm* pForm); - virtual void AfterFormImportData(CPDF_InterForm* pForm); + const CFX_WideString& csValue) = 0; + virtual void AfterSelectionChange(CPDF_FormField* pField) = 0; + virtual void AfterCheckedStatusChange(CPDF_FormField* pField) = 0; + virtual int BeforeFormReset(CPDF_InterForm* pForm) = 0; + virtual void AfterFormReset(CPDF_InterForm* pForm) = 0; + virtual int BeforeFormImportData(CPDF_InterForm* pForm) = 0; + virtual void AfterFormImportData(CPDF_InterForm* pForm) = 0; }; #endif // CORE_FPDFDOC_INCLUDE_IPDF_FORMNOTIFY_H_ diff --git a/core/fpdfdoc/ipdf_formnotify.cpp b/core/fpdfdoc/ipdf_formnotify.cpp deleted file mode 100644 index b36419d0e0..0000000000 --- a/core/fpdfdoc/ipdf_formnotify.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#include "core/fpdfdoc/include/ipdf_formnotify.h" - -IPDF_FormNotify::~IPDF_FormNotify() {} - -int IPDF_FormNotify::BeforeValueChange(CPDF_FormField* pField, - const CFX_WideString& csValue) { - return 0; -} - -void IPDF_FormNotify::AfterValueChange(CPDF_FormField* pField) {} - -int IPDF_FormNotify::BeforeSelectionChange(CPDF_FormField* pField, - const CFX_WideString& csValue) { - return 0; -} - -void IPDF_FormNotify::AfterSelectionChange(CPDF_FormField* pField) {} - -void IPDF_FormNotify::AfterCheckedStatusChange(CPDF_FormField* pField) {} - -int IPDF_FormNotify::BeforeFormReset(CPDF_InterForm* pForm) { - return 0; -} - -void IPDF_FormNotify::AfterFormReset(CPDF_InterForm* pForm) {} - -int IPDF_FormNotify::BeforeFormImportData(CPDF_InterForm* pForm) { - return 0; -} - -void IPDF_FormNotify::AfterFormImportData(CPDF_InterForm* pForm) {} -- cgit v1.2.3