diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2020-12-24 11:32:51 +1100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-26 19:25:17 +0100 |
commit | b75c9642f0cae522c5cc0f059e801819662b2ddf (patch) | |
tree | 2afc38645359cc5dfd007b94b63117c8c1898239 /sw/source/core/layout/paintfrm.cxx | |
parent | 43978d8f25a41c20c72d93cc3cb972c93c52674a (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 'sw/source/core/layout/paintfrm.cxx')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 9609a6567af2..27bfd520e03c 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1567,13 +1567,13 @@ static void lcl_implDrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush, /// and calculate transparency percent value sal_Int8 nTransparencyPercent = 0; bool bDrawTransparent = false; - if ( aColor.GetTransparency() != 0 ) + if ( aColor.IsTransparent() ) /// background color is transparent --> draw transparent. { bDrawTransparent = true; nTransparencyPercent = (aColor.GetTransparency()*100 + 0x7F)/0xFF; } - else if ( (_rGraphicObj.GetAttr().GetTransparency() != 0) && + else if ( (_rGraphicObj.GetAttr().IsTransparent()) && (_rBackgrdBrush.GetColor() == COL_TRANSPARENT) ) /// graphic is drawn transparent and background color is /// "no fill"/"auto fill" --> draw transparent @@ -2003,7 +2003,7 @@ void DrawGraphic( if ( bConsiderBackgroundTransparency ) { GraphicAttr aGrfAttr = pGrf->GetAttr(); - if ( (aGrfAttr.GetTransparency() != 0) && + if ( (aGrfAttr.IsTransparent()) && (pBrush->GetColor() == COL_TRANSPARENT) ) { @@ -2040,7 +2040,7 @@ void DrawGraphic( } eDrawStyle = Default; if (bConsiderBackgroundTransparency && - ( ( aColor.GetTransparency() != 0) || + ( ( aColor.IsTransparent()) || bTransparentGrfWithNoFillBackgrd ) ) { eDrawStyle = Transparent; @@ -3765,7 +3765,7 @@ bool SwFlyFrame::IsBackgroundTransparent() const if ( GetBackgroundBrush( aFillAttributes, pBackgrdBrush, xSectionTOXColor, aDummyRect, false, /*bConsiderTextBox=*/false) ) { if ( xSectionTOXColor && - (xSectionTOXColor->GetTransparency() != 0) && + (xSectionTOXColor->IsTransparent()) && (xSectionTOXColor != COL_TRANSPARENT) ) { bBackgroundTransparent = true; @@ -3776,7 +3776,7 @@ bool SwFlyFrame::IsBackgroundTransparent() const } else if ( pBackgrdBrush ) { - if ( (pBackgrdBrush->GetColor().GetTransparency() != 0) && + if ( (pBackgrdBrush->GetColor().IsTransparent()) && (pBackgrdBrush->GetColor() != COL_TRANSPARENT) ) { bBackgroundTransparent = true; @@ -3786,7 +3786,7 @@ bool SwFlyFrame::IsBackgroundTransparent() const const GraphicObject *pTmpGrf = pBackgrdBrush->GetGraphicObject(); if ( pTmpGrf && - (pTmpGrf->GetAttr().GetTransparency() != 0) + (pTmpGrf->GetAttr().IsTransparent()) ) { bBackgroundTransparent = true; |