summaryrefslogtreecommitdiff
path: root/svx/source/sdr
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sdr')
-rw-r--r--svx/source/sdr/contact/viewcontactofe3dlathe.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcircobj.cxx10
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrole2obj.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpathobj.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrrectobj.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx6
9 files changed, 16 insertions, 16 deletions
diff --git a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx
index 0d9d0714aa56..bcaa1c367f97 100644
--- a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx
@@ -72,7 +72,7 @@ namespace sdr::contact
const sal_uInt32 nVerticalSegments(GetE3dLatheObj().GetVerticalSegments());
const double fDiagonal(static_cast<double>(GetE3dLatheObj().GetPercentDiagonal()) / 100.0);
const double fBackScale(static_cast<double>(GetE3dLatheObj().GetBackScale()) / 100.0);
- const double fRotation((static_cast<double>(GetE3dLatheObj().GetEndAngle()) / 1800.0) * M_PI);
+ const double fRotation(basegfx::deg2rad<10>(GetE3dLatheObj().GetEndAngle()));
const bool bSmoothNormals(GetE3dLatheObj().GetSmoothNormals()); // Plane itself
const bool bSmoothLids(GetE3dLatheObj().GetSmoothLids()); // Front/back
const bool bCharacterMode(GetE3dLatheObj().GetCharacterMode());
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 7450b25be1a4..8e284f7ae79d 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -341,7 +341,7 @@ namespace sdr::contact
// fill object matrix
const double fShearX(-rGeoStat.mfTanShearAngle);
- const double fRotate(nRotationAngle ? (36000 - nRotationAngle.get()) * F_PI18000 : 0.0);
+ const double fRotate(nRotationAngle ? toRadians(36000_deg100 - nRotationAngle) : 0.0);
const basegfx::B2DHomMatrix aObjectMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix(
aObjectRange.getWidth(), aObjectRange.getHeight(),
fShearX, fRotate,
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index d3198802a706..44eea3a13fd4 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -74,7 +74,7 @@ namespace sdr::contact
basegfx::B2DHomMatrix aObjectMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix(
aObjectRange.getWidth(), aObjectRange.getHeight(),
-rGeoStat.mfTanShearAngle,
- rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle.get()) * F_PI18000 : 0.0,
+ rGeoStat.nRotationAngle ? toRadians(36000_deg100 - rGeoStat.nRotationAngle) : 0.0,
aObjectRange.getMinX(), aObjectRange.getMinY()));
// calculate corner radius
diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
index 7462c1080a2e..e150a6be7377 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
@@ -57,7 +57,7 @@ namespace sdr::contact
basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix(
aObjectRange.getWidth(), aObjectRange.getHeight(),
-rGeoStat.mfTanShearAngle,
- rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle.get()) * F_PI18000 : 0.0,
+ rGeoStat.nRotationAngle ? toRadians(36000_deg100 - rGeoStat.nRotationAngle) : 0.0,
aObjectRange.getMinX(), aObjectRange.getMinY()));
// create primitive data
@@ -77,10 +77,10 @@ namespace sdr::contact
}
else
{
- const sal_Int32 nNewStart(rItemSet.Get(SDRATTR_CIRCSTARTANGLE).GetValue());
- const sal_Int32 nNewEnd(rItemSet.Get(SDRATTR_CIRCENDANGLE).GetValue());
- const double fStart(((36000 - nNewEnd) % 36000) * F_PI18000);
- const double fEnd(((36000 - nNewStart) % 36000) * F_PI18000);
+ const auto nNewStart(rItemSet.Get(SDRATTR_CIRCSTARTANGLE).GetValue());
+ const auto nNewEnd(rItemSet.Get(SDRATTR_CIRCENDANGLE).GetValue());
+ const double fStart(toRadians((36000_deg100 - nNewEnd) % 36000_deg100));
+ const double fEnd(toRadians((36000_deg100 - nNewStart) % 36000_deg100));
const bool bCloseSegment(OBJ_CARC != nIdentifier);
const bool bCloseUsingCenter(OBJ_SECT == nIdentifier);
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 6a4e22ec7af0..879f36971f85 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -73,7 +73,7 @@ namespace sdr::contact
if(rGeoStat.nRotationAngle)
{
- aRotMatrix.rotate((36000 - rGeoStat.nRotationAngle.get()) * F_PI18000);
+ aRotMatrix.rotate(toRadians(36000_deg100 - rGeoStat.nRotationAngle));
}
aRotMatrix.translate(aObjectRange.getMinimum().getX(), aObjectRange.getMinimum().getY());
@@ -202,7 +202,7 @@ namespace sdr::contact
if(rGeoStat.nRotationAngle)
{
- aTextBoxMatrix.rotate((36000 - rGeoStat.nRotationAngle.get()) * F_PI18000);
+ aTextBoxMatrix.rotate(toRadians(36000_deg100 - rGeoStat.nRotationAngle));
}
// give text it's target position
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index 610c483cbec8..a9ee47a30af3 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -62,7 +62,7 @@ basegfx::B2DHomMatrix ViewContactOfSdrOle2Obj::createObjectTransform() const
// create object matrix
const GeoStat& rGeoStat(GetOle2Obj().GetGeoStat());
const double fShearX(-rGeoStat.mfTanShearAngle);
- const double fRotate(rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle.get()) * F_PI18000 : 0.0);
+ const double fRotate(rGeoStat.nRotationAngle ? toRadians(36000_deg100 - rGeoStat.nRotationAngle) : 0.0);
return basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix(
aObjectRange.getWidth(), aObjectRange.getHeight(),
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index 694c3ea32947..b326fd8af787 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -158,7 +158,7 @@ namespace sdr::contact
aObjectMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix(
fScaleX, fScaleY,
-rGeoStat.mfTanShearAngle,
- rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle.get()) * F_PI18000 : 0.0,
+ rGeoStat.nRotationAngle ? toRadians(36000_deg100 - rGeoStat.nRotationAngle) : 0.0,
aObjectRange.getMinX(), aObjectRange.getMinY());
// create unit polygon from object's absolute path
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index e1b8d69cd906..a8f1c3aeb125 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -57,7 +57,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createV
basegfx::B2DHomMatrix aObjectMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix(
aObjectRange.getWidth(), aObjectRange.getHeight(),
-rGeoStat.mfTanShearAngle,
- rGeoStat.nRotationAngle ? (36000 - rGeoStat.nRotationAngle.get()) * F_PI18000 : 0.0,
+ rGeoStat.nRotationAngle ? toRadians(36000_deg100 - rGeoStat.nRotationAngle) : 0.0,
aObjectRange.getMinX(), aObjectRange.getMinY()));
// calculate corner radius
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 7193dc4a663c..1b4f0abbac97 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -483,7 +483,7 @@ namespace drawinglayer::primitive2d
static_cast<double>(aXGradient.GetBorder()) * 0.01,
static_cast<double>(aXGradient.GetXOffset()) * 0.01,
static_cast<double>(aXGradient.GetYOffset()) * 0.01,
- static_cast<double>(aXGradient.GetAngle().get()) * F_PI1800,
+ toRadians(aXGradient.GetAngle()),
aStart,
aEnd,
rSet.Get(XATTR_GRADIENTSTEPCOUNT).GetValue());
@@ -498,7 +498,7 @@ namespace drawinglayer::primitive2d
aHatch = attribute::FillHatchAttribute(
XHatchStyleToHatchStyle(rHatch.GetHatchStyle()),
static_cast<double>(rHatch.GetDistance()),
- static_cast<double>(rHatch.GetAngle().get()) * F_PI1800,
+ toRadians(rHatch.GetAngle()),
aColorB.getBColor(),
3, // same default as VCL, a minimum of three discrete units (pixels) offset
rSet.Get(XATTR_FILLBACKGROUND).GetValue());
@@ -644,7 +644,7 @@ namespace drawinglayer::primitive2d
static_cast<double>(rGradient.GetBorder()) * 0.01,
static_cast<double>(rGradient.GetXOffset()) * 0.01,
static_cast<double>(rGradient.GetYOffset()) * 0.01,
- static_cast<double>(rGradient.GetAngle().get()) * F_PI1800,
+ toRadians(rGradient.GetAngle()),
basegfx::BColor(fStartLum, fStartLum, fStartLum),
basegfx::BColor(fEndLum, fEndLum, fEndLum));
}