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

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

Issue 1508883003: Replace more static casts in FWL (part 3) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Remove Transfer() default args since they're always present. 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/lightwidget/barcode.cpp ('k') | xfa/src/fwl/src/lightwidget/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 "../../../foxitlib.h" 7 #include "../../../foxitlib.h"
8 CFWL_Caret* CFWL_Caret::Create() { 8 CFWL_Caret* CFWL_Caret::Create() {
9 return new CFWL_Caret; 9 return new CFWL_Caret;
10 } 10 }
11 FWL_ERR CFWL_Caret::Initialize(const CFWL_WidgetProperties* pProperties) { 11 FWL_ERR CFWL_Caret::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 nonstd::unique_ptr<IFWL_Caret> pCaret(IFWL_Caret::Create( 17 nonstd::unique_ptr<IFWL_Caret> pCaret(IFWL_Caret::Create(
18 m_pProperties->MakeWidgetImpProperties(nullptr), nullptr)); 18 m_pProperties->MakeWidgetImpProperties(nullptr), nullptr));
19 FWL_ERR ret = pCaret->Initialize(); 19 FWL_ERR ret = pCaret->Initialize();
20 if (ret != FWL_ERR_Succeeded) { 20 if (ret != FWL_ERR_Succeeded) {
21 return ret; 21 return ret;
22 } 22 }
23 m_pIface = pCaret.release(); 23 m_pIface = pCaret.release();
24 CFWL_Widget::Initialize(); 24 CFWL_Widget::Initialize();
25 return FWL_ERR_Succeeded; 25 return FWL_ERR_Succeeded;
26 } 26 }
27 FWL_ERR CFWL_Caret::ShowCaret(FX_BOOL bFlag) { 27 FWL_ERR CFWL_Caret::ShowCaret(FX_BOOL bFlag) {
28 return ((IFWL_Caret*)m_pIface)->ShowCaret(bFlag); 28 return static_cast<IFWL_Caret*>(m_pIface)->ShowCaret(bFlag);
29 } 29 }
30 FWL_ERR CFWL_Caret::GetFrequency(FX_DWORD& elapse) { 30 FWL_ERR CFWL_Caret::GetFrequency(FX_DWORD& elapse) {
31 return ((IFWL_Caret*)m_pIface)->GetFrequency(elapse); 31 return static_cast<IFWL_Caret*>(m_pIface)->GetFrequency(elapse);
32 } 32 }
33 FWL_ERR CFWL_Caret::SetFrequency(FX_DWORD elapse) { 33 FWL_ERR CFWL_Caret::SetFrequency(FX_DWORD elapse) {
34 return ((IFWL_Caret*)m_pIface)->SetFrequency(elapse); 34 return static_cast<IFWL_Caret*>(m_pIface)->SetFrequency(elapse);
35 } 35 }
36 FWL_ERR CFWL_Caret::SetColor(CFX_Color crFill) { 36 FWL_ERR CFWL_Caret::SetColor(CFX_Color crFill) {
37 return ((IFWL_Caret*)m_pIface)->SetColor(crFill); 37 return static_cast<IFWL_Caret*>(m_pIface)->SetColor(crFill);
38 } 38 }
39 CFWL_Caret::CFWL_Caret() {} 39 CFWL_Caret::CFWL_Caret() {}
40 CFWL_Caret::~CFWL_Caret() {} 40 CFWL_Caret::~CFWL_Caret() {}
OLDNEW
« no previous file with comments | « xfa/src/fwl/src/lightwidget/barcode.cpp ('k') | xfa/src/fwl/src/lightwidget/checkbox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698