diff options
Diffstat (limited to 'xfa/fxfa/cxfa_fwltheme.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_fwltheme.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fxfa/cxfa_fwltheme.cpp b/xfa/fxfa/cxfa_fwltheme.cpp index 920968269f..c7c521ea66 100644 --- a/xfa/fxfa/cxfa_fwltheme.cpp +++ b/xfa/fxfa/cxfa_fwltheme.cpp @@ -147,18 +147,17 @@ void CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) { } CFX_RectF CXFA_FWLTheme::GetUIMargin(CFWL_ThemePart* pThemePart) const { - CFX_RectF rect; CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pThemePart->m_pWidget); if (!pWidget) - return rect; + return CFX_RectF(); CXFA_LayoutItem* pItem = pWidget; - CXFA_WidgetAcc* pWidgetAcc = pWidget->GetNode()->GetWidgetAcc(); - rect = pWidgetAcc->GetUIMargin(); - CXFA_Para* para = pWidgetAcc->GetNode()->GetParaIfExists(); + CXFA_Node* pNode = pWidget->GetNode(); + CFX_RectF rect = pNode->GetUIMargin(); + CXFA_Para* para = pNode->GetParaIfExists(); if (para) { rect.left += para->GetMarginLeft(); - if (pWidgetAcc->IsMultiLine()) + if (pNode->GetWidgetAcc()->IsMultiLine()) rect.width += para->GetMarginRight(); } if (!pItem->GetPrev()) { |