summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-13 06:21:52 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-13 06:21:53 -0700
commitf786c267e290c259b38afe900b8abd23812a575b (patch)
treefd251e4c6a5ad207c65a9bc432f365dbf0334983 /core/fpdfdoc
parent9de00fdc4d4e4dba9e754b337a05809482e4fea2 (diff)
downloadpdfium-f786c267e290c259b38afe900b8abd23812a575b.tar.xz
Make ipdf_formnotify a pure virtual interface
Removes some unused code for the default implementation, Review-Url: https://codereview.chromium.org/2332983002
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/include/ipdf_formnotify.h20
-rw-r--r--core/fpdfdoc/ipdf_formnotify.cpp37
2 files changed, 10 insertions, 47 deletions
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) {}