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 /sd/source | |
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 'sd/source')
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/animobjs.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/docprev.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/headerfooterdlg.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsTheme.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview.cxx | 2 |
8 files changed, 17 insertions, 17 deletions
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 97e84651351c..ffd17fd09389 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -807,9 +807,9 @@ void HtmlExport::SetDocColors( SdPage* pPage ) pPage = mpDoc->GetSdPage(0, PageKind::Standard); svtools::ColorConfig aConfig; - maVLinkColor = Color(aConfig.GetColorValue(svtools::LINKSVISITED).nColor); - maALinkColor = Color(aConfig.GetColorValue(svtools::LINKS).nColor); - maLinkColor = Color(aConfig.GetColorValue(svtools::LINKS).nColor); + maVLinkColor = aConfig.GetColorValue(svtools::LINKSVISITED).nColor; + maALinkColor = aConfig.GetColorValue(svtools::LINKS).nColor; + maLinkColor = aConfig.GetColorValue(svtools::LINKS).nColor; maTextColor = Color(COL_BLACK); SfxStyleSheet* pSheet = nullptr; diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index c727d8b8d1ad..d12e80d2e91a 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -1221,7 +1221,7 @@ Color AnnotationManagerImpl::GetColor(sal_uInt16 aAuthorIndex) COL_AUTHOR4_NORMAL, COL_AUTHOR5_NORMAL, COL_AUTHOR6_NORMAL, COL_AUTHOR7_NORMAL, COL_AUTHOR8_NORMAL, COL_AUTHOR9_NORMAL }; - return Color( aArrayNormal[ aAuthorIndex % SAL_N_ELEMENTS( aArrayNormal ) ] ); + return aArrayNormal[ aAuthorIndex % SAL_N_ELEMENTS( aArrayNormal ) ]; } return Color(COL_WHITE); @@ -1236,7 +1236,7 @@ Color AnnotationManagerImpl::GetColorLight(sal_uInt16 aAuthorIndex) COL_AUTHOR4_LIGHT, COL_AUTHOR5_LIGHT, COL_AUTHOR6_LIGHT, COL_AUTHOR7_LIGHT, COL_AUTHOR8_LIGHT, COL_AUTHOR9_LIGHT }; - return Color( aArrayLight[ aAuthorIndex % SAL_N_ELEMENTS( aArrayLight ) ] ); + return aArrayLight[ aAuthorIndex % SAL_N_ELEMENTS( aArrayLight ) ]; } return Color(COL_WHITE); @@ -1251,7 +1251,7 @@ Color AnnotationManagerImpl::GetColorDark(sal_uInt16 aAuthorIndex) COL_AUTHOR4_DARK, COL_AUTHOR5_DARK, COL_AUTHOR6_DARK, COL_AUTHOR7_DARK, COL_AUTHOR8_DARK, COL_AUTHOR9_DARK }; - return Color( aArrayAnkor[ aAuthorIndex % SAL_N_ELEMENTS( aArrayAnkor ) ] ); + return aArrayAnkor[ aAuthorIndex % SAL_N_ELEMENTS( aArrayAnkor ) ]; } return Color(COL_WHITE); diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 14e8bf068fa1..b2786b38c451 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -59,7 +59,7 @@ SdDisplay::SdDisplay(vcl::Window* pWin) { SetMapMode(MapMode(MapUnit::MapPixel)); const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); - SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) ); + SetBackground( Wallpaper( rStyles.GetFieldColor() ) ); } SdDisplay::~SdDisplay() @@ -113,7 +113,7 @@ void SdDisplay::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); - SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) ); + SetBackground( Wallpaper( rStyles.GetFieldColor() ) ); SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? sd::OUTPUT_DRAWMODE_CONTRAST : sd::OUTPUT_DRAWMODE_COLOR ); diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index 85dea1b94a90..a654fbe6417e 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -121,7 +121,7 @@ void SdDocPreviewWin::ImpPaint( OutputDevice* pVDev ) svtools::ColorConfig aColorConfig; pVDev->SetLineColor(); - pVDev->SetFillColor( Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor ) ); + pVDev->SetFillColor( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor ); pVDev->DrawRect(::tools::Rectangle( Point(0,0 ), pVDev->GetOutputSize())); } @@ -154,7 +154,7 @@ void SdDocPreviewWin::updateViewSettings() else { svtools::ColorConfig aColorConfig; - maDocumentColor = Color( aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor ); + maDocumentColor = aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor; } Invalidate(); diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index be8c9b9641eb..f706d61b0a3d 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -753,7 +753,7 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, SdrTextObj con svtools::ColorConfigValue aColor( aColorConfig.GetColorValue( bVisible ? svtools::FONTCOLOR : svtools::OBJECTBOUNDARIES ) ); // paint at OutDev - rRenderContext.SetLineColor(Color(aColor.nColor)); + rRenderContext.SetLineColor(aColor.nColor); rRenderContext.SetFillColor(); for (sal_uInt32 a(0); a < aGeometry.count(); a++) diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx index e870e7e91dc4..a053444ce89a 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx @@ -231,7 +231,7 @@ void PageObjectPainter::PaintPageNumber ( // Page number is painted on background for hover or selection or // both. Each of these background colors has a predefined luminance // which is compatible with the PageNumberHover color. - aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberHover)); + aPageNumberColor = mpTheme->GetColor(Theme::Color_PageNumberHover); } else { @@ -240,7 +240,7 @@ void PageObjectPainter::PaintPageNumber ( // When the background color is black then this is interpreted as // high contrast mode and the font color is set to white. if (nBackgroundLuminance == 0) - aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberHighContrast)); + aPageNumberColor = mpTheme->GetColor(Theme::Color_PageNumberHighContrast); else { // Compare luminance of default page number color and background @@ -250,9 +250,9 @@ void PageObjectPainter::PaintPageNumber ( if (abs(nBackgroundLuminance - nFontLuminance) < 60) { if (nBackgroundLuminance > nFontLuminance-30) - aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberBrightBackground)); + aPageNumberColor = mpTheme->GetColor(Theme::Color_PageNumberBrightBackground); else - aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberDarkBackground)); + aPageNumberColor = mpTheme->GetColor(Theme::Color_PageNumberDarkBackground); } } } diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx index 5b22ad40f474..a15c8c382e5e 100644 --- a/sd/source/ui/slidesorter/view/SlsTheme.cxx +++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx @@ -89,7 +89,7 @@ void Theme::Update (const std::shared_ptr<controller::Properties>& rpProperties) maColor[Color_Background] = maBackgroundColor; const Color aSelectionColor (rpProperties->GetSelectionColor()); maColor[Color_Selection] = aSelectionColor; - if (Color(aSelectionColor).IsBright()) + if (aSelectionColor.IsBright()) maColor[Color_PageCountFontColor] = Black; else maColor[Color_PageCountFontColor] = White; diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 7927bbda1bef..6ffe568b7099 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -260,7 +260,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected if( aColor.bIsVisible ) { // get basic object transformation - const basegfx::BColor aRGBColor(Color(aColor.nColor).getBColor()); + const basegfx::BColor aRGBColor(aColor.nColor.getBColor()); basegfx::B2DHomMatrix aObjectMatrix; basegfx::B2DPolyPolygon aObjectPolyPolygon; pObject->TRGetBaseGeometry(aObjectMatrix, aObjectPolyPolygon); |