summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-08-04 10:37:17 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-08-04 20:51:27 +0200
commit8c48d69f06ddb3cb6c807a1e7db62dddb9778ded (patch)
tree8b6bf137be41ebe93746c4958ab9106bbf5cc339 /sw/source/uibase
parentc05fbde6c870b7e6bc2f9bf642dc7d76215a496f (diff)
Use more basegfx deg<->rad functions, instead of direct formulas
Also make the functions constexpr. Due to slight changes in floating-point arithmetics (90.0 instead of 180.0, M_PI2 instead of M_PI resp.), results might differ in last digits (usually 17th decimal digit). This has lead to need to tweak char2dump's PieChartTest unit test. Change-Id: I20323dd7dab27e4deb408ea4181e390cc05e7cd3 Reviewed-on: https://gerrit.libreoffice.org/58583 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/docvw/ShadowOverlayObject.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.cxx b/sw/source/uibase/docvw/ShadowOverlayObject.cxx
index 38bffa2218f9..eaafd60febc8 100644
--- a/sw/source/uibase/docvw/ShadowOverlayObject.cxx
+++ b/sw/source/uibase/docvw/ShadowOverlayObject.cxx
@@ -84,7 +84,7 @@ void ShadowPrimitive::create2DDecomposition(
0.0,
0.5,
0.5,
- 1800.0 * F_PI1800,
+ F_PI,
basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0),
basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0),
2);
@@ -103,7 +103,7 @@ void ShadowPrimitive::create2DDecomposition(
0.0,
0.5,
0.5,
- 1800.0 * F_PI1800,
+ F_PI,
basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0),
basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0),
4);
@@ -122,7 +122,7 @@ void ShadowPrimitive::create2DDecomposition(
0.0,
0.5,
0.5,
- 1800.0 * F_PI1800,
+ F_PI,
basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0),
basegfx::BColor(83.0/255.0,83.0/255.0,83.0/255.0),
4);