diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-26 17:13:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-28 07:34:27 +0100 |
commit | e2cb154195fdc2ffccdb6f5e87cae8b29640b3eb (patch) | |
tree | 7c3d53d78e0867aa879b98d84211d1e73602520f /svtools/source | |
parent | 0ea41fea75cd1ac1d81fa57c4411e75a6b4001f0 (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 'svtools/source')
-rw-r--r-- | svtools/source/config/colorcfg.cxx | 2 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr2.cxx | 10 | ||||
-rw-r--r-- | svtools/source/svhtml/htmlout.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/unocontroltablemodel.cxx | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index de54a88c64d7..038c1623b3ad 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -396,7 +396,7 @@ ColorConfig::~ColorConfig() Color ColorConfig::GetDefaultColor(ColorConfigEntry eEntry) { - static const sal_Int32 aAutoColors[] = + static const Color aAutoColors[] = { COL_WHITE, // DOCCOLOR COL_LIGHTGRAY, // DOCBOUNDARIES diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 61d587ea089a..2351564f439e 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -685,7 +685,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib } else // scaleByAveraging { - const BitmapColor aTrans( pWriteAccess->GetBestMatchingColor( Color(COL_WHITE) ) ); + const BitmapColor aTrans( pWriteAccess->GetBestMatchingColor( COL_WHITE ) ); BitmapColor aResultColor( 0 ); double aSum, aCount; @@ -746,7 +746,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib } else { - const BitmapColor aTrans( pWriteAccess->GetBestMatchingColor( Color(COL_WHITE) ) ); + const BitmapColor aTrans( pWriteAccess->GetBestMatchingColor( COL_WHITE ) ); BitmapColor aAlphaVal( 0 ); for( long nY = 0; nY < aTargetHeight; nY++ ) @@ -802,8 +802,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib if( pWriteAccess ) { Bitmap aMsk( rBmpEx.GetMask() ); - const BitmapColor aB( pWriteAccess->GetBestMatchingColor( Color(COL_BLACK) ) ); - const BitmapColor aW( pWriteAccess->GetBestMatchingColor( Color(COL_WHITE) ) ); + const BitmapColor aB( pWriteAccess->GetBestMatchingColor( COL_BLACK ) ); + const BitmapColor aW( pWriteAccess->GetBestMatchingColor( COL_WHITE ) ); BitmapReadAccess* pMAcc = nullptr; if( !aMsk || ( ( pMAcc = aMsk.AcquireReadAccess() ) != nullptr ) ) @@ -813,7 +813,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib BitmapColor aTestB; if( pMAcc ) - aTestB = pMAcc->GetBestMatchingColor( Color(COL_BLACK) ); + aTestB = pMAcc->GetBestMatchingColor( COL_BLACK ); // create new horizontal mapping table for( long nX = 0; nX < aUnrotatedWidth; nX++ ) diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 6147e8cf2595..e756e5c5e316 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -583,7 +583,7 @@ SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nL SvStream& HTMLOutFuncs::Out_Color( SvStream& rStream, const Color& rColor ) { rStream.WriteCharPtr( "\"#" ); - if( rColor.GetColor() == COL_AUTO ) + if( rColor == COL_AUTO ) { rStream.WriteCharPtr( "000000" ); } @@ -992,7 +992,7 @@ void HtmlWriterHelper::applyColor(HtmlWriter& rHtmlWriter, const OString &aAttri { OStringBuffer sBuffer; - if( rColor.GetColor() == COL_AUTO ) + if( rColor == COL_AUTO ) { sBuffer.append("#000000"); } diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index fd982321debd..36226892970b 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -544,10 +544,10 @@ namespace svt { namespace table o_convertedColor.reset(); else { - sal_Int32 nColor = COL_TRANSPARENT; + Color nColor = COL_TRANSPARENT; if ( i_color >>= nColor ) { - o_convertedColor.reset( ::Color( nColor ) ); + o_convertedColor.reset( nColor ); } else { |