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

Side by Side Diff: xfa/fwl/core/cfwl_barcode.cpp

Issue 2469893004: Unify CFWL_WidgetProperties and CFWL_WidgetImpProperties. (Closed)
Patch Set: review cleanup Created 4 years, 1 month 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/core/cfwl_barcode.h ('k') | xfa/fwl/core/cfwl_checkbox.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/fwl/core/cfwl_barcode.h" 7 #include "xfa/fwl/core/cfwl_barcode.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
11 #include "third_party/base/ptr_util.h" 11 #include "third_party/base/ptr_util.h"
12 12
13 namespace { 13 namespace {
14 14
15 IFWL_Barcode* ToBarcode(IFWL_Widget* widget) { 15 IFWL_Barcode* ToBarcode(IFWL_Widget* widget) {
16 return static_cast<IFWL_Barcode*>(widget); 16 return static_cast<IFWL_Barcode*>(widget);
17 } 17 }
18 18
19 } // namespace 19 } // namespace
20 20
21 CFWL_Barcode::CFWL_Barcode(const IFWL_App* app) : CFWL_Edit(app) {} 21 CFWL_Barcode::CFWL_Barcode(const IFWL_App* app) : CFWL_Edit(app) {}
22 22
23 CFWL_Barcode::~CFWL_Barcode() {} 23 CFWL_Barcode::~CFWL_Barcode() {}
24 24
25 void CFWL_Barcode::Initialize() { 25 void CFWL_Barcode::Initialize() {
26 ASSERT(!m_pIface); 26 ASSERT(!m_pIface);
27 27
28 m_pIface = pdfium::MakeUnique<IFWL_Barcode>( 28 m_pIface = pdfium::MakeUnique<IFWL_Barcode>(
29 m_pApp, m_pProperties->MakeWidgetImpProperties(&m_barcodeData)); 29 m_pApp, pdfium::MakeUnique<CFWL_WidgetProperties>(&m_barcodeData));
30 30
31 CFWL_Widget::Initialize(); 31 CFWL_Widget::Initialize();
32 } 32 }
33 33
34 void CFWL_Barcode::SetCharEncoding(BC_CHAR_ENCODING encoding) { 34 void CFWL_Barcode::SetCharEncoding(BC_CHAR_ENCODING encoding) {
35 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING; 35 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING;
36 m_barcodeData.m_eCharEncoding = encoding; 36 m_barcodeData.m_eCharEncoding = encoding;
37 } 37 }
38 void CFWL_Barcode::SetModuleHeight(int32_t height) { 38 void CFWL_Barcode::SetModuleHeight(int32_t height) {
39 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT; 39 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return m_nECLevel; 153 return m_nECLevel;
154 } 154 }
155 155
156 bool CFWL_Barcode::CFWL_BarcodeDP::GetTruncated() const { 156 bool CFWL_Barcode::CFWL_BarcodeDP::GetTruncated() const {
157 return m_bTruncated; 157 return m_bTruncated;
158 } 158 }
159 159
160 uint32_t CFWL_Barcode::CFWL_BarcodeDP::GetBarcodeAttributeMask() const { 160 uint32_t CFWL_Barcode::CFWL_BarcodeDP::GetBarcodeAttributeMask() const {
161 return m_dwAttributeMask; 161 return m_dwAttributeMask;
162 } 162 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_barcode.h ('k') | xfa/fwl/core/cfwl_checkbox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698