summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/chardlg.cxx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-01-11 08:54:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-12 17:38:53 +0100
commitd765ec2295d12ccde1fb25aa92c5d821de748add (patch)
treec2f806389478df23b78319c6043971f92995851c /cui/source/tabpages/chardlg.cxx
parenta1d6701105456248f6ff39766a6699f26a8f3d60 (diff)
transparency->alpha in tools::Color
this just changes the Get/Set methods, the constructor and internal representation of Color is not changed. Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/tabpages/chardlg.cxx')
-rw-r--r--cui/source/tabpages/chardlg.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 5751a9e8064f..a7e3dda42bc9 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1545,13 +1545,13 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet )
Color aRGBColor = aColor;
if (aRGBColor.IsTransparent() && aColor != COL_AUTO)
{
- aRGBColor.SetTransparency(0);
+ aRGBColor.SetAlpha(255);
}
m_xFontColorLB->SelectEntry(aRGBColor);
if (m_xFontTransparencyMtr->get_visible() && aColor != COL_AUTO)
{
- double fTransparency = aColor.GetTransparency() * 100.0 / 255;
+ double fTransparency = (255 - aColor.GetAlpha()) * 100.0 / 255;
m_xFontTransparencyMtr->set_value(basegfx::fround(fTransparency),
FieldUnit::PERCENT);
}
@@ -1580,7 +1580,7 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet )
{
double fTransparency
= m_xFontTransparencyMtr->get_value(FieldUnit::PERCENT) * 255.0 / 100;
- aSelectedColor.SetTransparency(static_cast<sal_uInt8>(basegfx::fround(fTransparency)));
+ aSelectedColor.SetAlpha(255 - static_cast<sal_uInt8>(basegfx::fround(fTransparency)));
}
if (m_bOrigFontColor)