diff options
Diffstat (limited to 'xfa/src/fwl/src/lightwidget/widget.cpp')
-rw-r--r-- | xfa/src/fwl/src/lightwidget/widget.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/xfa/src/fwl/src/lightwidget/widget.cpp b/xfa/src/fwl/src/lightwidget/widget.cpp index 896ff80be3..6c65798eaf 100644 --- a/xfa/src/fwl/src/lightwidget/widget.cpp +++ b/xfa/src/fwl/src/lightwidget/widget.cpp @@ -283,13 +283,12 @@ void CFWL_Widget::DispatchEvent(CFWL_Event* pEvent) { CFX_SizeF CFWL_Widget::CalcTextSize(const CFX_WideString& wsText, FX_BOOL bMultiLine, int32_t iLineWidth) { - CFX_SizeF sz; - sz.Set(0, 0); if (!m_pIface) - return sz; + return CFX_SizeF(); IFWL_ThemeProvider* pTheme = m_pIface->GetThemeProvider(); if (!pTheme) - return sz; + return CFX_SizeF(); + CFWL_ThemeText calPart; calPart.m_pWidget = m_pIface; calPart.m_wsText = wsText; @@ -303,9 +302,7 @@ CFX_SizeF CFWL_Widget::CalcTextSize(const CFX_WideString& wsText, : FWL_WGT_CalcWidth; rect.Set(0, 0, fWidth, FWL_WGT_CalcHeight); pTheme->CalcTextRect(&calPart, rect); - sz.x = rect.width; - sz.y = rect.height; - return sz; + return CFX_SizeF(rect.width, rect.height); } CFWL_WidgetDelegate::CFWL_WidgetDelegate() {} CFWL_WidgetDelegate::~CFWL_WidgetDelegate() {} |