summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2020-12-24 11:32:51 +1100
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-26 19:25:17 +0100
commitb75c9642f0cae522c5cc0f059e801819662b2ddf (patch)
tree2afc38645359cc5dfd007b94b63117c8c1898239 /editeng
parent43978d8f25a41c20c72d93cc3cb972c93c52674a (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/frmitems.cxx2
-rw-r--r--editeng/source/items/legacyitem.cxx6
2 files changed, 4 insertions, 4 deletions
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<sal_uInt8>(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;
}
}