summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx4
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx3
-rw-r--r--chart2/source/view/main/VLegend.cxx4
3 files changed, 6 insertions, 5 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index f405396e113c..92cb3786d594 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -61,6 +61,7 @@
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <tools/color.hxx>
+#include <tools/UnitConversion.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
#include <basegfx/vector/b2dvector.hxx>
@@ -451,8 +452,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
uno::Reference< beans::XPropertySet > xProps( rDataSeries.getPropertiesOfPoint( nPointIndex ) );
if( xProps.is() )
xProps->getPropertyValue( "CharHeight") >>= fViewFontSize;
- // pt -> 1/100th mm
- fViewFontSize *= (2540.0f / 72.0f);
+ fViewFontSize = convertPointToMm100(fViewFontSize);
}
// the font height is used for computing the size of an optional legend
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index 22b9f8d07820..5b7c4859beb8 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -56,6 +56,7 @@
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <tools/diagnose_ex.h>
#include <tools/helpers.hxx>
+#include <tools/UnitConversion.hxx>
#include <sal/log.hxx>
#include <algorithm>
@@ -2391,7 +2392,7 @@ uno::Reference< drawing::XShape >
float fFontHeight = 0.0;
if ( xShapeProp.is() && ( xShapeProp->getPropertyValue( "CharHeight" ) >>= fFontHeight ) )
{
- fFontHeight *= ( 2540.0f / 72.0f ); // pt -> 1/100 mm
+ fFontHeight = convertPointToMm100(fFontHeight);
sal_Int32 nXDistance = static_cast< sal_Int32 >( ::rtl::math::round( fFontHeight * 0.18f ) );
sal_Int32 nYDistance = static_cast< sal_Int32 >( ::rtl::math::round( fFontHeight * 0.30f ) );
xShapeProp->setPropertyValue( "TextLeftDistance", uno::Any( nXDistance ) );
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 77e6b5800dc5..e05aa94db702 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -42,6 +42,7 @@
#include <rtl/math.hxx>
#include <svl/languageoptions.hxx>
#include <tools/diagnose_ex.h>
+#include <tools/UnitConversion.hxx>
#include <vector>
#include <algorithm>
@@ -85,8 +86,7 @@ double lcl_CalcViewFontSize(
}
}
- // pt -> 1/100th mm
- return (fResult * (2540.0 / 72.0));
+ return convertPointToMm100(fResult);
}
void lcl_getProperties(