summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-26 17:13:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-28 07:34:27 +0100
commite2cb154195fdc2ffccdb6f5e87cae8b29640b3eb (patch)
tree7c3d53d78e0867aa879b98d84211d1e73602520f /filter
parent0ea41fea75cd1ac1d81fa57c4411e75a6b4001f0 (diff)
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>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/flash/swfwriter1.cxx6
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx2
-rw-r--r--filter/source/msfilter/msdffimp.cxx8
-rw-r--r--filter/source/msfilter/util.cxx36
-rw-r--r--filter/source/svg/svgwriter.cxx6
5 files changed, 29 insertions, 29 deletions
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index bab13eea44cb..a0c6951312d7 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -400,10 +400,10 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
Color aReliefColor( COL_LIGHTGRAY );
Color aTextColor( mpVDev->GetTextColor() );
- if ( aTextColor.GetColor() == COL_BLACK )
+ if ( aTextColor == COL_BLACK )
aTextColor = COL_WHITE;
- if ( aTextColor.GetColor() == COL_WHITE )
+ if ( aTextColor == COL_WHITE )
aReliefColor = COL_BLACK;
@@ -433,7 +433,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
Color aTextColor( mpVDev->GetTextColor() );
Color aShadowColor( COL_BLACK );
- if ( (aTextColor.GetColor() == COL_BLACK) || (aTextColor.GetLuminance() < 8) )
+ if ( (aTextColor == COL_BLACK) || (aTextColor.GetLuminance() < 8) )
aShadowColor = COL_LIGHTGRAY;
Point aPos( rPos );
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 4643533770c4..9a1a81b71269 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -495,7 +495,7 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
nLines *= aSizeBitmap.Height();
ImplWriteLong( nLines );
sal_Int32 nCount2, nCount = 4;
- const BitmapColor aBlack( pAcc->GetBestMatchingColor( Color(COL_BLACK) ) );
+ const BitmapColor aBlack( pAcc->GetBestMatchingColor( COL_BLACK ) );
for ( long nY = 0; nY < aSizeBitmap.Height(); nY++ )
{
nCount2 = 0;
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 218a1bb177a6..96c29b639302 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1093,8 +1093,8 @@ void GetShadeColors( const SvxMSDffManager& rManager, const DffPropertyReader& r
}
if ( rShadeColors.empty() )
{
- rShadeColors.emplace_back( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillBackColor, COL_WHITE ), DFF_Prop_fillBackColor ), 0 );
- rShadeColors.emplace_back( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillColor, COL_WHITE ), DFF_Prop_fillColor ), 1 );
+ rShadeColors.emplace_back( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillBackColor, sal_uInt32(COL_WHITE) ), DFF_Prop_fillBackColor ), 0 );
+ rShadeColors.emplace_back( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillColor, sal_uInt32(COL_WHITE) ), DFF_Prop_fillColor ), 1 );
}
rIn.Seek( nPos );
}
@@ -2853,8 +2853,8 @@ void DffPropertyReader::ImportGradientColor( SfxItemSet& aSet,MSO_FillType eMSO_
default: break;
}
- Color aCol1( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillColor, COL_WHITE ), DFF_Prop_fillColor ) );
- Color aCol2( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillBackColor, COL_WHITE ), DFF_Prop_fillBackColor ) );
+ Color aCol1( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillColor, sal_uInt32(COL_WHITE) ), DFF_Prop_fillColor ) );
+ Color aCol2( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillBackColor, sal_uInt32(COL_WHITE) ), DFF_Prop_fillBackColor ) );
if ( nChgColors )
{
//Swap start and end color
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index 0a4446984dbd..f0e3694176bb 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -133,7 +133,7 @@ OString ConvertColor( const Color &rColor, bool bAutoColor )
if (bAutoColor && rColor.GetColor() == OOXML_COLOR_AUTO)
return color;
- if ( rColor.GetColor() != COL_AUTO )
+ if ( rColor != COL_AUTO )
{
const char pHexDigits[] = "0123456789ABCDEF";
char pBuffer[] = "000000";
@@ -1299,23 +1299,23 @@ sal_uInt8 TransColToIco( const Color& rCol )
sal_uInt8 nCol = 0; // ->Auto
switch( rCol.GetColor() )
{
- case COL_BLACK: nCol = 1; break;
- case COL_BLUE: nCol = 9; break;
- case COL_GREEN: nCol = 11; break;
- case COL_CYAN: nCol = 10; break;
- case COL_RED: nCol = 13; break;
- case COL_MAGENTA: nCol = 12; break;
- case COL_BROWN: nCol = 14; break;
- case COL_GRAY: nCol = 15; break;
- case COL_LIGHTGRAY: nCol = 16; break;
- case COL_LIGHTBLUE: nCol = 2; break;
- case COL_LIGHTGREEN: nCol = 4; break;
- case COL_LIGHTCYAN: nCol = 3; break;
- case COL_LIGHTRED: nCol = 6; break;
- case COL_LIGHTMAGENTA: nCol = 5; break;
- case COL_YELLOW: nCol = 7; break;
- case COL_WHITE: nCol = 8; break;
- case COL_AUTO: nCol = 0; break;
+ case sal_uInt32(COL_BLACK): nCol = 1; break;
+ case sal_uInt32(COL_BLUE): nCol = 9; break;
+ case sal_uInt32(COL_GREEN): nCol = 11; break;
+ case sal_uInt32(COL_CYAN): nCol = 10; break;
+ case sal_uInt32(COL_RED): nCol = 13; break;
+ case sal_uInt32(COL_MAGENTA): nCol = 12; break;
+ case sal_uInt32(COL_BROWN): nCol = 14; break;
+ case sal_uInt32(COL_GRAY): nCol = 15; break;
+ case sal_uInt32(COL_LIGHTGRAY): nCol = 16; break;
+ case sal_uInt32(COL_LIGHTBLUE): nCol = 2; break;
+ case sal_uInt32(COL_LIGHTGREEN): nCol = 4; break;
+ case sal_uInt32(COL_LIGHTCYAN): nCol = 3; break;
+ case sal_uInt32(COL_LIGHTRED): nCol = 6; break;
+ case sal_uInt32(COL_LIGHTMAGENTA): nCol = 5; break;
+ case sal_uInt32(COL_YELLOW): nCol = 7; break;
+ case sal_uInt32(COL_WHITE): nCol = 8; break;
+ case sal_uInt32(COL_AUTO): nCol = 0; break;
default:
static const Color aColArr[ 16 ] = {
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 441ea483898c..8a51f687ce4e 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2458,10 +2458,10 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
Color aReliefColor( COL_LIGHTGRAY );
Color aTextColor( mpVDev->GetTextColor() );
- if ( aTextColor.GetColor() == COL_BLACK )
+ if ( aTextColor == COL_BLACK )
aTextColor = COL_WHITE;
- if ( aTextColor.GetColor() == COL_WHITE )
+ if ( aTextColor == COL_WHITE )
aReliefColor = COL_BLACK;
@@ -2491,7 +2491,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
Color aTextColor( mpVDev->GetTextColor() );
Color aShadowColor( COL_BLACK );
- if ( (aTextColor.GetColor() == COL_BLACK) || (aTextColor.GetLuminance() < 8) )
+ if ( (aTextColor == COL_BLACK) || (aTextColor.GetLuminance() < 8) )
aShadowColor = COL_LIGHTGRAY;
Point aPos( rPos );