summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-29 19:50:09 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-29 19:50:09 +0000
commitebbc08b858b4bb3e0a2cb69eb43c51b740515b9a (patch)
tree148267c35cb667cfbc4dd4133060fbdd66de9885 /xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
parentea4a56dcecac34c6411ae274f5f5d07523c21d3f (diff)
downloadpdfium-ebbc08b858b4bb3e0a2cb69eb43c51b740515b9a.tar.xz
Remove XFA_Unit::Angle
We never use the ::Angle unit internally, we just access the value. This CL changes the default value to an Integer and drops the measurement. Change-Id: I85d6d84956595bb0576db42d287f54a5a3db1bed Reviewed-on: https://pdfium-review.googlesource.com/19790 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
index ec610293ce..8fe36b0bbf 100644
--- a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
@@ -1103,9 +1103,8 @@ CFX_PointF CalculatePositionedContainerPos(CXFA_Node* pNode,
CFX_PointF pos(
pNode->JSNode()->GetMeasure(XFA_Attribute::X).ToUnit(XFA_Unit::Pt),
pNode->JSNode()->GetMeasure(XFA_Attribute::Y).ToUnit(XFA_Unit::Pt));
- int32_t nRotate = FXSYS_round(
- pNode->JSNode()->GetMeasure(XFA_Attribute::Rotate).GetValue());
- nRotate = XFA_MapRotation(nRotate) / 90;
+ int32_t nRotate =
+ XFA_MapRotation(pNode->JSNode()->GetInteger(XFA_Attribute::Rotate)) / 90;
int32_t nAbsoluteAnchorType = nNextPos[nRotate][nAnchorType];
switch (nAbsoluteAnchorType / 3) {
case 1:
@@ -2758,9 +2757,8 @@ void CXFA_ItemLayoutProcessor::DoLayoutField() {
CFX_SizeF size(-1, -1);
pNotify->StartFieldDrawLayout(m_pFormNode, size.width, size.height);
- int32_t nRotate = FXSYS_round(
- m_pFormNode->JSNode()->GetMeasure(XFA_Attribute::Rotate).GetValue());
- nRotate = XFA_MapRotation(nRotate);
+ int32_t nRotate =
+ XFA_MapRotation(m_pFormNode->JSNode()->GetInteger(XFA_Attribute::Rotate));
if (nRotate == 90 || nRotate == 270)
std::swap(size.width, size.height);