diff options
author | Lei Zhang <thestig@chromium.org> | 2017-08-01 18:34:43 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-02 19:15:00 +0000 |
commit | b4fee4d5d471475ada1d0d9110e1a534b49477ba (patch) | |
tree | 3f969af1ac350b5c884f44f3f6d755d98d911415 /fpdfsdk/formfiller/cffl_listbox.h | |
parent | db14532fb2637b34f0926b6c3a931132854f53bb (diff) | |
download | pdfium-b4fee4d5d471475ada1d0d9110e1a534b49477ba.tar.xz |
Add CFFL_TextField class.chromium/3175
This class implements common code used by several CFFL_FormFiller
sub-classes. Make those sub-classes inherit from CFFL_TextField, instead
of inheriting from CFFL_FormFiller directly and then implementing the
same functionality multiple times.
Change-Id: Iad8a735b6d6e18e89d617636b753805d3f77a286
Reviewed-on: https://pdfium-review.googlesource.com/9850
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cffl_listbox.h')
-rw-r--r-- | fpdfsdk/formfiller/cffl_listbox.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fpdfsdk/formfiller/cffl_listbox.h b/fpdfsdk/formfiller/cffl_listbox.h index 7c2713ca0f..fc06e144a7 100644 --- a/fpdfsdk/formfiller/cffl_listbox.h +++ b/fpdfsdk/formfiller/cffl_listbox.h @@ -7,20 +7,19 @@ #ifndef FPDFSDK_FORMFILLER_CFFL_LISTBOX_H_ #define FPDFSDK_FORMFILLER_CFFL_LISTBOX_H_ -#include <memory> #include <set> #include <vector> -#include "fpdfsdk/formfiller/cffl_formfiller.h" +#include "fpdfsdk/formfiller/cffl_textobject.h" class CBA_FontMap; -class CFFL_ListBox : public CFFL_FormFiller { +class CFFL_ListBox : public CFFL_TextObject { public: CFFL_ListBox(CPDFSDK_FormFillEnvironment* pApp, CPDFSDK_Widget* pWidget); ~CFFL_ListBox() override; - // CFFL_FormFiller + // CFFL_TextObject: PWL_CREATEPARAM GetCreateParam() override; CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp) override; bool OnChar(CPDFSDK_Annot* pAnnot, uint32_t nChar, uint32_t nFlags) override; @@ -31,11 +30,8 @@ class CFFL_ListBox : public CFFL_FormFiller { PDFSDK_FieldAction& fa) override; void SaveState(CPDFSDK_PageView* pPageView) override; void RestoreState(CPDFSDK_PageView* pPageView) override; - CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, - bool bRestoreValue) override; private: - std::unique_ptr<CBA_FontMap> m_pFontMap; std::set<int> m_OriginSelections; std::vector<int> m_State; }; |