[Libreoffice-commits] core.git: sc/source
Noel Grandin
noel.grandin at collabora.co.uk
Thu Feb 22 08:19:56 UTC 2018
sc/source/core/tool/detfunc.cxx | 10 +++++-----
sc/source/filter/excel/xestyle.cxx | 2 +-
sc/source/ui/app/inputhdl.cxx | 3 +--
3 files changed, 7 insertions(+), 8 deletions(-)
New commits:
commit 795effff8de6485eb6c1c2c9a43fc37d57c0563a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Feb 22 10:10:03 2018 +0200
loplugin:redundantcast
Change-Id: I358e9673edcba81336b3895479e787d981fad7a5
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 4ddf9c623622..0022dea97add 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -142,7 +142,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
{
nMaxLevel = 0;
- aBoxSet.Put( XLineColorItem( EMPTY_OUSTRING, Color( ScDetectiveFunc::GetArrowColor() ) ) );
+ aBoxSet.Put( XLineColorItem( EMPTY_OUSTRING, ScDetectiveFunc::GetArrowColor() ) );
aBoxSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
// create default line endings (like XLineEndList::Create)
@@ -187,7 +187,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
aFromTabSet.Put( XLineEndWidthItem( 200 ) );
aFromTabSet.Put( XLineEndCenterItem( false ) );
- aCircleSet.Put( XLineColorItem( OUString(), Color( ScDetectiveFunc::GetErrorColor() ) ) );
+ aCircleSet.Put( XLineColorItem( OUString(), ScDetectiveFunc::GetErrorColor() ) );
aCircleSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
aCircleSet.Put( XLineWidthItem( 55 ) ); // 54 = 1 Pixel
}
@@ -489,7 +489,7 @@ bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
rAttrSet.Put( XLineWidthItem( 0 ) ); // single reference
Color nColor = ( bRed ? GetErrorColor() : GetArrowColor() );
- rAttrSet.Put( XLineColorItem( OUString(), Color( nColor ) ) );
+ rAttrSet.Put( XLineColorItem( OUString(), nColor ) );
basegfx::B2DPolygon aTempPoly;
aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y()));
@@ -554,7 +554,7 @@ bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
rAttrSet.Put( XLineWidthItem( 0 ) ); // single reference
Color nColor = ( bRed ? GetErrorColor() : GetArrowColor() );
- rAttrSet.Put( XLineColorItem( OUString(), Color( nColor ) ) );
+ rAttrSet.Put( XLineColorItem( OUString(), nColor ) );
basegfx::B2DPolygon aTempPoly;
aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y()));
@@ -1499,7 +1499,7 @@ void ScDetectiveFunc::UpdateAllArrowColors()
if ( bArrow || bError )
{
Color nColor = ( bError ? GetErrorColor() : GetArrowColor() );
- pObject->SetMergedItem( XLineColorItem( OUString(), Color( nColor ) ) );
+ pObject->SetMergedItem( XLineColorItem( OUString(), nColor ) );
// repaint only
pObject->ActionChanged();
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 3a95c4b23a40..466ad9a395bd 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -798,7 +798,7 @@ void XclExpPalette::GetMixedColors(
Color XclExpPalette::GetColor( sal_uInt16 nXclIndex ) const
{
- return Color(mxImpl->GetColor( nXclIndex ));
+ return mxImpl->GetColor( nXclIndex );
}
void XclExpPalette::Save( XclExpStream& rStrm )
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index d25fde7b8bd3..dcbfba02d73b 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -381,8 +381,7 @@ handle_r1c1:
ESelection aSel( 0, nStart, 0, nPos );
SfxItemSet aSet( mpEditEngine->GetEmptyItemSet() );
- aSet.Put( SvxColorItem( Color( nColor ),
- EE_CHAR_COLOR ) );
+ aSet.Put( SvxColorItem( nColor, EE_CHAR_COLOR ) );
mpEditEngine->QuickSetAttribs( aSet, aSel );
++nCount;
}
More information about the Libreoffice-commits
mailing list