diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-07 20:49:20 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-07 20:49:20 +0000 |
commit | 2a69b9ef97ddf46fe01de432bd0ccc1b7ce92bcb (patch) | |
tree | d0138d82b52cc63e0956a12faebf6433dd9303fd /xfa/fxfa/parser | |
parent | c5a729ec5ada8ef0edc3f4d9976e96865f516598 (diff) | |
download | pdfium-2a69b9ef97ddf46fe01de432bd0ccc1b7ce92bcb.tar.xz |
Rename CXFA_Margin to CXFA_MarginData
This CL renames CXFA_Margin to CXFA_MarginData to reflect the fact this
is part of the data hierarchy.
Change-Id: I50d82d01fcaf35c621f13b8b68bc04d850ec885a
Reviewed-on: https://pdfium-review.googlesource.com/17986
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cxfa_boxdata.cpp | 6 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_boxdata.h | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_captiondata.cpp | 6 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_captiondata.h | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_margindata.cpp (renamed from xfa/fxfa/parser/cxfa_margin.cpp) | 12 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_margindata.h (renamed from xfa/fxfa/parser/cxfa_margin.h) | 10 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.cpp | 11 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.h | 4 |
8 files changed, 29 insertions, 28 deletions
diff --git a/xfa/fxfa/parser/cxfa_boxdata.cpp b/xfa/fxfa/parser/cxfa_boxdata.cpp index d0c264e3b2..b7c9561bd0 100644 --- a/xfa/fxfa/parser/cxfa_boxdata.cpp +++ b/xfa/fxfa/parser/cxfa_boxdata.cpp @@ -146,9 +146,9 @@ CXFA_FillData CXFA_BoxData::GetFillData(bool bModified) const { return CXFA_FillData(pFillNode); } -CXFA_Margin CXFA_BoxData::GetMargin() const { - return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin, false) - : nullptr); +CXFA_MarginData CXFA_BoxData::GetMarginData() const { + return CXFA_MarginData( + m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin, false) : nullptr); } int32_t CXFA_BoxData::Get3DStyle(bool& bVisible, float& fThickness) const { diff --git a/xfa/fxfa/parser/cxfa_boxdata.h b/xfa/fxfa/parser/cxfa_boxdata.h index 80a39222e2..af8b26bfed 100644 --- a/xfa/fxfa/parser/cxfa_boxdata.h +++ b/xfa/fxfa/parser/cxfa_boxdata.h @@ -13,7 +13,7 @@ #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_edgedata.h" #include "xfa/fxfa/parser/cxfa_filldata.h" -#include "xfa/fxfa/parser/cxfa_margin.h" +#include "xfa/fxfa/parser/cxfa_margindata.h" class CXFA_Node; @@ -47,7 +47,7 @@ class CXFA_BoxData : public CXFA_Data { } CXFA_FillData GetFillData(bool bModified = false) const; - CXFA_Margin GetMargin() const; + CXFA_MarginData GetMarginData() const; int32_t Get3DStyle(bool& bVisible, float& fThickness) const; }; diff --git a/xfa/fxfa/parser/cxfa_captiondata.cpp b/xfa/fxfa/parser/cxfa_captiondata.cpp index 1f84959d05..dfaba57313 100644 --- a/xfa/fxfa/parser/cxfa_captiondata.cpp +++ b/xfa/fxfa/parser/cxfa_captiondata.cpp @@ -29,9 +29,9 @@ float CXFA_CaptionData::GetReserve() { return ms.ToUnit(XFA_UNIT_Pt); } -CXFA_Margin CXFA_CaptionData::GetMargin() { - return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin, false) - : nullptr); +CXFA_MarginData CXFA_CaptionData::GetMarginData() { + return CXFA_MarginData( + m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin, false) : nullptr); } CXFA_FontData CXFA_CaptionData::GetFontData() { diff --git a/xfa/fxfa/parser/cxfa_captiondata.h b/xfa/fxfa/parser/cxfa_captiondata.h index 0a14c1f8fa..6c4837fbd1 100644 --- a/xfa/fxfa/parser/cxfa_captiondata.h +++ b/xfa/fxfa/parser/cxfa_captiondata.h @@ -9,7 +9,7 @@ #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_fontdata.h" -#include "xfa/fxfa/parser/cxfa_margin.h" +#include "xfa/fxfa/parser/cxfa_margindata.h" #include "xfa/fxfa/parser/cxfa_value.h" class CXFA_Node; @@ -21,7 +21,7 @@ class CXFA_CaptionData : public CXFA_Data { int32_t GetPresence(); int32_t GetPlacementType(); float GetReserve(); - CXFA_Margin GetMargin(); + CXFA_MarginData GetMarginData(); CXFA_FontData GetFontData(); CXFA_Value GetValue(); }; diff --git a/xfa/fxfa/parser/cxfa_margin.cpp b/xfa/fxfa/parser/cxfa_margindata.cpp index e3153f2671..9227668a68 100644 --- a/xfa/fxfa/parser/cxfa_margin.cpp +++ b/xfa/fxfa/parser/cxfa_margindata.cpp @@ -4,26 +4,26 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "xfa/fxfa/parser/cxfa_margin.h" +#include "xfa/fxfa/parser/cxfa_margindata.h" -CXFA_Margin::CXFA_Margin(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_MarginData::CXFA_MarginData(CXFA_Node* pNode) : CXFA_Data(pNode) {} -bool CXFA_Margin::GetLeftInset(float& fInset, float fDefInset) const { +bool CXFA_MarginData::GetLeftInset(float& fInset, float fDefInset) const { fInset = fDefInset; return TryMeasure(XFA_ATTRIBUTE_LeftInset, fInset); } -bool CXFA_Margin::GetTopInset(float& fInset, float fDefInset) const { +bool CXFA_MarginData::GetTopInset(float& fInset, float fDefInset) const { fInset = fDefInset; return TryMeasure(XFA_ATTRIBUTE_TopInset, fInset); } -bool CXFA_Margin::GetRightInset(float& fInset, float fDefInset) const { +bool CXFA_MarginData::GetRightInset(float& fInset, float fDefInset) const { fInset = fDefInset; return TryMeasure(XFA_ATTRIBUTE_RightInset, fInset); } -bool CXFA_Margin::GetBottomInset(float& fInset, float fDefInset) const { +bool CXFA_MarginData::GetBottomInset(float& fInset, float fDefInset) const { fInset = fDefInset; return TryMeasure(XFA_ATTRIBUTE_BottomInset, fInset); } diff --git a/xfa/fxfa/parser/cxfa_margin.h b/xfa/fxfa/parser/cxfa_margindata.h index 89fc4ce38a..fda823945c 100644 --- a/xfa/fxfa/parser/cxfa_margin.h +++ b/xfa/fxfa/parser/cxfa_margindata.h @@ -4,17 +4,17 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef XFA_FXFA_PARSER_CXFA_MARGIN_H_ -#define XFA_FXFA_PARSER_CXFA_MARGIN_H_ +#ifndef XFA_FXFA_PARSER_CXFA_MARGINDATA_H_ +#define XFA_FXFA_PARSER_CXFA_MARGINDATA_H_ #include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; -class CXFA_Margin : public CXFA_Data { +class CXFA_MarginData : public CXFA_Data { public: - explicit CXFA_Margin(CXFA_Node* pNode); + explicit CXFA_MarginData(CXFA_Node* pNode); bool GetLeftInset(float& fInset, float fDefInset = 0) const; bool GetTopInset(float& fInset, float fDefInset = 0) const; @@ -22,4 +22,4 @@ class CXFA_Margin : public CXFA_Data { bool GetBottomInset(float& fInset, float fDefInset = 0) const; }; -#endif // XFA_FXFA_PARSER_CXFA_MARGIN_H_ +#endif // XFA_FXFA_PARSER_CXFA_MARGINDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index 305ead26d9..5edbc7fad4 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -294,8 +294,8 @@ CXFA_FontData CXFA_WidgetData::GetFontData(bool bModified) { m_pNode->JSNode()->GetProperty(0, XFA_Element::Font, bModified)); } -CXFA_Margin CXFA_WidgetData::GetMargin() { - return CXFA_Margin( +CXFA_MarginData CXFA_WidgetData::GetMarginData() { + return CXFA_MarginData( m_pNode->JSNode()->GetProperty(0, XFA_Element::Margin, false)); } @@ -396,10 +396,11 @@ CXFA_BorderData CXFA_WidgetData::GetUIBorderData() { CFX_RectF CXFA_WidgetData::GetUIMargin() { CXFA_Node* pUIChild = GetUIChild(); - CXFA_Margin mgUI = CXFA_Margin( - pUIChild ? pUIChild->JSNode()->GetProperty(0, XFA_Element::Margin, false) - : nullptr); + if (!pUIChild) + return CFX_RectF(); + CXFA_MarginData mgUI = CXFA_MarginData( + pUIChild->JSNode()->GetProperty(0, XFA_Element::Margin, false)); if (!mgUI) return CFX_RectF(); diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h index b2cb214ccc..3df30dc5f1 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.h +++ b/xfa/fxfa/parser/cxfa_widgetdata.h @@ -19,7 +19,7 @@ #include "xfa/fxfa/parser/cxfa_captiondata.h" #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_fontdata.h" -#include "xfa/fxfa/parser/cxfa_margin.h" +#include "xfa/fxfa/parser/cxfa_margindata.h" #include "xfa/fxfa/parser/cxfa_para.h" #include "xfa/fxfa/parser/cxfa_validate.h" @@ -53,7 +53,7 @@ class CXFA_WidgetData : public CXFA_Data { CXFA_BorderData GetBorderData(bool bModified); CXFA_CaptionData GetCaptionData(); CXFA_FontData GetFontData(bool bModified); - CXFA_Margin GetMargin(); + CXFA_MarginData GetMarginData(); CXFA_Para GetPara(); std::vector<CXFA_Node*> GetEventList(); std::vector<CXFA_Node*> GetEventByActivity(int32_t iActivity, |