summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/cxfa_ffline.cpp17
-rw-r--r--xfa/fxfa/cxfa_ffline.h4
-rw-r--r--xfa/fxfa/parser/cxfa_linedata.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_linedata.h6
4 files changed, 25 insertions, 8 deletions
diff --git a/xfa/fxfa/cxfa_ffline.cpp b/xfa/fxfa/cxfa_ffline.cpp
index 62a4f86998..df83fa62ab 100644
--- a/xfa/fxfa/cxfa_ffline.cpp
+++ b/xfa/fxfa/cxfa_ffline.cpp
@@ -15,7 +15,7 @@ CXFA_FFLine::CXFA_FFLine(CXFA_WidgetAcc* pDataAcc) : CXFA_FFDraw(pDataAcc) {}
CXFA_FFLine::~CXFA_FFLine() {}
void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect,
- int32_t iHand,
+ XFA_ATTRIBUTEENUM iHand,
float fLineWidth) {
float fHalfWidth = fLineWidth / 2.0f;
if (rect.height < 1.0f) {
@@ -25,6 +25,11 @@ void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect,
break;
case XFA_ATTRIBUTEENUM_Right:
rect.top += fHalfWidth;
+ case XFA_ATTRIBUTEENUM_Even:
+ break;
+ default:
+ NOTREACHED();
+ break;
}
} else if (rect.width < 1.0f) {
switch (iHand) {
@@ -34,6 +39,11 @@ void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect,
case XFA_ATTRIBUTEENUM_Right:
rect.left += fHalfWidth;
break;
+ case XFA_ATTRIBUTEENUM_Even:
+ break;
+ default:
+ NOTREACHED();
+ break;
}
} else {
switch (iHand) {
@@ -43,6 +53,11 @@ void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect,
case XFA_ATTRIBUTEENUM_Right:
rect.Deflate(fHalfWidth, fHalfWidth);
break;
+ case XFA_ATTRIBUTEENUM_Even:
+ break;
+ default:
+ NOTREACHED();
+ break;
}
}
}
diff --git a/xfa/fxfa/cxfa_ffline.h b/xfa/fxfa/cxfa_ffline.h
index fc13096d49..7aded63c59 100644
--- a/xfa/fxfa/cxfa_ffline.h
+++ b/xfa/fxfa/cxfa_ffline.h
@@ -20,7 +20,9 @@ class CXFA_FFLine : public CXFA_FFDraw {
uint32_t dwStatus) override;
private:
- void GetRectFromHand(CFX_RectF& rect, int32_t iHand, float fLineWidth);
+ void GetRectFromHand(CFX_RectF& rect,
+ XFA_ATTRIBUTEENUM iHand,
+ float fLineWidth);
};
#endif // XFA_FXFA_CXFA_FFLINE_H_
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_