diff options
author | dan sinclair <dsinclair@chromium.org> | 2018-03-08 15:14:09 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-03-08 15:14:09 +0000 |
commit | 507fb4ed09d5fbc92fafdfe405d79d44d11a4664 (patch) | |
tree | 136d003fdefa3ad7fd707af180c161713108ffd2 /fpdfsdk/cpdfsdk_interform.h | |
parent | f19255a1deec5f3ce804b08901abf7746e609bfe (diff) | |
download | pdfium-507fb4ed09d5fbc92fafdfe405d79d44d11a4664.tar.xz |
Convert Before{Selection|Value}Change to return a boolchromium/3366
Both of these IPDF_FormNotify methods return {-1, 0, 1} but all
callsites only care about < 0 and >= 0. Convert to return a bool that
treats the 0 and 1 case as the same.
This also makse sense in terms of the API because false means validation
failure. The case where 0 was used was a place holder for we didn't try
for this field type, which also implicitly means validation passed.
Change-Id: I0950c678191b83caffd755d4a87b2f0efee71c89
Reviewed-on: https://pdfium-review.googlesource.com/28192
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_interform.h')
-rw-r--r-- | fpdfsdk/cpdfsdk_interform.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.h b/fpdfsdk/cpdfsdk_interform.h index 893b60168b..58dc2d0993 100644 --- a/fpdfsdk/cpdfsdk_interform.h +++ b/fpdfsdk/cpdfsdk_interform.h @@ -102,11 +102,11 @@ class CPDFSDK_InterForm : public IPDF_FormNotify { private: // IPDF_FormNotify: - int BeforeValueChange(CPDF_FormField* pField, - const WideString& csValue) override; + bool BeforeValueChange(CPDF_FormField* pField, + const WideString& csValue) override; void AfterValueChange(CPDF_FormField* pField) override; - int BeforeSelectionChange(CPDF_FormField* pField, - const WideString& csValue) override; + bool BeforeSelectionChange(CPDF_FormField* pField, + const WideString& csValue) override; void AfterSelectionChange(CPDF_FormField* pField) override; void AfterCheckedStatusChange(CPDF_FormField* pField) override; void AfterFormReset(CPDF_InterForm* pForm) override; |