summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-21 14:07:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-22 07:23:57 +0100
commit331b4603be47fe059095307b2b3e2c1d399b04f9 (patch)
tree89edb58ed42d9b25558a3651cac8a3234629ad96 /sw/source
parent8ec0f90a287febe661c89e098be457c5d593ded3 (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 'sw/source')
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx3
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx2
-rw-r--r--sw/source/ui/config/optpage.cxx8
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx6
5 files changed, 11 insertions, 12 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 61ad5ce85638..8f7cf453a6c1 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -141,7 +141,7 @@ Color WW8TransCol(SVBT32 nWC)
nIdx += ((nWC[i] == 0xff) ? 2 : 1);
}
if (eColA[nIdx] != COL_BLACK)
- return Color(eColA[nIdx]); // default color
+ return eColA[nIdx]; // default color
}
#endif
@@ -1759,7 +1759,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
const sal_Int32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
SdrMetricItem);
- aShadow.SetColor( Color( aShdColor ) );
+ aShadow.SetColor( aShdColor );
aShadow.SetWidth(writer_cast<sal_uInt16>((std::abs( nShdDistX) +
std::abs( nShdDistY )) / 2 ));
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 2be8a9562df4..05f9de2d82f7 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -930,8 +930,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
false, &pPoolItem );
if( SfxItemState::DEFAULT == eState )
- aSet.Put( XFillColorItem( OUString(),
- Color( mnDefaultColor ) ) );
+ aSet.Put( XFillColorItem( OUString(), mnDefaultColor ) );
pObj->SetMergedItemSet(aSet);
}
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index e9ad64afc8b9..073c0913480b 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3472,7 +3472,7 @@ void SwWW8ImplReader::Read_TextColor( sal_uInt16, const sal_uInt8* pData, short
if( b > 16 ) // unknown -> Black
b = 0;
- NewAttr( SvxColorItem(Color(GetCol(b)), RES_CHRATR_COLOR));
+ NewAttr( SvxColorItem(GetCol(b), RES_CHRATR_COLOR));
if (m_pCurrentColl && m_xStyles)
m_xStyles->bTextColChanged = true;
}
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index ec277a1922d9..5634f8153bc5 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1590,7 +1590,7 @@ void SwMarkPreview::InitColors()
// m_aTransCol and m_aMarkCol are _not_ changed because they are set from outside!
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
- m_aBgCol = Color( rSettings.GetWindowColor() );
+ m_aBgCol = rSettings.GetWindowColor();
bool bHC = rSettings.GetHighContrastMode();
m_aLineCol = bHC? SwViewOption::GetFontColor() : Color( COL_BLACK );
@@ -1917,13 +1917,13 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet* )
InitFontStyle(*m_pChangedPreviewWN);
Color nColor = rInsertAttr.m_nColor;
- m_pInsertColorLB->SelectEntry(Color(nColor));
+ m_pInsertColorLB->SelectEntry(nColor);
nColor = rDeletedAttr.m_nColor;
- m_pDeletedColorLB->SelectEntry(Color(nColor));
+ m_pDeletedColorLB->SelectEntry(nColor);
nColor = rChangedAttr.m_nColor;
- m_pChangedColorLB->SelectEntry(Color(nColor));
+ m_pChangedColorLB->SelectEntry(nColor);
m_pMarkColorLB->SelectEntry(pOpt->GetMarkAlignColor());
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 479770bf6d70..0eb0cbb2d9e0 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -2044,7 +2044,7 @@ Color SwPostItMgr::GetColorDark(std::size_t 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 )];
}
else
return Color(COL_WHITE);
@@ -2059,7 +2059,7 @@ Color SwPostItMgr::GetColorLight(std::size_t 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 )];
}
else
return Color(COL_WHITE);
@@ -2074,7 +2074,7 @@ Color SwPostItMgr::GetColorAnchor(std::size_t aAuthorIndex)
COL_AUTHOR4_DARK, COL_AUTHOR5_DARK, COL_AUTHOR6_DARK,
COL_AUTHOR7_DARK, COL_AUTHOR8_DARK, COL_AUTHOR9_DARK };
- return Color( aArrayAnchor[ aAuthorIndex % SAL_N_ELEMENTS( aArrayAnchor )]);
+ return aArrayAnchor[ aAuthorIndex % SAL_N_ELEMENTS( aArrayAnchor )];
}
else
return Color(COL_WHITE);