diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-26 13:30:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-27 11:28:29 +0100 |
commit | c98d3303027bd8bf8e0881b61918710ac479864c (patch) | |
tree | e6843dfd93352f134207cbc482451e8f17266bc2 /cui | |
parent | 44a485c2baaf5bab81748f992915459bdaa58615 (diff) |
replace Color(COL_*) with COL_*
using
git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)"
| xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g"
and then some manual fixup where the resulting expression no longer
compiled
Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4
Reviewed-on: https://gerrit.libreoffice.org/50372
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/SvxToolbarConfigPage.cxx | 2 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/screenshotannotationdlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/fontsubs.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optcolor.cxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tptrans.cxx | 2 |
11 files changed, 21 insertions, 21 deletions
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index 50511fdecf3e..5e2746ffc66d 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -882,7 +882,7 @@ Image SvxToolbarEntriesListBox::GetSizedImage( rVDev.DrawImage( aPos, aImage ); // Draw separator line 2 pixels left from the right border - Color aLineColor = GetDisplayBackground().GetColor().IsDark() ? Color( COL_WHITE ) : Color( COL_BLACK ); + Color aLineColor = GetDisplayBackground().GetColor().IsDark() ? COL_WHITE : COL_BLACK; rVDev.SetLineColor( aLineColor ); rVDev.DrawLine( Point( aNewSize.Width()-3, 0 ), Point( aNewSize.Width()-3, aNewSize.Height()-1 )); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 9b96ccc0e7e4..fbc0e61fa355 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -979,11 +979,11 @@ public: if (rRenderContext.GetFillColor() == COL_WHITE) { - rRenderContext.SetFillColor(Color(COL_BLACK)); + rRenderContext.SetFillColor(COL_BLACK); } else { - rRenderContext.SetFillColor(Color(COL_WHITE)); + rRenderContext.SetFillColor(COL_WHITE); } long n = 0; diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx index b8010a8ef1be..01f14fc446dc 100644 --- a/cui/source/dialogs/screenshotannotationdlg.cxx +++ b/cui/source/dialogs/screenshotannotationdlg.cxx @@ -510,7 +510,7 @@ void ScreenshotAnnotationDlg_Impl::RepaintToBuffer( for (auto&& rCandidate : maSelected) { static double fLineWidthEntries(5.0); - PaintControlDataEntry(*rCandidate, Color(COL_LIGHTRED), fLineWidthEntries, fTransparence * 0.2); + PaintControlDataEntry(*rCandidate, COL_LIGHTRED, fLineWidthEntries, fTransparence * 0.2); } // paint hilighted entry diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index b7ceda7a8576..311668f9c852 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -403,7 +403,7 @@ void SvxFontSubstTabPage::CheckEnable() if (m_pCheckLB->IsEnabled()) { m_pCheckLB->DisableTable(); - m_pCheckLB->SetTextColor(Color(COL_GRAY)); + m_pCheckLB->SetTextColor(COL_GRAY); m_pCheckLB->Invalidate(); m_pCheckLB->SelectAll(false); } diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index f4312f67cc22..9bb88e7c412b 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -412,7 +412,7 @@ void ColorConfigWindow_Impl::Entry::Update ( ) { Color aColor(rValue.getColor()); if (rValue.getColor() == rValue.getDefaultColor()) - m_pColorList->SelectEntry(Color(COL_AUTO)); + m_pColorList->SelectEntry(COL_AUTO); else m_pColorList->SelectEntry(aColor); } @@ -549,7 +549,7 @@ void ColorConfigWindow_Impl::SetAppearance () Wallpaper const aTransparentWall(COL_TRANSPARENT); StyleSettings const& rStyleSettings = GetSettings().GetStyleSettings(); Color const aBackColor = rStyleSettings.GetHighContrastMode() ? - rStyleSettings.GetShadowColor() : Color(COL_LIGHTGRAY); + rStyleSettings.GetShadowColor() : COL_LIGHTGRAY; Wallpaper const aBackWall(aBackColor); for (size_t i = 0; i != vChapters.size(); ++i) vChapters[i]->Show(aBackWall); @@ -565,7 +565,7 @@ void ColorConfigWindow_Impl::SetAppearance () aRCheckCol.Invert(); // if inversion didn't work (gray) then it's set to black if (aRCheckCol == aWinCol) - aRCheckCol = Color(COL_BLACK); + aRCheckCol = COL_BLACK; // setting new text color for each entry for (size_t i = 0; i != vEntries.size(); ++i) vEntries[i]->SetTextColor(aRCheckCol); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index da9e79626002..024a8361b144 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -284,7 +284,7 @@ void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const ::to if (bIsBmp) { - rRenderContext.SetFillColor(Color(COL_TRANSPARENT)); + rRenderContext.SetFillColor(COL_TRANSPARENT); } rRenderContext.DrawRect(aDrawRect); @@ -759,7 +759,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rCoreSet->ClearItem( nWhich ); } - else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != Color( COL_WHITE ) ) + else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != COL_WHITE ) { rCoreSet->Put( SvxBrushItem( aBgdColor, nWhich ) ); bModified = true; @@ -1045,7 +1045,7 @@ SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl() IMPL_LINK_NOARG(SvxBackgroundTabPage, BackgroundColorHdl_Impl, ValueSet*, void) { sal_uInt16 nItemId = m_pBackgroundColorSet->GetSelectItemId(); - Color aColor = nItemId ? ( m_pBackgroundColorSet->GetItemColor( nItemId ) ) : Color( COL_TRANSPARENT ); + Color aColor = nItemId ? ( m_pBackgroundColorSet->GetItemColor( nItemId ) ) : COL_TRANSPARENT; aBgdColor = aColor; m_bColorSelected = true; m_pPreviewWin1->NotifyChange( aBgdColor ); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index a4cba1fa4c52..497dae51e59b 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1370,9 +1370,9 @@ void SvxCharEffectsPage::EnableNoneFontColor() Color SvxCharEffectsPage::GetPreviewFontColor(const Color& rColor) const { if (rColor.GetColor() == COL_AUTO) - return Color(COL_BLACK); + return COL_BLACK; if (m_bEnableNoneFontColor && rColor == COL_NONE_COLOR) - return Color(COL_BLACK); + return COL_BLACK; return rColor; } @@ -1763,7 +1763,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) } else { - m_pUnderlineColorLB->SelectEntry(Color(COL_AUTO)); + m_pUnderlineColorLB->SelectEntry(COL_AUTO); m_pUnderlineColorLB->Disable(); } } @@ -1807,7 +1807,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) } else { - m_pOverlineColorLB->SelectEntry(Color(COL_AUTO)); + m_pOverlineColorLB->SelectEntry(COL_AUTO); m_pOverlineColorLB->Disable(); } } diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 3ce3925c937d..c2ecb7e0d912 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -784,7 +784,7 @@ void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re rRenderContext.SetRasterOp(RasterOp::OverPaint); rRenderContext.DrawRect(::tools::Rectangle(Point(), aWinSize)); - rRenderContext.SetLineColor(Color(COL_WHITE)); + rRenderContext.SetLineColor(COL_WHITE); ::tools::Rectangle aRect(Point((aWinSize.Width() - aFrameSize.Width())/2, (aWinSize.Height() - aFrameSize.Height())/2), aFrameSize); @@ -792,7 +792,7 @@ void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re Size aSz(2, 0); aSz = rRenderContext.PixelToLogic(aSz); - rRenderContext.SetFillColor(Color(COL_TRANSPARENT)); + rRenderContext.SetFillColor(COL_TRANSPARENT); rRenderContext.SetRasterOp(RasterOp::Invert); aRect.AdjustLeft(aTopLeft.Y() ); aRect.AdjustTop(aTopLeft.X() ); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index e46831efbf59..31217781f427 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1136,7 +1136,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* pParent, get(m_pPreviewWIN, "preview"); - m_pPreviewWIN->SetBackground(Wallpaper(Color(COL_TRANSPARENT))); + m_pPreviewWIN->SetBackground(Wallpaper(COL_TRANSPARENT)); SetExchangeSupport(); aActBulletFont = lcl_GetDefaultBulletFont(); @@ -2605,7 +2605,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(vcl::Window* pParent, get(m_pStandardPB, "standard"); get(m_pPreviewWIN, "preview"); - m_pPreviewWIN->SetBackground(Wallpaper(Color(COL_TRANSPARENT))); + m_pPreviewWIN->SetBackground(Wallpaper(COL_TRANSPARENT)); m_pRelativeCB->Check(); m_pAlignLB->SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl)); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 134e6a6f33c2..d9519b32baa0 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -59,7 +59,7 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr , rOutAttrs ( rInAttrs ) // All the horrific pointers we store and should not , pnColorListState( nullptr ) - , aXFillColorItem( OUString(), Color( COL_BLACK ) ) + , aXFillColorItem( OUString(), COL_BLACK ) , aXFillAttr( rInAttrs.GetPool() ) , rXFSet( aXFillAttr.GetItemSet() ) , eCM( ColorModel::RGB ) diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx index 553e94d232f3..206e46704f4c 100644 --- a/cui/source/tabpages/tptrans.cxx +++ b/cui/source/tabpages/tptrans.cxx @@ -374,7 +374,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs) // disable unused XFillFloatTransparenceItem if(bSwitchOffGradient && (bGradActive || bGradUsed)) { - XGradient aGrad(COL_BLACK, Color(COL_WHITE)); + XGradient aGrad(COL_BLACK, COL_WHITE); aGrad.SetStartIntens(100); aGrad.SetEndIntens(100); XFillFloatTransparenceItem aItem(aGrad); |