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

Side by Side Diff: xfa/fwl/lightwidget/cfwl_widget.cpp

Issue 2017773002: Test CL. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
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
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/lightwidget/cfwl_widget.h" 7 #include "xfa/fwl/lightwidget/cfwl_widget.h"
8 8
9 #include "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fwl/core/cfwl_themetext.h" 10 #include "xfa/fwl/core/cfwl_themetext.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 uint32_t CFWL_Widget::GetStates() { 126 uint32_t CFWL_Widget::GetStates() {
127 return m_pIface ? m_pIface->GetStates() : 0; 127 return m_pIface ? m_pIface->GetStates() : 0;
128 } 128 }
129 129
130 void CFWL_Widget::SetStates(uint32_t dwStates, FX_BOOL bSet) { 130 void CFWL_Widget::SetStates(uint32_t dwStates, FX_BOOL bSet) {
131 if (m_pIface) 131 if (m_pIface)
132 m_pIface->SetStates(dwStates, bSet); 132 m_pIface->SetStates(dwStates, bSet);
133 } 133 }
134 134
135 void* CFWL_Widget::GetLayoutItem() const { 135 CXFA_FFWidget* CFWL_Widget::GetLayoutItem() const {
136 return m_pIface ? m_pIface->GetLayoutItem() : nullptr; 136 return m_pIface ? m_pIface->GetLayoutItem() : nullptr;
137 } 137 }
138 138
139 void CFWL_Widget::SetLayoutItem(void* pItem) { 139 void CFWL_Widget::SetLayoutItem(CXFA_FFWidget* pItem) {
140 if (m_pIface) 140 if (m_pIface)
141 m_pIface->SetLayoutItem(pItem); 141 m_pIface->SetLayoutItem(pItem);
142 } 142 }
143 143
144 FWL_Error CFWL_Widget::SetPrivateData(void* module_id, 144 FWL_Error CFWL_Widget::SetPrivateData(void* module_id,
145 void* pData, 145 void* pData,
146 PD_CALLBACK_FREEDATA callback) { 146 PD_CALLBACK_FREEDATA callback) {
147 if (!m_pIface) 147 if (!m_pIface)
148 return FWL_Error::Indefinite; 148 return FWL_Error::Indefinite;
149 return m_pIface->SetPrivateData(module_id, pData, callback); 149 return m_pIface->SetPrivateData(module_id, pData, callback);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; 341 calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft;
342 CFX_RectF rect; 342 CFX_RectF rect;
343 FX_FLOAT fWidth = bMultiLine 343 FX_FLOAT fWidth = bMultiLine
344 ? (iLineWidth > 0 ? (FX_FLOAT)iLineWidth 344 ? (iLineWidth > 0 ? (FX_FLOAT)iLineWidth
345 : FWL_WGT_CalcMultiLineDefWidth) 345 : FWL_WGT_CalcMultiLineDefWidth)
346 : FWL_WGT_CalcWidth; 346 : FWL_WGT_CalcWidth;
347 rect.Set(0, 0, fWidth, FWL_WGT_CalcHeight); 347 rect.Set(0, 0, fWidth, FWL_WGT_CalcHeight);
348 pTheme->CalcTextRect(&calPart, rect); 348 pTheme->CalcTextRect(&calPart, rect);
349 return CFX_SizeF(rect.width, rect.height); 349 return CFX_SizeF(rect.width, rect.height);
350 } 350 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698