diff options
Diffstat (limited to 'xfa/fxfa/parser/cxfa_widgetdata.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
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<CXFA_Measurement> 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<int32_t> degrees = + m_pNode->JSNode()->TryInteger(XFA_Attribute::Rotate, false); + return degrees ? XFA_MapRotation(*degrees) / 90 * 90 : 0; } CXFA_BorderData CXFA_WidgetData::GetBorderData(bool bModified) { |