summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-21 17:07:50 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-21 17:07:50 +0000
commit2297ec2274f3ab56741d3c11a09cef6d237a04d4 (patch)
tree663dc474312925d8a434f481dbb16bbb33fdeb59 /xfa/fxfa/parser
parent9c1873033c021643e8ae6ff3b53855ca53e07fd1 (diff)
downloadpdfium-2297ec2274f3ab56741d3c11a09cef6d237a04d4.tar.xz
Make CXFA_CaptionData methods const
Change-Id: I132fc2e7a2f441ed0bdcfad16b32c65ad4433a1b Reviewed-on: https://pdfium-review.googlesource.com/18930 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_captiondata.cpp12
-rw-r--r--xfa/fxfa/parser/cxfa_captiondata.h12
2 files changed, 12 insertions, 12 deletions
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_