[Libreoffice-commits] core.git: sc/source
Stephan Bergmann
sbergman at redhat.com
Wed Jan 17 07:37:35 UTC 2018
sc/source/filter/excel/xeescher.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit cc9e89816f8193989ea4ee5bfd9b1c39b196b5e7
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 16 15:15:10 2018 +0100
Misplaced static_cast
...introduced with 58d863eec084029716eccab7f941727fc650415e "sc: replace local
macros" changing from
> #define HMM2XL(x) ((x)/26.5)+0.5
[...]
> aFrom = Rectangle( nCol-1, static_cast<long>(HMM2XL( nColOff )),
[...]
to
> inline long lcl_hmm2px(long nPixel)
> {
> return static_cast<long>(nPixel*PIXEL_PER_INCH/1000.0/CM_PER_INCH)+0.5;
> }
[...]
> aFrom = Rectangle( nCol-1, lcl_hmm2px( nColOff ),
[...]
Change-Id: Ia98d659e494255e5dbb4e9d47d20df121ccdcc44
Reviewed-on: https://gerrit.libreoffice.org/47993
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index fcd3d102659b..93f9bb047cf9 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -104,7 +104,7 @@ namespace
inline long lcl_hmm2px(long nPixel)
{
- return static_cast<long>(nPixel*PIXEL_PER_INCH/1000.0/CM_PER_INCH)+0.5;
+ return static_cast<long>(nPixel*PIXEL_PER_INCH/1000.0/CM_PER_INCH + 0.5);
}
const char *ToHorizAlign( SdrTextHorzAdjust eAdjust )
More information about the Libreoffice-commits
mailing list