summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp')
-rw-r--r--xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp b/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
index c3bcd5e20f..c6ece3691b 100644
--- a/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
@@ -1792,7 +1792,7 @@ FX_INT32 CXFA_WidgetData::GetRotate()
return 0;
}
FX_INT32 iRotate = FXSYS_round(ms.GetValue());
- iRotate = (iRotate < 0 ? (iRotate % 360) + 360 : iRotate % 360);
+ iRotate = XFA_MapRotation(iRotate);
return iRotate / 90 * 90;
}
CXFA_Border CXFA_WidgetData::GetBorder(FX_BOOL bModified)
@@ -1933,12 +1933,7 @@ FX_BOOL CXFA_WidgetData::SetPresence(FX_INT32 iPresence)
}
FX_BOOL CXFA_WidgetData::SetRotate(FX_INT32 iRotate)
{
- while (iRotate < 0) {
- iRotate += 360;
- }
- while (iRotate >= 360) {
- iRotate -= 360;
- }
+ iRotate = XFA_MapRotation(iRotate);
CXFA_Measurement ms((FX_FLOAT)iRotate, XFA_UNIT_Angle);
return m_pNode->SetMeasure(XFA_ATTRIBUTE_Rotate, ms);
}