Blob Blame History Raw
From 008f5ba99fd89cd6a6e4db90e8db16e02fe0b027 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= <matus.kukan@collabora.com>
Date: Fri, 18 Jul 2014 10:04:09 +0200
Subject: [PATCH 031/137] use rtl::math::round here to get the same number on
 32/64bit platforms

This fixes sd_import_tests where 100*0.35 was 34 on 32bit platform.

Change-Id: I45705326e91892beb814bd94e074b0a652709768
(cherry picked from commit ba6da9545764f2545313ba085ed4a096165180fd)
Reviewed-on: https://gerrit.libreoffice.org/10382
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
---
 oox/source/drawingml/fillproperties.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index a5eb026..a81a5d2 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -37,6 +37,7 @@
 #include "oox/drawingml/drawingmltypes.hxx"
 #include "oox/drawingml/shapepropertymap.hxx"
 #include "oox/token/tokens.hxx"
+#include <rtl/math.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::drawing;
@@ -567,7 +568,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
                         if( aEndColor.hasTransparency() )
                             nEndTrans = aEndColor.getTransparency()*255/100;
 
-                        aGradient.Border = 100*nBorder;
+                        aGradient.Border = rtl::math::round(100*nBorder);
                     }
 
                     // push gradient or named gradient to property map
-- 
1.9.3