summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_combo_box.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-29 17:29:06 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-29 17:29:06 +0000
commitea08d171755bd4088d01261c55d1bfe0ff0f9f39 (patch)
treeedd21e3bbde0b1bd13b067ce7682111f32f0d8e4 /fpdfsdk/pwl/cpwl_combo_box.cpp
parentb7c4a0243e82f6c4ff91cd90b5bae336100c3c70 (diff)
downloadpdfium-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_combo_box.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_combo_box.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/fpdfsdk/pwl/cpwl_combo_box.cpp b/fpdfsdk/pwl/cpwl_combo_box.cpp
index eef4496118..eefe017a5a 100644
--- a/fpdfsdk/pwl/cpwl_combo_box.cpp
+++ b/fpdfsdk/pwl/cpwl_combo_box.cpp
@@ -160,15 +160,13 @@ bool CPWL_CBButton::OnLButtonUp(const CFX_PointF& point, uint32_t nFlag) {
CPWL_ComboBox::CPWL_ComboBox(const CreateParams& cp,
std::unique_ptr<PrivateData> pAttachedData)
- : CPWL_Wnd(cp, std::move(pAttachedData)) {}
+ : CPWL_Wnd(cp, std::move(pAttachedData)) {
+ GetCreationParams()->dwFlags &= ~PWS_HSCROLL;
+ GetCreationParams()->dwFlags &= ~PWS_VSCROLL;
+}
CPWL_ComboBox::~CPWL_ComboBox() = default;
-void CPWL_ComboBox::OnCreate(CreateParams* pParamsToAdjust) {
- pParamsToAdjust->dwFlags &= ~PWS_HSCROLL;
- pParamsToAdjust->dwFlags &= ~PWS_VSCROLL;
-}
-
void CPWL_ComboBox::OnDestroy() {
// Until cleanup takes place in the virtual destructor for CPWL_Wnd
// subclasses, implement the virtual OnDestroy method that does the