summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-11-19 00:22:31 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-11-19 15:42:03 +0100
commitbc0ab08634f59e1a1814e575fe6ad5e50bf1aee1 (patch)
tree8691eec1adefd9e4def8245898e8a3e5c5542037 /xmloff
parent168ae4c00a86b7534dedd303f9ef008e19822b99 (diff)
Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversions
Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx2
-rw-r--r--xmloff/source/text/txtparae.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 0100a25ef03e..354bda7c8ce7 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1030,7 +1030,7 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl(
// CAUTION-II: due to tdf#115782 it is better for current ODF to indeed use it
// with the wrong orientation as in all other cases - ARGH! We will need to
// correct this in future ODF ASAP! For now, mirror the rotation here AGAIN
- const double fRotate(aDecomposedTransform.getRotate() * (-1800.0/M_PI));
+ const double fRotate(-basegfx::rad2deg<10>(aDecomposedTransform.getRotate()));
nRotation = static_cast< sal_Int16 >(basegfx::fround(fRotate) % 3600);
// tdf#115529 may be negative, with the above modulo maximal -3599, so
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index b3a26d955ee2..732c119cdb58 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3080,7 +3080,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
// in XMLTextFrameContext_Impl::XMLTextFrameContext_Impl and #i78696#
// CAUTION-II: due to tdf#115782 it is better for current ODF to indeed write it with the wrong
// orientation as in all other cases - ARGH! We will need to correct this in future ODF ASAP!
- const double fRotate(static_cast< double >(nRotation) * (M_PI/1800.0));
+ const double fRotate(basegfx::deg2rad<10>(nRotation));
// transform to rotation center which is the object's center
aSdXMLImExTransform2D.AddTranslate(-aCenter);