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

Side by Side Diff: xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: 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 | « xfa/fwl/basewidget/fwl_tooltipctrlimp.h ('k') | xfa/fwl/basewidget/fxmath_barcodeimp.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/basewidget/fwl_tooltipctrlimp.h" 7 #include "xfa/fwl/basewidget/fwl_tooltipctrlimp.h"
8 8
9 #include "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fwl/basewidget/ifwl_tooltip.h" 10 #include "xfa/fwl/basewidget/ifwl_tooltip.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 FWL_Error CFWL_ToolTipImp::Finalize() { 85 FWL_Error CFWL_ToolTipImp::Finalize() {
86 delete m_pDelegate; 86 delete m_pDelegate;
87 m_pDelegate = nullptr; 87 m_pDelegate = nullptr;
88 return CFWL_WidgetImp::Finalize(); 88 return CFWL_WidgetImp::Finalize();
89 } 89 }
90 FWL_Error CFWL_ToolTipImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { 90 FWL_Error CFWL_ToolTipImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
91 if (bAutoSize) { 91 if (bAutoSize) {
92 rect.Set(0, 0, 0, 0); 92 rect.Set(0, 0, 0, 0);
93 if (!m_pProperties->m_pThemeProvider) { 93 if (!m_pProperties->m_pThemeProvider)
94 m_pProperties->m_pThemeProvider = GetAvailableTheme(); 94 m_pProperties->m_pThemeProvider = GetAvailableTheme();
95 } 95
96 CFX_WideString wsCaption; 96 CFX_WideString wsCaption;
97 IFWL_ToolTipDP* pData = 97 IFWL_ToolTipDP* pData =
98 static_cast<IFWL_ToolTipDP*>(m_pProperties->m_pDataProvider); 98 static_cast<IFWL_ToolTipDP*>(m_pProperties->m_pDataProvider);
99 if (pData) { 99 if (pData) {
100 pData->GetCaption(m_pInterface, wsCaption); 100 pData->GetCaption(m_pInterface, wsCaption);
101 } 101 }
102 int32_t iLen = wsCaption.GetLength(); 102 int32_t iLen = wsCaption.GetLength();
103 if (iLen > 0) { 103 if (iLen > 0) {
104 CFX_SizeF sz = CalcTextSize(wsCaption, m_pProperties->m_pThemeProvider); 104 CFX_SizeF sz = CalcTextSize(wsCaption, m_pProperties->m_pThemeProvider);
105 rect.Set(0, 0, sz.x, sz.y); 105 rect.Set(0, 0, sz.x, sz.y);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 void CFWL_ToolTipImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { 300 void CFWL_ToolTipImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
301 CFWL_WidgetImpDelegate::OnProcessMessage(pMessage); 301 CFWL_WidgetImpDelegate::OnProcessMessage(pMessage);
302 } 302 }
303 303
304 void CFWL_ToolTipImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {} 304 void CFWL_ToolTipImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {}
305 305
306 void CFWL_ToolTipImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics, 306 void CFWL_ToolTipImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
307 const CFX_Matrix* pMatrix) { 307 const CFX_Matrix* pMatrix) {
308 m_pOwner->DrawWidget(pGraphics, pMatrix); 308 m_pOwner->DrawWidget(pGraphics, pMatrix);
309 } 309 }
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_tooltipctrlimp.h ('k') | xfa/fwl/basewidget/fxmath_barcodeimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698