OLD | NEW |
---|---|
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 uint32_t dwStylesExRemoved) { | 119 uint32_t dwStylesExRemoved) { |
120 return m_pIface->ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); | 120 return m_pIface->ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); |
121 } | 121 } |
122 | 122 |
123 uint32_t CFWL_Widget::GetStates() { | 123 uint32_t CFWL_Widget::GetStates() { |
124 if (!m_pIface) | 124 if (!m_pIface) |
125 return FWL_ERR_Indefinite; | 125 return FWL_ERR_Indefinite; |
126 return m_pIface->GetStates(); | 126 return m_pIface->GetStates(); |
127 } | 127 } |
128 | 128 |
129 FWL_ERR CFWL_Widget::SetStates(uint32_t dwStates, FX_BOOL bSet) { | 129 void CFWL_Widget::SetStates(uint32_t dwStates, FX_BOOL bSet) { |
130 if (!m_pIface) | 130 if (!m_pIface) |
Tom Sepez
2016/04/28 23:40:32
nit: maybe just
if (m_pIface)
m_pIface->SetStat
dsinclair
2016/05/02 13:43:30
Done.
| |
131 return FWL_ERR_Indefinite; | 131 return; |
132 return m_pIface->SetStates(dwStates, bSet); | 132 m_pIface->SetStates(dwStates, bSet); |
133 } | 133 } |
134 | 134 |
135 FWL_ERR CFWL_Widget::SetPrivateData(void* module_id, | 135 FWL_ERR CFWL_Widget::SetPrivateData(void* module_id, |
136 void* pData, | 136 void* pData, |
137 PD_CALLBACK_FREEDATA callback) { | 137 PD_CALLBACK_FREEDATA callback) { |
138 if (!m_pIface) | 138 if (!m_pIface) |
139 return FWL_ERR_Indefinite; | 139 return FWL_ERR_Indefinite; |
140 return m_pIface->SetPrivateData(module_id, pData, callback); | 140 return m_pIface->SetPrivateData(module_id, pData, callback); |
141 } | 141 } |
142 | 142 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
330 calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; | 330 calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; |
331 CFX_RectF rect; | 331 CFX_RectF rect; |
332 FX_FLOAT fWidth = bMultiLine | 332 FX_FLOAT fWidth = bMultiLine |
333 ? (iLineWidth > 0 ? (FX_FLOAT)iLineWidth | 333 ? (iLineWidth > 0 ? (FX_FLOAT)iLineWidth |
334 : FWL_WGT_CalcMultiLineDefWidth) | 334 : FWL_WGT_CalcMultiLineDefWidth) |
335 : FWL_WGT_CalcWidth; | 335 : FWL_WGT_CalcWidth; |
336 rect.Set(0, 0, fWidth, FWL_WGT_CalcHeight); | 336 rect.Set(0, 0, fWidth, FWL_WGT_CalcHeight); |
337 pTheme->CalcTextRect(&calPart, rect); | 337 pTheme->CalcTextRect(&calPart, rect); |
338 return CFX_SizeF(rect.width, rect.height); | 338 return CFX_SizeF(rect.width, rect.height); |
339 } | 339 } |
OLD | NEW |