diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-02-05 19:35:14 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-02-06 17:05:44 +0100 |
commit | 956c09ca7d690471f62e8e2e14ad04fefcebf7e7 (patch) | |
tree | c681ace388370acf5842c73d45e9e9d8880777af /chart2/source/view/charttypes/VSeriesPlotter.cxx | |
parent | ca074a47e8fdae396633dad6f59450508bb2c9f0 (diff) |
Use more conversion functions from <tools/UnitConversion.hxx>
This unifies conversion functions to provide both floating-point
and integral overloads, with correct rounding for the latter.
Also sanitizing code it templatized to allow reuse if needed.
Change-Id: Ibe1c9fe4d5baa226c600445779dbaf7dc41a02cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110487
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'chart2/source/view/charttypes/VSeriesPlotter.cxx')
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 4 |
1 files changed, 2 insertions, 2 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 |