summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-01-08 14:48:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-08 18:15:22 +0100
commit5c9ace48f05269c50d57642256153450335ace5f (patch)
tree24d1196b93f0043c6eb6259979a34c4254e35a20 /svx
parent0ea17e24702dabc6287345796417bb08c44244d6 (diff)
Introduce Color::IsFullyTransparent
Change-Id: I94875b9fb7ee18edf63ed28902da4ae77eb14bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108973 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx18
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx4
2 files changed, 11 insertions, 11 deletions
diff --git a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
index 76af6c23b68e..6e289d4be3f1 100644
--- a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
@@ -126,9 +126,9 @@ namespace
if (bSecnUsed)
{
// both or all three lines used
- const bool bPrimTransparent(0xff == rStyle.GetColorPrim().GetTransparency());
- const bool bDistTransparent(!rStyle.UseGapColor() || 0xff == rStyle.GetColorGap().GetTransparency());
- const bool bSecnTransparent(0xff == aSecn.GetTransparency());
+ const bool bPrimTransparent(rStyle.GetColorPrim().IsFullyTransparent());
+ const bool bDistTransparent(!rStyle.UseGapColor() || rStyle.GetColorGap().IsFullyTransparent());
+ const bool bSecnTransparent(aSecn.IsFullyTransparent());
if(!bPrimTransparent || !bDistTransparent || !bSecnTransparent)
{
@@ -161,7 +161,7 @@ namespace
else
{
// one line used, push two values, from outer to inner
- if(0xff != rStyle.GetColorPrim().GetTransparency())
+ if(!rStyle.GetColorPrim().IsFullyTransparent())
{
maOffsets.push_back(
OffsetAndHalfWidthAndColor(
@@ -325,7 +325,7 @@ namespace
Color aMyColor; double fMyOffset(0.0); double fMyHalfWidth(0.0);
rCombination.getColorAndOffsetAndHalfWidth(0, aMyColor, fMyOffset, fMyHalfWidth);
- if(0xff != aMyColor.GetTransparency())
+ if(!aMyColor.IsFullyTransparent())
{
const basegfx::B2DPoint aLeft(rOrigin + (rPerpendX * (fMyOffset - fMyHalfWidth)));
const basegfx::B2DPoint aRight(rOrigin + (rPerpendX * (fMyOffset + fMyHalfWidth)));
@@ -341,7 +341,7 @@ namespace
Color aOtherColor; double fOtherOffset(0.0); double fOtherHalfWidth(0.0);
rStyleCandidate.getColorAndOffsetAndHalfWidth(other, aOtherColor, fOtherOffset, fOtherHalfWidth);
- if(0xff != aOtherColor.GetTransparency())
+ if(!aOtherColor.IsFullyTransparent())
{
const basegfx::B2DPoint aOtherLeft(rOrigin + (aOtherPerpend * (fOtherOffset - fOtherHalfWidth)));
const basegfx::B2DPoint aOtherRight(rOrigin + (aOtherPerpend * (fOtherOffset + fOtherHalfWidth)));
@@ -406,7 +406,7 @@ namespace
Color aMyColor; double fMyOffset(0.0); double fMyHalfWidth(0.0);
rCombination.getColorAndOffsetAndHalfWidth(my, aMyColor, fMyOffset, fMyHalfWidth);
- if(0xff != aMyColor.GetTransparency())
+ if(!aMyColor.IsFullyTransparent())
{
const basegfx::B2DPoint aLeft(rOrigin + (rPerpendX * (fMyOffset - fMyHalfWidth)));
const basegfx::B2DPoint aRight(rOrigin + (rPerpendX * (fMyOffset + fMyHalfWidth)));
@@ -421,7 +421,7 @@ namespace
Color aOtherColor; double fOtherOffset(0.0); double fOtherHalfWidth(0.0);
rStyleCandidate.getColorAndOffsetAndHalfWidth(other, aOtherColor, fOtherOffset, fOtherHalfWidth);
- if(0xff != aOtherColor.GetTransparency())
+ if(!aOtherColor.IsFullyTransparent())
{
const basegfx::B2DPoint aOtherLeft(rOrigin + (aOtherPerpend * (fOtherOffset - fOtherHalfWidth)));
const basegfx::B2DPoint aOtherRight(rOrigin + (aOtherPerpend * (fOtherOffset + fOtherHalfWidth)));
@@ -578,7 +578,7 @@ namespace
const ExtendSet& rExtStart(aExtendSetStart[a]);
const ExtendSet& rExtEnd(aExtendSetEnd[a]);
- if(0xff == aMyColor.GetTransparency())
+ if(aMyColor.IsFullyTransparent())
{
aBorderlines.push_back(
drawinglayer::primitive2d::BorderLine(
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index cfacba152071..57f0c491aaf3 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -200,10 +200,10 @@ namespace svx
// use not only COL_TRANSPARENT for detection of transparence,
// but the method/way which is designed to do that
- const bool bIsTransparent(0xff == aColor.GetTransparency());
+ const bool bIsFullyTransparent(aColor.IsFullyTransparent());
maCurColor = aColor;
- if (bIsTransparent)
+ if (bIsFullyTransparent)
{
pVirDev->SetFillColor();
}