From ebbc08b858b4bb3e0a2cb69eb43c51b740515b9a Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 29 Nov 2017 19:50:09 +0000 Subject: 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 Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_widgetdata.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_widgetdata.cpp') diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index 4c8257a039..520a559bb4 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -235,14 +235,9 @@ bool CXFA_WidgetData::IsOpenAccess() const { } int32_t CXFA_WidgetData::GetRotate() const { - pdfium::Optional measure = - m_pNode->JSNode()->TryMeasure(XFA_Attribute::Rotate, false); - if (!measure) - return 0; - - int32_t iRotate = FXSYS_round(measure->GetValue()); - iRotate = XFA_MapRotation(iRotate); - return iRotate / 90 * 90; + pdfium::Optional degrees = + m_pNode->JSNode()->TryInteger(XFA_Attribute::Rotate, false); + return degrees ? XFA_MapRotation(*degrees) / 90 * 90 : 0; } CXFA_BorderData CXFA_WidgetData::GetBorderData(bool bModified) { -- cgit v1.2.3