Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: fpdfsdk/pdfwindow/PWL_ComboBox.cpp

Issue 2031653003: Get rid of NULLs in fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_core
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_Caret.h ('k') | fpdfsdk/pdfwindow/PWL_Edit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "fpdfsdk/pdfwindow/PWL_ComboBox.h" 7 #include "fpdfsdk/pdfwindow/PWL_ComboBox.h"
8 8
9 #include "core/fxge/include/fx_ge.h" 9 #include "core/fxge/include/fx_ge.h"
10 #include "fpdfsdk/pdfwindow/PWL_Edit.h" 10 #include "fpdfsdk/pdfwindow/PWL_Edit.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 IsFloatBigger(rectWnd.top - rectWnd.bottom, 162 IsFloatBigger(rectWnd.top - rectWnd.bottom,
163 PWL_CBBUTTON_TRIANGLE_HALFLEN)) { 163 PWL_CBBUTTON_TRIANGLE_HALFLEN)) {
164 CFX_PathData path; 164 CFX_PathData path;
165 165
166 path.SetPointCount(4); 166 path.SetPointCount(4);
167 path.SetPoint(0, pt1.x, pt1.y, FXPT_MOVETO); 167 path.SetPoint(0, pt1.x, pt1.y, FXPT_MOVETO);
168 path.SetPoint(1, pt2.x, pt2.y, FXPT_LINETO); 168 path.SetPoint(1, pt2.x, pt2.y, FXPT_LINETO);
169 path.SetPoint(2, pt3.x, pt3.y, FXPT_LINETO); 169 path.SetPoint(2, pt3.x, pt3.y, FXPT_LINETO);
170 path.SetPoint(3, pt1.x, pt1.y, FXPT_LINETO); 170 path.SetPoint(3, pt1.x, pt1.y, FXPT_LINETO);
171 171
172 pDevice->DrawPath(&path, pUser2Device, NULL, 172 pDevice->DrawPath(&path, pUser2Device, nullptr,
173 CPWL_Utils::PWLColorToFXColor(PWL_DEFAULT_BLACKCOLOR, 173 CPWL_Utils::PWLColorToFXColor(PWL_DEFAULT_BLACKCOLOR,
174 GetTransparency()), 174 GetTransparency()),
175 0, FXFILL_ALTERNATE); 175 0, FXFILL_ALTERNATE);
176 } 176 }
177 } 177 }
178 } 178 }
179 179
180 FX_BOOL CPWL_CBButton::OnLButtonDown(const CFX_FloatPoint& point, 180 FX_BOOL CPWL_CBButton::OnLButtonDown(const CFX_FloatPoint& point,
181 uint32_t nFlag) { 181 uint32_t nFlag) {
182 CPWL_Wnd::OnLButtonDown(point, nFlag); 182 CPWL_Wnd::OnLButtonDown(point, nFlag);
(...skipping 11 matching lines...) Expand all
194 FX_BOOL CPWL_CBButton::OnLButtonUp(const CFX_FloatPoint& point, 194 FX_BOOL CPWL_CBButton::OnLButtonUp(const CFX_FloatPoint& point,
195 uint32_t nFlag) { 195 uint32_t nFlag) {
196 CPWL_Wnd::OnLButtonUp(point, nFlag); 196 CPWL_Wnd::OnLButtonUp(point, nFlag);
197 197
198 ReleaseCapture(); 198 ReleaseCapture();
199 199
200 return TRUE; 200 return TRUE;
201 } 201 }
202 202
203 CPWL_ComboBox::CPWL_ComboBox() 203 CPWL_ComboBox::CPWL_ComboBox()
204 : m_pEdit(NULL), 204 : m_pEdit(nullptr),
205 m_pButton(NULL), 205 m_pButton(nullptr),
206 m_pList(NULL), 206 m_pList(nullptr),
207 m_bPopup(FALSE), 207 m_bPopup(FALSE),
208 m_nPopupWhere(0), 208 m_nPopupWhere(0),
209 m_nSelectItem(-1), 209 m_nSelectItem(-1),
210 m_pFillerNotify(NULL) {} 210 m_pFillerNotify(nullptr) {}
211 211
212 CFX_ByteString CPWL_ComboBox::GetClassName() const { 212 CFX_ByteString CPWL_ComboBox::GetClassName() const {
213 return "CPWL_ComboBox"; 213 return "CPWL_ComboBox";
214 } 214 }
215 215
216 void CPWL_ComboBox::OnCreate(PWL_CREATEPARAM& cp) { 216 void CPWL_ComboBox::OnCreate(PWL_CREATEPARAM& cp) {
217 cp.dwFlags &= ~PWS_HSCROLL; 217 cp.dwFlags &= ~PWS_HSCROLL;
218 cp.dwFlags &= ~PWS_VSCROLL; 218 cp.dwFlags &= ~PWS_VSCROLL;
219 } 219 }
220 220
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 643
644 void CPWL_ComboBox::SetFillerNotify(IPWL_Filler_Notify* pNotify) { 644 void CPWL_ComboBox::SetFillerNotify(IPWL_Filler_Notify* pNotify) {
645 m_pFillerNotify = pNotify; 645 m_pFillerNotify = pNotify;
646 646
647 if (m_pEdit) 647 if (m_pEdit)
648 m_pEdit->SetFillerNotify(pNotify); 648 m_pEdit->SetFillerNotify(pNotify);
649 649
650 if (m_pList) 650 if (m_pList)
651 m_pList->SetFillerNotify(pNotify); 651 m_pList->SetFillerNotify(pNotify);
652 } 652 }
OLDNEW
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_Caret.h ('k') | fpdfsdk/pdfwindow/PWL_Edit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698