From 2297ec2274f3ab56741d3c11a09cef6d237a04d4 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 21 Nov 2017 17:07:50 +0000 Subject: Make CXFA_CaptionData methods const Change-Id: I132fc2e7a2f441ed0bdcfad16b32c65ad4433a1b Reviewed-on: https://pdfium-review.googlesource.com/18930 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_captiondata.cpp | 12 ++++++------ xfa/fxfa/parser/cxfa_captiondata.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'xfa/fxfa/parser') diff --git a/xfa/fxfa/parser/cxfa_captiondata.cpp b/xfa/fxfa/parser/cxfa_captiondata.cpp index 2045524dd6..1553a50e00 100644 --- a/xfa/fxfa/parser/cxfa_captiondata.cpp +++ b/xfa/fxfa/parser/cxfa_captiondata.cpp @@ -11,35 +11,35 @@ CXFA_CaptionData::CXFA_CaptionData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} -int32_t CXFA_CaptionData::GetPresence() { +int32_t CXFA_CaptionData::GetPresence() const { return m_pNode->JSNode() ->TryEnum(XFA_Attribute::Presence, true) .value_or(XFA_ATTRIBUTEENUM_Visible); } -int32_t CXFA_CaptionData::GetPlacementType() { +int32_t CXFA_CaptionData::GetPlacementType() const { return m_pNode->JSNode() ->TryEnum(XFA_Attribute::Placement, true) .value_or(XFA_ATTRIBUTEENUM_Left); } -float CXFA_CaptionData::GetReserve() { +float CXFA_CaptionData::GetReserve() const { return m_pNode->JSNode() ->GetMeasure(XFA_Attribute::Reserve) .ToUnit(XFA_Unit::Pt); } -CXFA_MarginData CXFA_CaptionData::GetMarginData() { +CXFA_MarginData CXFA_CaptionData::GetMarginData() const { return CXFA_MarginData( m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin, false) : nullptr); } -CXFA_FontData CXFA_CaptionData::GetFontData() { +CXFA_FontData CXFA_CaptionData::GetFontData() const { return CXFA_FontData(m_pNode ? m_pNode->GetChild(0, XFA_Element::Font, false) : nullptr); } -CXFA_ValueData CXFA_CaptionData::GetValueData() { +CXFA_ValueData CXFA_CaptionData::GetValueData() const { return CXFA_ValueData( m_pNode ? m_pNode->GetChild(0, XFA_Element::Value, false) : nullptr); } diff --git a/xfa/fxfa/parser/cxfa_captiondata.h b/xfa/fxfa/parser/cxfa_captiondata.h index a28989b346..ade938bebb 100644 --- a/xfa/fxfa/parser/cxfa_captiondata.h +++ b/xfa/fxfa/parser/cxfa_captiondata.h @@ -18,12 +18,12 @@ class CXFA_CaptionData : public CXFA_DataData { public: explicit CXFA_CaptionData(CXFA_Node* pNode); - int32_t GetPresence(); - int32_t GetPlacementType(); - float GetReserve(); - CXFA_MarginData GetMarginData(); - CXFA_FontData GetFontData(); - CXFA_ValueData GetValueData(); + int32_t GetPresence() const; + int32_t GetPlacementType() const; + float GetReserve() const; + CXFA_MarginData GetMarginData() const; + CXFA_FontData GetFontData() const; + CXFA_ValueData GetValueData() const; }; #endif // XFA_FXFA_PARSER_CXFA_CAPTIONDATA_H_ -- cgit v1.2.3