summaryrefslogtreecommitdiff
path: root/svgio/source/svgreader/svgsvgnode.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-11-11 10:27:23 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-11-11 10:18:07 +0100
commit4cdca3702cda246ecc490c65973e525ff5cf25ab (patch)
treebb40f5ece57a5913c5b8f052bbd7c0244fc1f1d7 /svgio/source/svgreader/svgsvgnode.cxx
parent1ef0261539ca6ee8ad9f43d91536c9caa4f7ea53 (diff)
Use o3tl::convert
Change-Id: I62239252efed514de7db88b4bea6f4d4d719fb17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125021 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svgio/source/svgreader/svgsvgnode.cxx')
-rw-r--r--svgio/source/svgreader/svgsvgnode.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index 027f9e505ae7..7132c2e6d7bc 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -26,6 +26,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx>
+#include <o3tl/unit_conversion.hxx>
#include <svgdocument.hxx>
namespace svgio::svgreader
@@ -677,9 +678,8 @@ namespace svgio::svgreader
if(bEmbedInFinalTransformPxTo100ThMM)
{
// embed in transform primitive to scale to 1/100th mm
- // where 1 inch == 25.4 mm to get from Svg coordinates (px) to
- // drawinglayer coordinates
- const double fScaleTo100thmm(25.4 * 100.0 / F_SVG_PIXEL_PER_INCH);
+ // to get from Svg coordinates (px) to drawinglayer coordinates
+ constexpr double fScaleTo100thmm(o3tl::convert(1.0, o3tl::Length::px, o3tl::Length::mm100));
const basegfx::B2DHomMatrix aTransform(
basegfx::utils::createScaleB2DHomMatrix(
fScaleTo100thmm,