summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/tools/RelativePositionHelper.cxx4
-rw-r--r--chart2/source/view/main/LabelPositionHelper.cxx171
-rw-r--r--chart2/source/view/main/PlottingPositionHelper.cxx4
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx8
4 files changed, 94 insertions, 93 deletions
diff --git a/chart2/source/tools/RelativePositionHelper.cxx b/chart2/source/tools/RelativePositionHelper.cxx
index deb3e5ca5a2c..260888e907dd 100644
--- a/chart2/source/tools/RelativePositionHelper.cxx
+++ b/chart2/source/tools/RelativePositionHelper.cxx
@@ -237,9 +237,9 @@ awt::Point RelativePositionHelper::getCenterOfAnchoredObject(
//take rotation into account:
aResult.X += static_cast< sal_Int32 >(
- ::rtl::math::round( fXDelta * rtl::math::cos( fAnglePi ) + fYDelta * rtl::math::sin( fAnglePi ) ) );
+ ::rtl::math::round( fXDelta * std::cos( fAnglePi ) + fYDelta * std::sin( fAnglePi ) ) );
aResult.Y += static_cast< sal_Int32 >(
- ::rtl::math::round( - fXDelta * rtl::math::sin( fAnglePi ) + fYDelta * rtl::math::cos( fAnglePi ) ) );
+ ::rtl::math::round( - fXDelta * std::sin( fAnglePi ) + fYDelta * std::cos( fAnglePi ) ) );
return aResult;
}
diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx
index 74fd1ed78174..798c6562e1f6 100644
--- a/chart2/source/view/main/LabelPositionHelper.cxx
+++ b/chart2/source/view/main/LabelPositionHelper.cxx
@@ -25,7 +25,8 @@
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
#include <com/sun/star/drawing/XShape.hpp>
-#include <rtl/math.hxx>
+
+#include <cmath>
namespace chart
{
@@ -123,36 +124,36 @@ void lcl_correctRotation_Left( double& rfXCorrection, double& rfYCorrection
}
else if( fAnglePositiveDegree<= 90.0 )
{
- rfXCorrection = -aSize.Height*rtl::math::sin( fAnglePi )/2.0;
+ rfXCorrection = -aSize.Height*std::sin( fAnglePi )/2.0;
if( bRotateAroundCenter )
- rfYCorrection = -aSize.Width*rtl::math::sin( fAnglePi )/2.0;
+ rfYCorrection = -aSize.Width*std::sin( fAnglePi )/2.0;
}
else if( fAnglePositiveDegree<= 180.0 )
{
double beta = fAnglePi-F_PI2;
- rfXCorrection = -aSize.Width *rtl::math::sin( beta )
- -aSize.Height *rtl::math::cos( beta )/2.0;
+ rfXCorrection = -aSize.Width *std::sin( beta )
+ -aSize.Height *std::cos( beta )/2.0;
if( bRotateAroundCenter )
- rfYCorrection = -aSize.Width *rtl::math::cos( beta )/2.0;
+ rfYCorrection = -aSize.Width *std::cos( beta )/2.0;
else
- rfYCorrection = -aSize.Width *rtl::math::cos( beta );
+ rfYCorrection = -aSize.Width *std::cos( beta );
}
else if( fAnglePositiveDegree<= 270.0 )
{
double beta = fAnglePi - F_PI;
- rfXCorrection = -aSize.Width *rtl::math::cos( beta )
- -aSize.Height*rtl::math::sin( beta )/2.0;
+ rfXCorrection = -aSize.Width *std::cos( beta )
+ -aSize.Height*std::sin( beta )/2.0;
if( bRotateAroundCenter )
- rfYCorrection = aSize.Width *rtl::math::sin( beta )/2.0;
+ rfYCorrection = aSize.Width *std::sin( beta )/2.0;
else
- rfYCorrection = aSize.Width *rtl::math::sin( beta );
+ rfYCorrection = aSize.Width *std::sin( beta );
}
else
{
double beta = 2*F_PI - fAnglePi;
- rfXCorrection = -aSize.Height*rtl::math::sin( beta )/2.0;
+ rfXCorrection = -aSize.Height*std::sin( beta )/2.0;
if( bRotateAroundCenter )
- rfYCorrection = aSize.Width*rtl::math::sin( beta )/2.0;
+ rfYCorrection = aSize.Width*std::sin( beta )/2.0;
}
}
@@ -166,35 +167,35 @@ void lcl_correctRotation_Right( double& rfXCorrection, double& rfYCorrection
}
else if( fAnglePositiveDegree<= 90.0 )
{
- rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi )/2.0;
+ rfXCorrection = aSize.Height*std::sin( fAnglePi )/2.0;
if( bRotateAroundCenter )
- rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi )/2.0;
+ rfYCorrection = aSize.Width*std::sin( fAnglePi )/2.0;
}
else if( fAnglePositiveDegree<= 180.0 )
{
double beta = F_PI - fAnglePi;
- rfXCorrection = aSize.Width *rtl::math::cos( beta )
- + aSize.Height*rtl::math::sin( beta )/2.0;
+ rfXCorrection = aSize.Width *std::cos( beta )
+ + aSize.Height*std::sin( beta )/2.0;
if( bRotateAroundCenter )
- rfYCorrection = aSize.Width *rtl::math::sin( beta )/2.0;
+ rfYCorrection = aSize.Width *std::sin( beta )/2.0;
else
- rfYCorrection = aSize.Width *rtl::math::sin( beta );
+ rfYCorrection = aSize.Width *std::sin( beta );
}
else if( fAnglePositiveDegree<= 270.0 )
{
double beta = 3*F_PI2 - fAnglePi;
- rfXCorrection = aSize.Width *rtl::math::sin( beta )
- +aSize.Height*rtl::math::cos( beta )/2.0;
+ rfXCorrection = aSize.Width *std::sin( beta )
+ +aSize.Height*std::cos( beta )/2.0;
if( bRotateAroundCenter )
- rfYCorrection = -aSize.Width *rtl::math::cos( beta )/2.0;
+ rfYCorrection = -aSize.Width *std::cos( beta )/2.0;
else
- rfYCorrection = -aSize.Width *rtl::math::cos( beta );
+ rfYCorrection = -aSize.Width *std::cos( beta );
}
else
{
- rfXCorrection = aSize.Height*rtl::math::sin( 2*F_PI - fAnglePi )/2.0;
+ rfXCorrection = aSize.Height*std::sin( 2*F_PI - fAnglePi )/2.0;
if( bRotateAroundCenter )
- rfYCorrection = -aSize.Width*rtl::math::sin( 2*F_PI - fAnglePi )/2.0;
+ rfYCorrection = -aSize.Width*std::sin( 2*F_PI - fAnglePi )/2.0;
}
}
@@ -208,35 +209,35 @@ void lcl_correctRotation_Top( double& rfXCorrection, double& rfYCorrection
}
else if( fAnglePositiveDegree<= 90.0 )
{
- rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi )/2.0;
+ rfXCorrection = aSize.Height*std::sin( fAnglePi )/2.0;
if( !bRotateAroundCenter )
- rfXCorrection += aSize.Width*rtl::math::cos( fAnglePi )/2.0;
- rfYCorrection = -aSize.Width*rtl::math::sin( fAnglePi )/2.0;
+ rfXCorrection += aSize.Width*std::cos( fAnglePi )/2.0;
+ rfYCorrection = -aSize.Width*std::sin( fAnglePi )/2.0;
}
else if( fAnglePositiveDegree<= 180.0 )
{
double beta = fAnglePi - F_PI2;
- rfXCorrection = aSize.Height*rtl::math::cos( beta )/2.0;
+ rfXCorrection = aSize.Height*std::cos( beta )/2.0;
if( !bRotateAroundCenter )
- rfXCorrection -= aSize.Width*rtl::math::sin( beta )/2.0;
- rfYCorrection = -aSize.Width*rtl::math::cos( beta )/2.0
- - aSize.Height*rtl::math::sin( beta );
+ rfXCorrection -= aSize.Width*std::sin( beta )/2.0;
+ rfYCorrection = -aSize.Width*std::cos( beta )/2.0
+ - aSize.Height*std::sin( beta );
}
else if( fAnglePositiveDegree<= 270.0 )
{
double beta = fAnglePi - F_PI;
- rfXCorrection = -aSize.Height *rtl::math::sin( beta )/2.0;
+ rfXCorrection = -aSize.Height *std::sin( beta )/2.0;
if( !bRotateAroundCenter )
- rfXCorrection += aSize.Width *rtl::math::cos( beta )/2.0;
- rfYCorrection = -aSize.Width *rtl::math::sin( beta )/2.0
- -aSize.Height *rtl::math::cos( beta );
+ rfXCorrection += aSize.Width *std::cos( beta )/2.0;
+ rfYCorrection = -aSize.Width *std::sin( beta )/2.0
+ -aSize.Height *std::cos( beta );
}
else
{
- rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi )/2.0;
+ rfXCorrection = aSize.Height*std::sin( fAnglePi )/2.0;
if( !bRotateAroundCenter )
- rfXCorrection -= aSize.Width*rtl::math::cos( fAnglePi )/2.0;
- rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi )/2.0;
+ rfXCorrection -= aSize.Width*std::cos( fAnglePi )/2.0;
+ rfYCorrection = aSize.Width*std::sin( fAnglePi )/2.0;
}
}
@@ -250,36 +251,36 @@ void lcl_correctRotation_Bottom( double& rfXCorrection, double& rfYCorrection
}
else if( fAnglePositiveDegree<= 90.0 )
{
- rfXCorrection = -aSize.Height*rtl::math::sin( fAnglePi )/2.0;
+ rfXCorrection = -aSize.Height*std::sin( fAnglePi )/2.0;
if( !bRotateAroundCenter )
- rfXCorrection -= aSize.Width *rtl::math::cos( fAnglePi )/2.0;
- rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi )/2.0;
+ rfXCorrection -= aSize.Width *std::cos( fAnglePi )/2.0;
+ rfYCorrection = aSize.Width*std::sin( fAnglePi )/2.0;
}
else if( fAnglePositiveDegree<= 180.0 )
{
double beta = fAnglePi-F_PI2;
- rfXCorrection = -aSize.Height*rtl::math::cos( beta )/2.0;
+ rfXCorrection = -aSize.Height*std::cos( beta )/2.0;
if( !bRotateAroundCenter )
- rfXCorrection += aSize.Width *rtl::math::sin( beta )/2.0;
- rfYCorrection = aSize.Width *rtl::math::cos( beta )/2.0
- +aSize.Height*rtl::math::sin( beta );
+ rfXCorrection += aSize.Width *std::sin( beta )/2.0;
+ rfYCorrection = aSize.Width *std::cos( beta )/2.0
+ +aSize.Height*std::sin( beta );
}
else if( fAnglePositiveDegree<= 270.0 )
{
double beta = 3*F_PI2 - fAnglePi;
- rfXCorrection = aSize.Height*rtl::math::cos( beta )/2.0;
+ rfXCorrection = aSize.Height*std::cos( beta )/2.0;
if( !bRotateAroundCenter )
- rfXCorrection -= aSize.Width *rtl::math::sin( beta )/2.0;
- rfYCorrection = aSize.Height*rtl::math::sin( beta )
- +aSize.Width*rtl::math::cos( beta )/2.0;
+ rfXCorrection -= aSize.Width *std::sin( beta )/2.0;
+ rfYCorrection = aSize.Height*std::sin( beta )
+ +aSize.Width*std::cos( beta )/2.0;
}
else
{
double beta = 2*F_PI - fAnglePi;
- rfXCorrection = aSize.Height*rtl::math::sin( beta )/2.0;
+ rfXCorrection = aSize.Height*std::sin( beta )/2.0;
if( !bRotateAroundCenter )
- rfXCorrection += aSize.Width*rtl::math::cos( beta )/2.0;
- rfYCorrection = aSize.Width*rtl::math::sin( beta )/2.0;
+ rfXCorrection += aSize.Width*std::cos( beta )/2.0;
+ rfYCorrection = aSize.Width*std::sin( beta )/2.0;
}
}
@@ -293,25 +294,25 @@ void lcl_correctRotation_Left_Top( double& rfXCorrection, double& rfYCorrection
}
else if( fAnglePositiveDegree<= 90.0 )
{
- rfYCorrection = -aSize.Width*rtl::math::sin( fAnglePi );
+ rfYCorrection = -aSize.Width*std::sin( fAnglePi );
}
else if( fAnglePositiveDegree<= 180.0 )
{
double beta = fAnglePi-F_PI2;
- rfXCorrection = -aSize.Width*rtl::math::sin( beta );
- rfYCorrection = -aSize.Height*rtl::math::sin( beta )
- -aSize.Width*rtl::math::cos( beta );
+ rfXCorrection = -aSize.Width*std::sin( beta );
+ rfYCorrection = -aSize.Height*std::sin( beta )
+ -aSize.Width*std::cos( beta );
}
else if( fAnglePositiveDegree<= 270.0 )
{
double beta = 3*F_PI2 - fAnglePi;
- rfXCorrection = -aSize.Height*rtl::math::cos( beta )
- -aSize.Width*rtl::math::sin( beta );
- rfYCorrection = -aSize.Height*rtl::math::sin( beta );
+ rfXCorrection = -aSize.Height*std::cos( beta )
+ -aSize.Width*std::sin( beta );
+ rfYCorrection = -aSize.Height*std::sin( beta );
}
else
{
- rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi );
+ rfXCorrection = aSize.Height*std::sin( fAnglePi );
}
}
@@ -325,25 +326,25 @@ void lcl_correctRotation_Left_Bottom( double& rfXCorrection, double& rfYCorrecti
}
else if( fAnglePositiveDegree<= 90.0 )
{
- rfXCorrection = -aSize.Height*rtl::math::sin( fAnglePi );
+ rfXCorrection = -aSize.Height*std::sin( fAnglePi );
}
else if( fAnglePositiveDegree<= 180.0 )
{
double beta = fAnglePi-F_PI2;
- rfXCorrection = -aSize.Width*rtl::math::sin( beta )
- -aSize.Height*rtl::math::cos( beta );
- rfYCorrection = aSize.Height*rtl::math::sin( beta );
+ rfXCorrection = -aSize.Width*std::sin( beta )
+ -aSize.Height*std::cos( beta );
+ rfYCorrection = aSize.Height*std::sin( beta );
}
else if( fAnglePositiveDegree<= 270.0 )
{
double beta = 3*F_PI2 - fAnglePi;
- rfXCorrection = -aSize.Width*rtl::math::sin( beta );
- rfYCorrection = aSize.Width*rtl::math::cos( beta )
- +aSize.Height*rtl::math::sin( beta );
+ rfXCorrection = -aSize.Width*std::sin( beta );
+ rfYCorrection = aSize.Width*std::cos( beta )
+ +aSize.Height*std::sin( beta );
}
else
{
- rfYCorrection = -aSize.Width*rtl::math::sin( fAnglePi );
+ rfYCorrection = -aSize.Width*std::sin( fAnglePi );
}
}
@@ -357,25 +358,25 @@ void lcl_correctRotation_Right_Top( double& rfXCorrection, double& rfYCorrection
}
else if( fAnglePositiveDegree<= 90.0 )
{
- rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi );
+ rfXCorrection = aSize.Height*std::sin( fAnglePi );
}
else if( fAnglePositiveDegree<= 180.0 )
{
double beta = fAnglePi-F_PI2;
- rfXCorrection = aSize.Width*rtl::math::sin( beta )
- +aSize.Height*rtl::math::cos( beta );
- rfYCorrection = -aSize.Height*rtl::math::sin( beta );
+ rfXCorrection = aSize.Width*std::sin( beta )
+ +aSize.Height*std::cos( beta );
+ rfYCorrection = -aSize.Height*std::sin( beta );
}
else if( fAnglePositiveDegree<= 270.0 )
{
double beta = 3*F_PI2 - fAnglePi;
- rfXCorrection = aSize.Width*rtl::math::sin( beta );
- rfYCorrection = -aSize.Width*rtl::math::cos( beta )
- -aSize.Height*rtl::math::sin( beta );
+ rfXCorrection = aSize.Width*std::sin( beta );
+ rfYCorrection = -aSize.Width*std::cos( beta )
+ -aSize.Height*std::sin( beta );
}
else
{
- rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi );
+ rfYCorrection = aSize.Width*std::sin( fAnglePi );
}
}
@@ -389,25 +390,25 @@ void lcl_correctRotation_Right_Bottom( double& rfXCorrection, double& rfYCorrect
}
else if( fAnglePositiveDegree<= 90.0 )
{
- rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi );
+ rfYCorrection = aSize.Width*std::sin( fAnglePi );
}
else if( fAnglePositiveDegree<= 180.0 )
{
double beta = fAnglePi-F_PI2;
- rfXCorrection = aSize.Width*rtl::math::sin( beta );
- rfYCorrection = aSize.Height*rtl::math::sin( beta )
- +aSize.Width*rtl::math::cos( beta );
+ rfXCorrection = aSize.Width*std::sin( beta );
+ rfYCorrection = aSize.Height*std::sin( beta )
+ +aSize.Width*std::cos( beta );
}
else if( fAnglePositiveDegree<= 270.0 )
{
double beta = 3*F_PI2 - fAnglePi;
- rfXCorrection = aSize.Height*rtl::math::cos( beta )
- +aSize.Width*rtl::math::sin( beta );
- rfYCorrection = aSize.Height*rtl::math::sin( beta );
+ rfXCorrection = aSize.Height*std::cos( beta )
+ +aSize.Width*std::sin( beta );
+ rfYCorrection = aSize.Height*std::sin( beta );
}
else
{
- rfXCorrection = -aSize.Height*rtl::math::sin( fAnglePi );
+ rfXCorrection = -aSize.Height*std::sin( fAnglePi );
}
}
diff --git a/chart2/source/view/main/PlottingPositionHelper.cxx b/chart2/source/view/main/PlottingPositionHelper.cxx
index b8e9431ae2ab..69a346b067e3 100644
--- a/chart2/source/view/main/PlottingPositionHelper.cxx
+++ b/chart2/source/view/main/PlottingPositionHelper.cxx
@@ -615,8 +615,8 @@ drawing::Position3D PolarPlottingPositionHelper::transformUnitCircleToScene( dou
{
double fAnglePi = basegfx::deg2rad(fUnitAngleDegree);
- double fX=fUnitRadius*rtl::math::cos(fAnglePi);
- double fY=fUnitRadius*rtl::math::sin(fAnglePi);
+ double fX=fUnitRadius*std::cos(fAnglePi);
+ double fY=fUnitRadius*std::sin(fAnglePi);
double fZ=fLogicZ;
//!! applying matrix to vector does ignore translation, so it is important to use a B3DPoint here instead of B3DVector
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index 5b7c4859beb8..5f2cfb442820 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2632,11 +2632,11 @@ awt::Size ShapeFactory::getSizeAfterRotation(
const double fAnglePi = basegfx::deg2rad(fRotationAngleDegree);
aRet.Height = static_cast<sal_Int32>(
- aSize.Width*rtl::math::sin( fAnglePi )
- + aSize.Height*rtl::math::cos( fAnglePi ));
+ aSize.Width*std::sin( fAnglePi )
+ + aSize.Height*std::cos( fAnglePi ));
aRet.Width = static_cast<sal_Int32>(
- aSize.Width*rtl::math::cos( fAnglePi )
- + aSize.Height*rtl::math::sin( fAnglePi ));
+ aSize.Width*std::cos( fAnglePi )
+ + aSize.Height*std::sin( fAnglePi ));
}
}
return aRet;