convert COL_ constants to be of type Color

Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2018-02-26 17:13:01 +02:00
parent 0ea41fea75
commit e2cb154195
144 changed files with 478 additions and 449 deletions

View File

@@ -887,7 +887,7 @@ namespace cppcanvas
// determine shadow color (from outdev3.cxx)
::Color aTextColor = vcl::unotools::doubleSequenceToColor(
rState.textColor, xColorSpace );
bool bIsDark = (aTextColor.GetColor() == COL_BLACK)
bool bIsDark = (aTextColor == COL_BLACK)
|| (aTextColor.GetLuminance() < 8);
aShadowColor = bIsDark ? COL_LIGHTGRAY : COL_BLACK;
@@ -917,7 +917,7 @@ namespace cppcanvas
// we don't have a automatic color, so black is always
// drawn on white (literally copied from
// vcl/source/gdi/outdev3.cxx)
if( aTextColor.GetColor() == COL_BLACK )
if( aTextColor == COL_BLACK )
{
aTextColor = ::COL_WHITE;
rParms.mrStates.getState().textColor =
@@ -925,7 +925,7 @@ namespace cppcanvas
aTextColor, xColorSpace );
}
if( aTextColor.GetColor() == COL_WHITE )
if( aTextColor == COL_WHITE )
aReliefColor = ::COL_BLACK;
aReliefColor.SetTransparency( aTextColor.GetTransparency() );
}