summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx4
-rw-r--r--sc/source/ui/view/viewdata.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 5d802fd9d5f7..612a97cb2209 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2425,7 +2425,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
Color aBackCol = pPattern->GetItem( ATTR_BACKGROUND ).GetColor();
ScModule* pScMod = SC_MOD();
- if ( aBackCol.GetTransparency() > 0 ||
+ if ( aBackCol.IsTransparent() ||
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
aBackCol = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
mpEditEngine->SetBackgroundColor( aBackCol );
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index b0d5f2075c73..a790cb8c4a17 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2444,7 +2444,7 @@ void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor)
}
Color aBackCol = mpPattern->GetItem( ATTR_BACKGROUND, mpCondSet ).GetColor();
- if ( bUseStyleColor && ( aBackCol.GetTransparency() > 0 || bCellContrast ) )
+ if ( bUseStyleColor && ( aBackCol.IsTransparent() || bCellContrast ) )
aBackCol = nConfBackColor;
mpEngine->SetBackgroundColor( aBackCol );
}
@@ -4604,7 +4604,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
Color aBackCol =
pPattern->GetItem( ATTR_BACKGROUND, pCondSet ).GetColor();
- if ( mbUseStyleColor && ( aBackCol.GetTransparency() > 0 || bCellContrast ) )
+ if ( mbUseStyleColor && ( aBackCol.IsTransparent() || bCellContrast ) )
aBackCol = nConfBackColor;
pEngine->SetBackgroundColor( aBackCol );
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 2d30a3504f75..a18b8f15e52b 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1748,7 +1748,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
Color aBackCol = pPattern->GetItem(ATTR_BACKGROUND).GetColor();
ScModule* pScMod = SC_MOD();
- if ( aBackCol.GetTransparency() > 0 )
+ if ( aBackCol.IsTransparent() )
{
aBackCol = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
}