summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-02-05 20:05:17 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-02-19 10:38:03 +0100
commitbba3afbd5e5ad65375e832a0e3174fe70d42a6e5 (patch)
tree46b74245c2efb6c628cfa55de03a8ed179119106
parentce5cf53a661a4083c1f2eb1c341c32e7e3cdde8a (diff)
write color components properly in debug output
They are sal_uInt8, which is technically unsigned char, and those are normally written as chars, not as numbers. Change-Id: I63d81ce270f95d06f1641eea3b2231a12a8aea2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111124 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r--vcl/skia/salbmp.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 70405e2b5111..e89a824f0d84 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -1229,8 +1229,9 @@ OString SkiaSalBitmap::GetImageKey() const
if (mEraseColorSet)
{
std::stringstream ss;
- ss << std::hex << std::setfill('0') << std::setw(2) << mEraseColor.GetAlpha()
- << std::setw(6) << sal_uInt32(mEraseColor.GetRGBColor());
+ ss << std::hex << std::setfill('0') << std::setw(6)
+ << static_cast<sal_uInt32>(mEraseColor.GetRGBColor()) << std::setw(2)
+ << static_cast<int>(mEraseColor.GetAlpha());
return OStringLiteral("E") + ss.str().c_str();
}
return OStringLiteral("I") + OString::number(GetSkImage()->uniqueID());
@@ -1242,7 +1243,7 @@ OString SkiaSalBitmap::GetAlphaImageKey() const
{
std::stringstream ss;
ss << std::hex << std::setfill('0') << std::setw(2)
- << (255 - SkColorGetA(fromEraseColorToAlphaImageColor(mEraseColor)));
+ << static_cast<int>(255 - SkColorGetA(fromEraseColorToAlphaImageColor(mEraseColor)));
return OStringLiteral("E") + ss.str().c_str();
}
return OStringLiteral("I") + OString::number(GetAlphaSkImage()->uniqueID());