diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-02-08 21:19:13 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-02-09 09:42:50 +0100 |
commit | ebc6cfbb323d2f933336f7e2f4a775098c4f4341 (patch) | |
tree | 792470ebc1f367ed63774cadb62bd7d4a93a4051 /include | |
parent | 033ebc5a5d76bff179ca778412e6923b605217d5 (diff) |
more terse string output for BitmapColor
Change-Id: Ia8ef9bcf10b2a2312f9f1c09afa8124a63822d1c
Reviewed-on: https://gerrit.libreoffice.org/67570
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/salbtype.hxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx index e20342f19184..ec953d209030 100644 --- a/include/vcl/salbtype.hxx +++ b/include/vcl/salbtype.hxx @@ -86,10 +86,10 @@ class VCL_DLLPUBLIC BitmapColor final { private: - sal_uInt8 mcBlueOrIndex; - sal_uInt8 mcGreen; - sal_uInt8 mcRed; - sal_uInt8 mcAlpha; + sal_uInt8 mcBlueOrIndex; + sal_uInt8 mcGreen; + sal_uInt8 mcRed; + sal_uInt8 mcAlpha; public: @@ -133,8 +133,7 @@ public: template<typename charT, typename traits> inline std::basic_ostream<charT, traits>& operator <<(std::basic_ostream<charT, traits>& rStream, const BitmapColor& rColor) { - return rStream << "mcBlueOrIndex: " << static_cast<int>(rColor.GetBlueOrIndex()) << ", mcGreen: " - << static_cast<int>(rColor.GetGreen()) << ", mcRed: " << static_cast<int>(rColor.GetRed()) << ", mcAlpha: " << static_cast<int>(rColor.GetAlpha()); + return rStream << "#(" << std::hex << std::setfill ('0') << std::setw(2) << static_cast<int>(rColor.GetRed()) << static_cast<int>(rColor.GetGreen()) << static_cast<int>(rColor.GetBlueOrIndex()) << static_cast<int>(rColor.GetAlpha()) << ")"; } class VCL_DLLPUBLIC BitmapPalette |