diff options
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.cpp | 27 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.h | 5 |
2 files changed, 15 insertions, 17 deletions
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index 48a26aafad..80c50b781e 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -399,29 +399,27 @@ bool CXFA_WidgetData::GetMaxHeight(FX_FLOAT& fMaxHeight) { return TryMeasure(XFA_ATTRIBUTE_MaxH, fMaxHeight); } -CXFA_Border CXFA_WidgetData::GetUIBorder(bool bModified) { +CXFA_Border CXFA_WidgetData::GetUIBorder() { CXFA_Node* pUIChild = GetUIChild(); - return CXFA_Border( - pUIChild ? pUIChild->GetProperty(0, XFA_Element::Border, bModified) - : nullptr); + return CXFA_Border(pUIChild + ? pUIChild->GetProperty(0, XFA_Element::Border, false) + : nullptr); } -CXFA_Margin CXFA_WidgetData::GetUIMargin(bool bModified) { +CFX_RectF CXFA_WidgetData::GetUIMargin() { + CFX_RectF rtUIMargin; + rtUIMargin.Reset(); + CXFA_Node* pUIChild = GetUIChild(); - return CXFA_Margin( - pUIChild ? pUIChild->GetProperty(0, XFA_Element::Margin, bModified) + CXFA_Margin mgUI = CXFA_Margin( + pUIChild ? pUIChild->GetProperty(0, XFA_Element::Margin, false) : nullptr); -} - -void CXFA_WidgetData::GetUIMargin(CFX_RectF& rtUIMargin) { - rtUIMargin.Reset(); - CXFA_Margin mgUI = GetUIMargin(); if (!mgUI) - return; + return rtUIMargin; CXFA_Border border = GetUIBorder(); if (border && border.GetPresence() != XFA_ATTRIBUTEENUM_Visible) - return; + return rtUIMargin; FX_FLOAT fLeftInset, fTopInset, fRightInset, fBottomInset; bool bLeft = mgUI.GetLeftInset(fLeftInset); @@ -446,6 +444,7 @@ void CXFA_WidgetData::GetUIMargin(CFX_RectF& rtUIMargin) { } } rtUIMargin.Set(fLeftInset, fTopInset, fRightInset, fBottomInset); + return rtUIMargin; } int32_t CXFA_WidgetData::GetButtonHighlight() { diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h index 0079996735..7986fa9d82 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.h +++ b/xfa/fxfa/parser/cxfa_widgetdata.h @@ -69,9 +69,8 @@ class CXFA_WidgetData : public CXFA_Data { bool GetMinHeight(FX_FLOAT& fMinHeight); bool GetMaxWidth(FX_FLOAT& fMaxWidth); bool GetMaxHeight(FX_FLOAT& fMaxHeight); - CXFA_Border GetUIBorder(bool bModified = false); - CXFA_Margin GetUIMargin(bool bModified = false); - void GetUIMargin(CFX_RectF& rtUIMargin); + CXFA_Border GetUIBorder(); + CFX_RectF GetUIMargin(); int32_t GetButtonHighlight(); bool GetButtonRollover(CFX_WideString& wsRollover, bool& bRichText); bool GetButtonDown(CFX_WideString& wsDown, bool& bRichText); |