From 5bbaca6d3ccef10223b8618c25f41b91dd467ffc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 16 Jan 2021 19:20:07 +0200 Subject: 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 --- filter/source/msfilter/util.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'filter') 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(nColor&0xFF)), g(static_cast((nColor>>8)&0xFF)), b(static_cast((nColor>>16)&0xFF)), t(static_cast((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 ) -- cgit > LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author