diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-06 10:42:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-07 07:08:34 +0100 |
commit | b3ee860e523dce3df16350a4053a67f39c2f92f8 (patch) | |
tree | 357c48461b3f62cc2773c959a5a11daf3c60c636 /vcl | |
parent | 2407c183092d6559771738891d57d6375c4212ab (diff) |
use more Color in vcl
Change-Id: Ia92c52d26b90898c1f7860128b478d1fada9d406
Reviewed-on: https://gerrit.libreoffice.org/50795
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/svdata.hxx | 12 | ||||
-rw-r--r-- | vcl/qa/cppunit/BitmapProcessorTest.cxx | 2 | ||||
-rw-r--r-- | vcl/qa/cppunit/BitmapTest.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/settings.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 24 | ||||
-rw-r--r-- | vcl/source/gdi/gdimetafiletools.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/pngread.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/decoview.cxx | 2 | ||||
-rw-r--r-- | vcl/win/window/salframe.cxx | 4 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 10 |
11 files changed, 34 insertions, 34 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index a074b3ce937f..42300a1e56e2 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -232,12 +232,12 @@ struct ImplSVCtrlData ImplTBDragMgr* mpTBDragMgr = nullptr; // DragMgr for ToolBox sal_uInt16 mnCheckStyle = 0; // CheckBox-Style for ImageList-Update sal_uInt16 mnRadioStyle = 0; // Radio-Style for ImageList-Update - sal_uLong mnLastCheckFColor = 0; // Last FaceColor for CheckImage - sal_uLong mnLastCheckWColor = 0; // Last WindowColor for CheckImage - sal_uLong mnLastCheckLColor = 0; // Last LightColor for CheckImage - sal_uLong mnLastRadioFColor = 0; // Last FaceColor for RadioImage - sal_uLong mnLastRadioWColor = 0; // Last WindowColor for RadioImage - sal_uLong mnLastRadioLColor = 0; // Last LightColor for RadioImage + Color mnLastCheckFColor; // Last FaceColor for CheckImage + Color mnLastCheckWColor; // Last WindowColor for CheckImage + Color mnLastCheckLColor; // Last LightColor for CheckImage + Color mnLastRadioFColor; // Last FaceColor for RadioImage + Color mnLastRadioWColor; // Last WindowColor for RadioImage + Color mnLastRadioLColor; // Last LightColor for RadioImage FieldUnitStringList* mpFieldUnitStrings = nullptr; // list with field units FieldUnitStringList* mpCleanUnitStrings = nullptr; // same list but with some "fluff" like spaces removed }; diff --git a/vcl/qa/cppunit/BitmapProcessorTest.cxx b/vcl/qa/cppunit/BitmapProcessorTest.cxx index 558401f84771..300302d41d60 100644 --- a/vcl/qa/cppunit/BitmapProcessorTest.cxx +++ b/vcl/qa/cppunit/BitmapProcessorTest.cxx @@ -50,7 +50,7 @@ void BitmapProcessorTest::testDisabledImage() { Bitmap::ScopedReadAccess pReadAccess(aDisabledBitmap); Color aColor(pReadAccess->GetPixel(0, 0).GetColor()); - CPPUNIT_ASSERT_EQUAL(sal_uInt32(0x001E1E1E), sal_uInt32(aColor)); + CPPUNIT_ASSERT_EQUAL(Color(0x001E1E1E), aColor); } } diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index 5af967052326..3f112fa6f86b 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -484,7 +484,7 @@ void BitmapTest::testCRC() #endif // a 1x1 black & white checkerboard - aVDev->DrawCheckered(Point(), aVDev->GetOutputSizePixel(), 1, 1); + aVDev->DrawCheckered(Point(), aVDev->GetOutputSizePixel(), 1, Color(0, 0, 1)); Bitmap aChecker = getAsBitmap(aVDev); checkAndInsert(aCRCs, aChecker, "checkerboard"); aChecker.Invert(); diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index f7c35931ee60..f9eaf47ce645 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -2159,7 +2159,7 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot if ( nIndex > 0 ) { OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex ); - rMenuBarTextColor = Color( aColor.toUInt64( 16 ) ); + rMenuBarTextColor = Color( aColor.toUInt32( 16 ) ); } } diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index bffbd1e93b66..35400b70ed8a 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -2756,15 +2756,15 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, DrawButtonFlags if ( pSVData->maCtrlData.maRadioImgList.empty() || (pSVData->maCtrlData.mnRadioStyle != nStyle) || - (pSVData->maCtrlData.mnLastRadioFColor != rStyleSettings.GetFaceColor().GetColor()) || - (pSVData->maCtrlData.mnLastRadioWColor != rStyleSettings.GetWindowColor().GetColor()) || - (pSVData->maCtrlData.mnLastRadioLColor != rStyleSettings.GetLightColor().GetColor()) ) + (pSVData->maCtrlData.mnLastRadioFColor != rStyleSettings.GetFaceColor()) || + (pSVData->maCtrlData.mnLastRadioWColor != rStyleSettings.GetWindowColor()) || + (pSVData->maCtrlData.mnLastRadioLColor != rStyleSettings.GetLightColor()) ) { pSVData->maCtrlData.maRadioImgList.clear(); - pSVData->maCtrlData.mnLastRadioFColor = rStyleSettings.GetFaceColor().GetColor(); - pSVData->maCtrlData.mnLastRadioWColor = rStyleSettings.GetWindowColor().GetColor(); - pSVData->maCtrlData.mnLastRadioLColor = rStyleSettings.GetLightColor().GetColor(); + pSVData->maCtrlData.mnLastRadioFColor = rStyleSettings.GetFaceColor(); + pSVData->maCtrlData.mnLastRadioWColor = rStyleSettings.GetWindowColor(); + pSVData->maCtrlData.mnLastRadioLColor = rStyleSettings.GetLightColor(); std::vector<OUString> aResources; if (nStyle) @@ -3580,15 +3580,15 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, DrawButtonFlags nFl if ( pSVData->maCtrlData.maCheckImgList.empty() || (pSVData->maCtrlData.mnCheckStyle != nStyle) || - (pSVData->maCtrlData.mnLastCheckFColor != rStyleSettings.GetFaceColor().GetColor()) || - (pSVData->maCtrlData.mnLastCheckWColor != rStyleSettings.GetWindowColor().GetColor()) || - (pSVData->maCtrlData.mnLastCheckLColor != rStyleSettings.GetLightColor().GetColor()) ) + (pSVData->maCtrlData.mnLastCheckFColor != rStyleSettings.GetFaceColor()) || + (pSVData->maCtrlData.mnLastCheckWColor != rStyleSettings.GetWindowColor()) || + (pSVData->maCtrlData.mnLastCheckLColor != rStyleSettings.GetLightColor()) ) { pSVData->maCtrlData.maCheckImgList.clear(); - pSVData->maCtrlData.mnLastCheckFColor = rStyleSettings.GetFaceColor().GetColor(); - pSVData->maCtrlData.mnLastCheckWColor = rStyleSettings.GetWindowColor().GetColor(); - pSVData->maCtrlData.mnLastCheckLColor = rStyleSettings.GetLightColor().GetColor(); + pSVData->maCtrlData.mnLastCheckFColor = rStyleSettings.GetFaceColor(); + pSVData->maCtrlData.mnLastCheckWColor = rStyleSettings.GetWindowColor(); + pSVData->maCtrlData.mnLastCheckLColor = rStyleSettings.GetLightColor(); std::vector<OUString> aResources; if (nStyle) diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx index 389a323f5d21..2170f2a9be2a 100644 --- a/vcl/source/gdi/gdimetafiletools.cxx +++ b/vcl/source/gdi/gdimetafiletools.cxx @@ -165,7 +165,7 @@ namespace aVDev->SetOutputSizePixel(aSizePixel); aVDev->EnableMapMode(false); - aVDev->SetFillColor(COL_WHITE); + aVDev->SetFillColor( COL_WHITE); aVDev->SetLineColor(); if(rBitmapEx.IsTransparent()) diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index a9996b08d105..42bad03edd9e 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2412,7 +2412,7 @@ BitmapChecksum GDIMetaFile::GetChecksum() const BCToBCOA( pAct->GetBitmap().GetChecksum(), aBCOA ); nCrc = vcl_get_checksum( nCrc, aBCOA, BITMAP_CHECKSUM_SIZE ); - UInt32ToSVBT32( pAct->GetColor().GetColor(), aBT32 ); + UInt32ToSVBT32( sal_uInt32(pAct->GetColor()), aBT32 ); nCrc = vcl_get_checksum( nCrc, aBT32, 4 ); UInt32ToSVBT32( pAct->GetPoint().X(), aBT32 ); @@ -2433,7 +2433,7 @@ BitmapChecksum GDIMetaFile::GetChecksum() const BCToBCOA( pAct->GetBitmap().GetChecksum(), aBCOA ); nCrc = vcl_get_checksum( nCrc, aBCOA, BITMAP_CHECKSUM_SIZE ); - UInt32ToSVBT32( pAct->GetColor().GetColor(), aBT32 ); + UInt32ToSVBT32( sal_uInt32(pAct->GetColor()), aBT32 ); nCrc = vcl_get_checksum( nCrc, aBT32, 4 ); UInt32ToSVBT32( pAct->GetPoint().X(), aBT32 ); @@ -2460,7 +2460,7 @@ BitmapChecksum GDIMetaFile::GetChecksum() const BCToBCOA( pAct->GetBitmap().GetChecksum(), aBCOA ); nCrc = vcl_get_checksum( nCrc, aBCOA, BITMAP_CHECKSUM_SIZE ); - UInt32ToSVBT32( pAct->GetColor().GetColor(), aBT32 ); + UInt32ToSVBT32( sal_uInt32(pAct->GetColor()), aBT32 ); nCrc = vcl_get_checksum( nCrc, aBT32, 4 ); UInt32ToSVBT32( pAct->GetDestPoint().X(), aBT32 ); diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 49844f028cd6..446dd6784904 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -804,7 +804,7 @@ bool PNGReaderImpl::ImplReadTransparent() return false; mcOpaqueColor = BitmapColor( 0x00 ); mcTranspColor = BitmapColor( 0xFF ); - mpMaskAcc->Erase( 0x00 ); + mpMaskAcc->Erase( Color(0,0,0) ); } return true; diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 7d007b4d6dd7..e44eba19e727 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -438,7 +438,7 @@ void ImplDrawButton( OutputDevice *const pDev, tools::Rectangle aFillRect, if ( (nStyle & DrawButtonFlags::Mono) || (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ) { - const Color aBlackColor( COL_BLACK ); + const Color aBlackColor(COL_BLACK); if ( nStyle & DrawButtonFlags::Default ) { diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 64b073f99139..06f3b709cb5f 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2659,7 +2659,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) ImplSVData* pSVData = ImplGetSVData(); pSVData->maNWFData.mnMenuFormatBorderX = 0; pSVData->maNWFData.mnMenuFormatBorderY = 0; - pSVData->maNWFData.maMenuBarHighlightTextColor = Color( COL_TRANSPARENT ); + pSVData->maNWFData.maMenuBarHighlightTextColor = COL_TRANSPARENT; GetSalData()->mbThemeMenuSupport = false; if (officecfg::Office::Common::Accessibility::AutoDetectSystemHC::get()) { @@ -4554,7 +4554,7 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam ) // set transparent pixels to background color if( fDisabled ) colBackground = RGB(255,255,255); - aBitmap.Replace( Color( COL_LIGHTMAGENTA ), + aBitmap.Replace( COL_LIGHTMAGENTA, Color( GetRValue(colBackground),GetGValue(colBackground),GetBValue(colBackground) )); WinSalBitmap* pSalBmp = static_cast<WinSalBitmap*>(aBitmap.ImplGetImpBitmap()->ImplGetSalBitmap()); diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index cd65c2c379dc..e133c02dc49a 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -409,7 +409,7 @@ public: std::vector<OUString> aFontNames; - Color const nCols[] = { + static Color const nCols[] = { COL_BLACK, COL_BLUE, COL_GREEN, COL_CYAN, COL_RED, COL_MAGENTA, COL_BROWN, COL_GRAY, COL_LIGHTGRAY, COL_LIGHTBLUE, COL_LIGHTGREEN, COL_LIGHTCYAN, COL_LIGHTRED, COL_LIGHTMAGENTA, COL_YELLOW, COL_WHITE @@ -551,7 +551,7 @@ public: { // Legend vcl::Font aIndexFont("sans", Size(0,20)); - aIndexFont.SetColor(COL_BLACK); + aIndexFont.SetColor( COL_BLACK); tools::Rectangle aTextRect; rDev.SetFont(aIndexFont); OUString aText = OUString::number(i) + "."; @@ -777,13 +777,13 @@ public: if (rCtx.meStyle == RENDER_EXPANDED) { std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx,5, 4)); - Color nStartCols[] = { + static Color const nStartCols[] = { COL_RED, COL_RED, COL_RED, COL_GREEN, COL_GREEN, COL_BLUE, COL_BLUE, COL_BLUE, COL_CYAN, COL_CYAN, COL_BLACK, COL_LIGHTGRAY, COL_WHITE, COL_BLUE, COL_CYAN, COL_WHITE, COL_WHITE, COL_WHITE, COL_BLACK, COL_BLACK }; - Color nEndCols[] = { + static Color const nEndCols[] = { COL_WHITE, COL_WHITE, COL_WHITE, COL_BLACK, COL_BLACK, COL_RED, COL_RED, COL_RED, COL_GREEN, COL_GREEN, COL_GRAY, COL_GRAY, COL_LIGHTGRAY, COL_LIGHTBLUE, COL_LIGHTCYAN, @@ -2117,7 +2117,7 @@ namespace { { vcl::Font aFont(aFontName, Size(0,96)); #if 0 - aFont.SetColor(COL_BLACK); + aFont.SetCOL_BLACK); xDevice->SetFont(aFont); xDevice->Erase(); |