summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-21 21:54:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-21 21:54:40 +0000
commit36261b631e1847bcfdda6d381ae414c954d73e88 (patch)
treee2f6dd3eb79e04125033933adbb02ad3a5ceb83c /xfa/fxfa/parser
parent64e16079bb87085fdff5d6268267fd01eacbc5d9 (diff)
downloadpdfium-36261b631e1847bcfdda6d381ae414c954d73e88.tar.xz
Cleanup CXFA_LineData
Make methods const and return the correct types. Change-Id: Icaa1c17d611a69227f67ea398e4b3cc17bc1004b Reviewed-on: https://pdfium-review.googlesource.com/19011 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_linedata.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_linedata.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_linedata.cpp b/xfa/fxfa/parser/cxfa_linedata.cpp
index 623504af90..9fa39bc956 100644
--- a/xfa/fxfa/parser/cxfa_linedata.cpp
+++ b/xfa/fxfa/parser/cxfa_linedata.cpp
@@ -8,15 +8,15 @@
#include "xfa/fxfa/parser/cxfa_node.h"
-int32_t CXFA_LineData::GetHand() {
+XFA_ATTRIBUTEENUM CXFA_LineData::GetHand() const {
return m_pNode->JSNode()->GetEnum(XFA_Attribute::Hand);
}
-bool CXFA_LineData::GetSlope() {
+bool CXFA_LineData::GetSlope() const {
return m_pNode->JSNode()->GetEnum(XFA_Attribute::Slope) ==
XFA_ATTRIBUTEENUM_Slash;
}
-CXFA_EdgeData CXFA_LineData::GetEdgeData() {
+CXFA_EdgeData CXFA_LineData::GetEdgeData() const {
return CXFA_EdgeData(m_pNode->GetChild(0, XFA_Element::Edge, false));
}
diff --git a/xfa/fxfa/parser/cxfa_linedata.h b/xfa/fxfa/parser/cxfa_linedata.h
index 2e70450616..0f85e50a11 100644
--- a/xfa/fxfa/parser/cxfa_linedata.h
+++ b/xfa/fxfa/parser/cxfa_linedata.h
@@ -17,9 +17,9 @@ class CXFA_LineData : public CXFA_DataData {
public:
explicit CXFA_LineData(CXFA_Node* pNode) : CXFA_DataData(pNode) {}
- int32_t GetHand();
- bool GetSlope();
- CXFA_EdgeData GetEdgeData();
+ XFA_ATTRIBUTEENUM GetHand() const;
+ bool GetSlope() const;
+ CXFA_EdgeData GetEdgeData() const;
};
#endif // XFA_FXFA_PARSER_CXFA_LINEDATA_H_