summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-01-16 19:20:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-17 08:51:14 +0100
commit5bbaca6d3ccef10223b8618c25f41b91dd467ffc (patch)
tree611640e69168c0f5d28efeb8e6b7f32e06eb2d98 /filter
parent50678a771daa6cd5d3414c25930761c65aab4244 (diff)
return Color from BGRToRGB
instead of converting at all the call-sites Change-Id: I4732082fcd4731f6fd46aef197a15564586f0c90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109450 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/util.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index c72a2802c7be..63d12f514c24 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -42,15 +42,14 @@ rtl_TextEncoding getBestTextEncodingFromLocale(const css::lang::Locale &rLocale)
return RTL_TEXTENCODING_MS_1252;
}
-sal_uInt32 BGRToRGB(sal_uInt32 nColor)
+::Color BGRToRGB(sal_uInt32 nColor)
{
sal_uInt8
r(static_cast<sal_uInt8>(nColor&0xFF)),
g(static_cast<sal_uInt8>((nColor>>8)&0xFF)),
b(static_cast<sal_uInt8>((nColor>>16)&0xFF)),
t(static_cast<sal_uInt8>((nColor>>24)&0xFF));
- nColor = (t<<24) + (r<<16) + (g<<8) + b;
- return nColor;
+ return ::Color(ColorTransparency, (t<<24) + (r<<16) + (g<<8) + b);
}
DateTime DTTM2DateTime( tools::Long lDTTM )