summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_interform.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-10 18:38:03 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-10 18:38:03 +0000
commit461acb276e1c38c9ebb3546c5b3254fa5cf9c585 (patch)
tree1680a982413c0fc199af16392772e261fec97a71 /fpdfsdk/cpdfsdk_interform.h
parent8d8d3bc54593d2d86054d59669b86a959ec0b602 (diff)
downloadpdfium-461acb276e1c38c9ebb3546c5b3254fa5cf9c585.tar.xz
Remove impossible nullptr checks in CPDFSDK_InterForm.
Also remove dead code and move initialization to headers in CPDFSDK_InterForm. Change-Id: Ib75864ccfd3f1d0d255d9c7942cc610edce822a3 Reviewed-on: https://pdfium-review.googlesource.com/c/43599 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_interform.h')
-rw-r--r--fpdfsdk/cpdfsdk_interform.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.h b/fpdfsdk/cpdfsdk_interform.h
index bd1a76087e..1862fdbe2c 100644
--- a/fpdfsdk/cpdfsdk_interform.h
+++ b/fpdfsdk/cpdfsdk_interform.h
@@ -39,8 +39,6 @@ class CPDFSDK_InterForm final : public IPDF_FormNotify {
return m_pFormFillEnv.Get();
}
- bool HighlightWidgets();
-
CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, bool bNext) const;
CPDFSDK_Widget* GetWidget(CPDF_FormControl* pControl) const;
void GetWidgets(const WideString& sFieldName,
@@ -92,7 +90,7 @@ class CPDFSDK_InterForm final : public IPDF_FormNotify {
const std::vector<CPDF_FormField*>& fields,
bool bIncludeOrExclude);
- bool IsNeedHighLight(FormFieldType fieldType);
+ bool IsNeedHighLight(FormFieldType fieldType) const;
void RemoveAllHighLights();
void SetHighlightAlpha(uint8_t alpha) { m_HighlightAlpha = alpha; }
uint8_t GetHighlightAlpha() { return m_HighlightAlpha; }
@@ -114,20 +112,18 @@ class CPDFSDK_InterForm final : public IPDF_FormNotify {
int GetPageIndexByAnnotDict(CPDF_Document* pDocument,
CPDF_Dictionary* pAnnotDict) const;
- using CPDFSDK_WidgetMap = std::map<CPDF_FormControl*, CPDFSDK_Widget*>;
-
- UnownedPtr<CPDFSDK_FormFillEnvironment> m_pFormFillEnv;
- std::unique_ptr<CPDF_InterForm> m_pInterForm;
- CPDFSDK_WidgetMap m_Map;
+ UnownedPtr<CPDFSDK_FormFillEnvironment> const m_pFormFillEnv;
+ std::unique_ptr<CPDF_InterForm> const m_pInterForm;
+ std::map<CPDF_FormControl*, CPDFSDK_Widget*> m_Map;
#ifdef PDF_ENABLE_XFA
std::map<CXFA_FFWidget*, CPDFSDK_XFAWidget*> m_XFAMap;
- bool m_bXfaCalculate;
- bool m_bXfaValidationsEnabled;
+ bool m_bXfaCalculate = true;
+ bool m_bXfaValidationsEnabled = true;
#endif // PDF_ENABLE_XFA
- bool m_bCalculate;
- bool m_bBusy;
+ bool m_bCalculate = true;
+ bool m_bBusy = false;
- uint8_t m_HighlightAlpha;
+ uint8_t m_HighlightAlpha = 0;
FX_COLORREF m_HighlightColor[kFormFieldTypeCount];
bool m_NeedsHighlight[kFormFieldTypeCount];
};