diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2019-11-12 12:21:20 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-11-13 08:34:23 +0100 |
commit | 124db1f2e3008493254e5d710221dbdd40a526db (patch) | |
tree | 84e0e2e02d0feacdff8146b2b423b9a87afc5ec0 /oox/source | |
parent | d7149889a9e1cae7f255691c2a35090ac3245bfa (diff) |
tdf#128732 Chart OOXML import: fix rounding error of color transparency
Change-Id: I52efb541d62a9536c2eb5f99453dc2cb594e6fe4
Reviewed-on: https://gerrit.libreoffice.org/82500
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/drawingml/color.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx index 325b68227fe9..09b033352877 100644 --- a/oox/source/drawingml/color.cxx +++ b/oox/source/drawingml/color.cxx @@ -623,7 +623,7 @@ bool Color::hasTransparency() const sal_Int16 Color::getTransparency() const { - return static_cast< sal_Int16 >( (MAX_PERCENT - mnAlpha) / PER_PERCENT ); + return sal_Int16(std::round( (1.0 * (MAX_PERCENT - mnAlpha)) / PER_PERCENT) ); } // private -------------------------------------------------------------------- |