From b75c9642f0cae522c5cc0f059e801819662b2ddf Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Thu, 24 Dec 2020 11:32:51 +1100 Subject: vcl: use Color:IsTransparent() where appropriate Change-Id: I37bbab5f22f91faad65be8ef79734ce1ee6355d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108249 Tested-by: Jenkins Reviewed-by: Noel Grandin --- editeng/source/items/frmitems.cxx | 2 +- editeng/source/items/legacyitem.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'editeng') diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 283fc2fb6eab..cb3c4a14a136 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1032,7 +1032,7 @@ bool SvxShadowItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const } aShadow.Location = eSet; aShadow.ShadowWidth = bConvert ? convertTwipToMm100(nWidth) : nWidth; - aShadow.IsTransparent = aShadowColor.GetTransparency() > 0; + aShadow.IsTransparent = aShadowColor.IsTransparent(); aShadow.Color = sal_Int32(aShadowColor); sal_Int8 nTransparence = rtl::math::round(float(aShadowColor.GetTransparency() * 100) / 255); diff --git a/editeng/source/items/legacyitem.cxx b/editeng/source/items/legacyitem.cxx index af41980b2d2c..bb9a7cf03b47 100644 --- a/editeng/source/items/legacyitem.cxx +++ b/editeng/source/items/legacyitem.cxx @@ -595,7 +595,7 @@ namespace legacy tools::GenericTypeSerializer aSerializer(rStrm); aSerializer.writeColor(rItem.GetColor()); aSerializer.writeColor(rItem.GetColor()); - rStrm.WriteSChar( rItem.GetColor().GetTransparency() > 0 ? 0 : 1 ); //BRUSH_NULL : BRUSH_SOLID + rStrm.WriteSChar( rItem.GetColor().IsTransparent() ? 0 : 1 ); //BRUSH_NULL : BRUSH_SOLID sal_uInt16 nDoLoad = 0; const GraphicObject* pGraphicObject(rItem.GetGraphicObject()); @@ -811,11 +811,11 @@ namespace legacy { rStrm.WriteSChar( static_cast(rItem.GetLocation()) ) .WriteUInt16( rItem.GetWidth() ) - .WriteBool( rItem.GetColor().GetTransparency() > 0 ); + .WriteBool( rItem.GetColor().IsTransparent() ); tools::GenericTypeSerializer aSerializer(rStrm); aSerializer.writeColor(rItem.GetColor()); aSerializer.writeColor(rItem.GetColor()); - rStrm.WriteSChar( rItem.GetColor().GetTransparency() > 0 ? 0 : 1 ); //BRUSH_NULL : BRUSH_SOLID + rStrm.WriteSChar( rItem.GetColor().IsTransparent() ? 0 : 1 ); //BRUSH_NULL : BRUSH_SOLID return rStrm; } } -- cgit