diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-21 14:07:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-22 07:23:57 +0100 |
commit | 331b4603be47fe059095307b2b3e2c1d399b04f9 (patch) | |
tree | 89edb58ed42d9b25558a3651cac8a3234629ad96 /svx | |
parent | 8ec0f90a287febe661c89e098be457c5d593ded3 (diff) |
loplugin:redundantcopy extend to Color
Change-Id: I224cc955d49ee100d328e0171da710f38068d2d4
Reviewed-on: https://gerrit.libreoffice.org/50114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/connctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/paraprev.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/swframeexample.cxx | 2 | ||||
-rw-r--r-- | svx/source/styles/CommonStylePreviewRenderer.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/layctrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoctabl.cxx | 2 |
9 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index ca37e67be718..f9eebf9f8a70 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -307,7 +307,7 @@ void SvxXConnectionPreview::SetStyles() { const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); - SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) ); + SetBackground( Wallpaper( rStyles.GetFieldColor() ) ); } void SvxXConnectionPreview::DataChanged( const DataChangedEvent& rDCEvt ) diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 129e19c0b25b..92f2d147379c 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -164,7 +164,7 @@ void SvxRectCtl::InitRectBitmap() aColorAry2[2] = rStyles.GetLightColor(); aColorAry2[3] = rStyles.GetShadowColor(); aColorAry2[4] = rStyles.GetDarkShadowColor(); - aColorAry2[5] = Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); + aColorAry2[5] = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; aColorAry2[6] = rStyles.GetDialogColor(); #ifdef DBG_UTIL diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx index 82dfbf67f0d7..3eee8771b4e5 100644 --- a/svx/source/dialog/paraprev.cxx +++ b/svx/source/dialog/paraprev.cxx @@ -68,7 +68,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) const Color& rWinColor = rStyleSettings.GetWindowColor(); Color aGrayColor(COL_LIGHTGRAY); - rRenderContext.SetFillColor(Color(rWinColor)); + rRenderContext.SetFillColor(rWinColor); rRenderContext.DrawRect(tools::Rectangle(Point(), aWinSize)); rRenderContext.SetLineColor(); diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 1e621f420636..245864645af8 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -71,7 +71,7 @@ Size SvxSwFrameExample::GetOptimalSize() const void SvxSwFrameExample::InitColors_Impl() { const StyleSettings& rSettings = GetSettings().GetStyleSettings(); - m_aBgCol = Color( rSettings.GetWindowColor() ); + m_aBgCol = rSettings.GetWindowColor(); bool bHC = rSettings.GetHighContrastMode(); diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx index 866c2edc9a6c..f56d6fed9513 100644 --- a/svx/source/styles/CommonStylePreviewRenderer.cxx +++ b/svx/source/styles/CommonStylePreviewRenderer.cxx @@ -113,7 +113,7 @@ bool CommonStylePreviewRenderer::recalculate() } if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_COLOR)) != nullptr) { - maFontColor = Color(static_cast<const SvxColorItem*>(pItem)->GetValue()); + maFontColor = static_cast<const SvxColorItem*>(pItem)->GetValue(); } if (mpStyle->GetFamily() == SfxStyleFamily::Para) @@ -125,7 +125,7 @@ bool CommonStylePreviewRenderer::recalculate() { if ((pItem = pItemSet->GetItem(XATTR_FILLCOLOR)) != nullptr) { - maBackgroundColor = Color(static_cast<const XFillColorItem*>(pItem)->GetColorValue()); + maBackgroundColor = static_cast<const XFillColorItem*>(pItem)->GetColorValue(); } } } diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index ee95936790d7..fd3d6ecffc57 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1244,7 +1244,7 @@ void SdrPaintView::VisAreaChanged() void SdrPaintView::onChangeColorConfig() { - maGridColor = Color( maColorConfig.GetColorValue( svtools::DRAWGRID ).nColor ); + maGridColor = maColorConfig.GetColorValue( svtools::DRAWGRID ).nColor; } diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index ed6b6fcf0883..3314ec00b02c 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -130,7 +130,7 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, vcl::Window* pParent, const OUStri SetBackground( aBackgroundColor ); vcl::Font aFont = GetFont(); - aFont.SetColor( ::Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ) ); + aFont.SetColor( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); aFont.SetFillColor( aBackgroundColor ); aFont.SetTransparent( false ); SetFont( aFont ); @@ -416,7 +416,7 @@ ColumnsWindow::ColumnsWindow( sal_uInt16 nId, vcl::Window* pParent, const OUStri { const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); svtools::ColorConfig aColorConfig; - aLineColor = ::Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); + aLineColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; aHighlightLineColor = rStyles.GetHighlightTextColor(); aFillColor = rStyles.GetWindowColor(); aHighlightFillColor = rStyles.GetHighlightColor(); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 20d04a2c055e..d1a47efad2a8 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -742,7 +742,7 @@ void SvxStyleBox_Impl::SetupEntry(vcl::RenderContext& rRenderContext, vcl::Windo pItem = pItemSet->GetItem( SID_ATTR_CHAR_COLOR ); // text color, when nothing is selected if ( (nullptr != pItem) && bIsNotSelected) - aFontCol = Color( static_cast< const SvxColorItem* >( pItem )->GetValue() ); + aFontCol = static_cast< const SvxColorItem* >( pItem )->GetValue(); drawing::FillStyle style = drawing::FillStyle_NONE; // which kind of Fill style is selected @@ -758,7 +758,7 @@ void SvxStyleBox_Impl::SetupEntry(vcl::RenderContext& rRenderContext, vcl::Windo // set background color pItem = pItemSet->GetItem( XATTR_FILLCOLOR ); if ( nullptr != pItem ) - aBackCol = Color( static_cast< const XFillColorItem* >( pItem )->GetColorValue() ); + aBackCol = static_cast< const XFillColorItem* >( pItem )->GetColorValue(); if ( aBackCol != COL_AUTO ) { diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index 267726fe93c5..a2474deb9052 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -122,7 +122,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno: if( nIndex == -1 ) throw container::NoSuchElementException(); - pList->Replace(nIndex, o3tl::make_unique<XColorEntry>(Color(static_cast<Color>(nColor)), aName )); + pList->Replace(nIndex, o3tl::make_unique<XColorEntry>(static_cast<Color>(nColor), aName )); } // XNameAccess |