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

Side by Side Diff: xfa/fxfa/app/xfa_ffbarcode.cpp

Issue 2422303003: Remove FWL Create methods, use new instead (Closed)
Patch Set: Review fixes Created 4 years, 2 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 | « xfa/fwl/lightwidget/cfwl_pushbutton.cpp ('k') | xfa/fxfa/app/xfa_ffcheckbutton.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 "xfa/fxfa/app/xfa_ffbarcode.h" 7 #include "xfa/fxfa/app/xfa_ffbarcode.h"
8 8
9 #include "core/fxcrt/fx_ext.h" 9 #include "core/fxcrt/fx_ext.h"
10 #include "xfa/fwl/core/fwl_noteimp.h" 10 #include "xfa/fwl/core/fwl_noteimp.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 return nullptr; 114 return nullptr;
115 } 115 }
116 116
117 } // namespace. 117 } // namespace.
118 118
119 CXFA_FFBarcode::CXFA_FFBarcode(CXFA_FFPageView* pPageView, 119 CXFA_FFBarcode::CXFA_FFBarcode(CXFA_FFPageView* pPageView,
120 CXFA_WidgetAcc* pDataAcc) 120 CXFA_WidgetAcc* pDataAcc)
121 : CXFA_FFTextEdit(pPageView, pDataAcc) {} 121 : CXFA_FFTextEdit(pPageView, pDataAcc) {}
122 CXFA_FFBarcode::~CXFA_FFBarcode() {} 122 CXFA_FFBarcode::~CXFA_FFBarcode() {}
123 FX_BOOL CXFA_FFBarcode::LoadWidget() { 123 FX_BOOL CXFA_FFBarcode::LoadWidget() {
124 CFWL_Barcode* pFWLBarcode = CFWL_Barcode::Create(); 124 CFWL_Barcode* pFWLBarcode = new CFWL_Barcode;
125 if (pFWLBarcode) { 125 pFWLBarcode->Initialize();
126 pFWLBarcode->Initialize(); 126
127 }
128 m_pNormalWidget = pFWLBarcode; 127 m_pNormalWidget = pFWLBarcode;
129 m_pNormalWidget->SetLayoutItem(this); 128 m_pNormalWidget->SetLayoutItem(this);
130 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); 129 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget();
131 CFWL_NoteDriver* pNoteDriver = FWL_GetApp()->GetNoteDriver(); 130 CFWL_NoteDriver* pNoteDriver = FWL_GetApp()->GetNoteDriver();
132 pNoteDriver->RegisterEventTarget(pWidget, pWidget); 131 pNoteDriver->RegisterEventTarget(pWidget, pWidget);
133 m_pOldDelegate = m_pNormalWidget->SetDelegate(this); 132 m_pOldDelegate = m_pNormalWidget->SetDelegate(this);
134 m_pNormalWidget->LockUpdate(); 133 m_pNormalWidget->LockUpdate();
135 CFX_WideString wsText; 134 CFX_WideString wsText;
136 m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display); 135 m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display);
137 pFWLBarcode->SetText(wsText); 136 pFWLBarcode->SetText(wsText);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 234 }
236 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, 235 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags,
237 FX_FLOAT fx, 236 FX_FLOAT fx,
238 FX_FLOAT fy) { 237 FX_FLOAT fy) {
239 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; 238 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget;
240 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { 239 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) {
241 return FALSE; 240 return FALSE;
242 } 241 }
243 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); 242 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy);
244 } 243 }
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_pushbutton.cpp ('k') | xfa/fxfa/app/xfa_ffcheckbutton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698