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

Side by Side Diff: xfa/src/fwl/src/lightwidget/barcode.cpp

Issue 1509203002: FWL refcounts never incremented (part 1) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: protected Created 5 years 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/src/fwl/src/core/include/fwl_targetimp.h ('k') | xfa/src/fwl/src/lightwidget/caret.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 "../../../foxitlib.h" 7 #include "../../../foxitlib.h"
8 CFWL_Barcode* CFWL_Barcode::Create() { 8 CFWL_Barcode* CFWL_Barcode::Create() {
9 return new CFWL_Barcode; 9 return new CFWL_Barcode;
10 } 10 }
11 FWL_ERR CFWL_Barcode::Initialize(const CFWL_WidgetProperties* pProperties) { 11 FWL_ERR CFWL_Barcode::Initialize(const CFWL_WidgetProperties* pProperties) {
12 if (m_pIface) 12 if (m_pIface)
13 return FWL_ERR_Indefinite; 13 return FWL_ERR_Indefinite;
14 if (pProperties) { 14 if (pProperties) {
15 *m_pProperties = *pProperties; 15 *m_pProperties = *pProperties;
16 } 16 }
17 m_pIface = IFWL_Barcode::Create(); 17 m_pIface = new IFWL_Barcode;
18 FWL_ERR ret = 18 FWL_ERR ret =
19 ((IFWL_Barcode*)m_pIface) 19 ((IFWL_Barcode*)m_pIface)
20 ->Initialize(m_pProperties->MakeWidgetImpProperties(&m_barcodeData), 20 ->Initialize(m_pProperties->MakeWidgetImpProperties(&m_barcodeData),
21 nullptr); 21 nullptr);
22 if (ret == FWL_ERR_Succeeded) { 22 if (ret == FWL_ERR_Succeeded) {
23 CFWL_Widget::Initialize(); 23 CFWL_Widget::Initialize();
24 } 24 }
25 return ret; 25 return ret;
26 } 26 }
27 CFWL_Barcode::CFWL_Barcode() {} 27 CFWL_Barcode::CFWL_Barcode() {}
28 CFWL_Barcode::~CFWL_Barcode() {} 28 CFWL_Barcode::~CFWL_Barcode() {}
29 void CFWL_Barcode::SetType(BC_TYPE type) { 29 void CFWL_Barcode::SetType(BC_TYPE type) {
30 if (!m_pIface) 30 if (!m_pIface)
31 return; 31 return;
32 ((IFWL_Barcode*)m_pIface)->SetType(type); 32 ((IFWL_Barcode*)m_pIface)->SetType(type);
33 } 33 }
34 FX_BOOL CFWL_Barcode::IsProtectedType() { 34 FX_BOOL CFWL_Barcode::IsProtectedType() {
35 if (!m_pIface) 35 if (!m_pIface)
36 return 0; 36 return 0;
37 return ((IFWL_Barcode*)m_pIface)->IsProtectedType(); 37 return ((IFWL_Barcode*)m_pIface)->IsProtectedType();
38 } 38 }
39 FWL_ERR CFWL_Barcode::CFWL_BarcodeDP::GetCaption(IFWL_Widget* pWidget, 39 FWL_ERR CFWL_Barcode::CFWL_BarcodeDP::GetCaption(IFWL_Widget* pWidget,
40 CFX_WideString& wsCaption) { 40 CFX_WideString& wsCaption) {
41 return FWL_ERR_Succeeded; 41 return FWL_ERR_Succeeded;
42 } 42 }
OLDNEW
« no previous file with comments | « xfa/src/fwl/src/core/include/fwl_targetimp.h ('k') | xfa/src/fwl/src/lightwidget/caret.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698