diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-29 17:29:06 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-29 17:29:06 +0000 |
commit | ea08d171755bd4088d01261c55d1bfe0ff0f9f39 (patch) | |
tree | edd21e3bbde0b1bd13b067ce7682111f32f0d8e4 /fpdfsdk/pwl/cpwl_edit_ctrl.cpp | |
parent | b7c4a0243e82f6c4ff91cd90b5bae336100c3c70 (diff) | |
download | pdfium-ea08d171755bd4088d01261c55d1bfe0ff0f9f39.tar.xz |
Fold virtual CPWL_Wnd::OnCreate into subclass constructors.
All they do is twiddle their own CreateParameters. Since we
now have the create paramters earlier, we need not have a
special method for this.
Change-Id: I5b94c578275c71516afb87bd085f5fb58b3962e2
Reviewed-on: https://pdfium-review.googlesource.com/c/44730
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_edit_ctrl.cpp')
-rw-r--r-- | fpdfsdk/pwl/cpwl_edit_ctrl.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fpdfsdk/pwl/cpwl_edit_ctrl.cpp b/fpdfsdk/pwl/cpwl_edit_ctrl.cpp index 1b398a66c6..af74213a4b 100644 --- a/fpdfsdk/pwl/cpwl_edit_ctrl.cpp +++ b/fpdfsdk/pwl/cpwl_edit_ctrl.cpp @@ -21,16 +21,15 @@ CPWL_EditCtrl::CPWL_EditCtrl(const CreateParams& cp, std::unique_ptr<PrivateData> pAttachedData) : CPWL_Wnd(cp, std::move(pAttachedData)), - m_pEdit(pdfium::MakeUnique<CPWL_EditImpl>()) {} + m_pEdit(pdfium::MakeUnique<CPWL_EditImpl>()) { + GetCreationParams()->eCursorType = FXCT_VBEAM; +} CPWL_EditCtrl::~CPWL_EditCtrl() = default; -void CPWL_EditCtrl::OnCreate(CreateParams* pParamsToAdjust) { - pParamsToAdjust->eCursorType = FXCT_VBEAM; -} void CPWL_EditCtrl::OnCreated() { - SetFontSize(GetCreationParams().fFontSize); + SetFontSize(GetCreationParams()->fFontSize); m_pEdit->SetFontMap(GetFontMap()); m_pEdit->SetNotify(this); m_pEdit->Initialize(); |