diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-19 16:11:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-20 07:19:16 +0100 |
commit | 19a906f09688f06ee90cac2a50126aeba749a331 (patch) | |
tree | 66320878bd537b646f06afdbf2d2409e961f3024 | |
parent | a7ee3cc31331353d307e4b7aaf7fe88721df6470 (diff) |
drop Color::SetColor(ColorData) in favour of operator=
first stage of getting rid of ColorData
Change-Id: I5e4e95eb958722814c43c8d1ebfef17ad18c29ec
Reviewed-on: https://gerrit.libreoffice.org/49997
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
47 files changed, 108 insertions, 113 deletions
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx index 901391e1f870..678ccb333297 100644 --- a/cui/source/options/cfgchart.cxx +++ b/cui/source/options/cfgchart.cxx @@ -232,7 +232,7 @@ bool SvxChartOptions::RetrieveOptions() // set color values for( sal_Int32 i=0; i < nCount; i++ ) { - aCol.SetColor( static_cast< ColorData >(aColorSeq[ i ]) ); + aCol = static_cast< ColorData >(aColorSeq[ i ]); aName = aPrefix + OUString::number(i + 1) + aPostfix; diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 1ba445c9c224..0ba63a11e4fa 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -560,7 +560,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet ) Color aColor; bool bColorEq = m_pFrameSel->GetVisibleColor( aColor ); if( !bColorEq ) - aColor.SetColor( COL_BLACK ); + aColor = COL_BLACK; m_pLbLineColor->SelectEntry(aColor); m_pLbLineStyle->SetColor(aColor); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 8234906b3aea..fe6e5118fd23 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -324,9 +324,9 @@ IMPL_LINK(SvxColorTabPage, ModifiedHdl_Impl, Edit&, rEdit, void) aCurrentColor = Color(m_pHexcustom->GetColor()); else { - aCurrentColor.SetColor ( Color( static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pRcustom->GetValue()) )), + aCurrentColor = Color( static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pRcustom->GetValue()) )), static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pGcustom->GetValue()) )), - static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pBcustom->GetValue()) )) ).GetColor() ); + static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pBcustom->GetValue()) )) ); } UpdateColorValues(); @@ -334,10 +334,10 @@ IMPL_LINK(SvxColorTabPage, ModifiedHdl_Impl, Edit&, rEdit, void) else { // read current MtrFields, if cmyk, then k-value as transparency - aCurrentColor.SetColor ( Color( static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pKcustom->GetValue()) )), + aCurrentColor = Color( static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pKcustom->GetValue()) )), static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pCcustom->GetValue()) )), static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pYcustom->GetValue()) )), - static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pMcustom->GetValue()) )) ).GetColor() ); + static_cast<sal_uInt8>(PercentToColor_Impl( static_cast<sal_uInt16>(m_pMcustom->GetValue()) )) ); ConvertColorValues (aCurrentColor, ColorModel::RGB); } diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index dec57ba55578..d528a36b5229 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -1713,7 +1713,7 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) if(!(rVal >>= nColor)) return false; - mColor.SetColor( nColor ); + mColor = nColor; return true; } diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 67bc1ce7bfe5..6c4ff8b887df 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -414,7 +414,7 @@ void SvxRTFParser::ReadColorTable() Color* pColor = new Color( nRed, nGreen, nBlue ); if( aColorTbl.empty() && sal_uInt8(-1) == nRed && sal_uInt8(-1) == nGreen && sal_uInt8(-1) == nBlue ) - pColor->SetColor( COL_AUTO ); + *pColor = COL_AUTO; aColorTbl.push_back( pColor ); nRed = 0; nGreen = 0; diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 1f112475f331..5aa4bb35bc75 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -3324,7 +3324,7 @@ bool SvxMSDffManager::GetColorFromPalette( sal_uInt16 /* nNum */, Color& rColor { // This method has to be overwritten in the class // derived for the excel export - rColor.SetColor( COL_WHITE ); + rColor = COL_WHITE; return true; } diff --git a/include/tools/color.hxx b/include/tools/color.hxx index 5e1b603aa461..1006f7a4dc45 100644 --- a/include/tools/color.hxx +++ b/include/tools/color.hxx @@ -79,10 +79,6 @@ public: return COLORDATA_TRANSPARENCY(mnColor); } - void SetColor(ColorData nColor) - { - mnColor = nColor; - } ColorData GetColor() const { return mnColor; diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 29c16f6e8243..df70447d3c4d 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4407,7 +4407,7 @@ void Test::testSetBackgroundColor() aColor, m_pDoc->GetTabBgColor(0)); Color aOldTabBgColor=m_pDoc->GetTabBgColor(0); - aColor.SetColor(COL_BLUE);//set BLUE + aColor = COL_BLUE; getDocShell().GetDocFunc().SetTabBgColor(0,aColor,false, true); CPPUNIT_ASSERT_EQUAL_MESSAGE("the correct color is not set the second time", aColor, m_pDoc->GetTabBgColor(0)); diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 2c701faf5b7f..ba41d58fef4d 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -358,7 +358,7 @@ void ScPatternAttr::GetFont( eAutoMode == SC_AUTOCOL_IGNOREFONT || eAutoMode == SC_AUTOCOL_IGNOREALL ) { if ( eAutoMode == SC_AUTOCOL_BLACK ) - aColor.SetColor( COL_BLACK ); + aColor = COL_BLACK; else { // get background color from conditional or own set @@ -378,38 +378,38 @@ void ScPatternAttr::GetFont( eAutoMode == SC_AUTOCOL_IGNOREBACK || eAutoMode == SC_AUTOCOL_IGNOREALL ) { if ( eAutoMode == SC_AUTOCOL_PRINT ) - aBackColor.SetColor( COL_WHITE ); + aBackColor = COL_WHITE; else if ( pBackConfigColor ) { // pBackConfigColor can be used to avoid repeated lookup of the configured color aBackColor = *pBackConfigColor; } else - aBackColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor ); + aBackColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; } // get system text color for comparison Color aSysTextColor; if ( eAutoMode == SC_AUTOCOL_PRINT ) - aSysTextColor.SetColor( COL_BLACK ); + aSysTextColor = COL_BLACK; else if ( pTextConfigColor ) { // pTextConfigColor can be used to avoid repeated lookup of the configured color aSysTextColor = *pTextConfigColor; } else - aSysTextColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor ); + aSysTextColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; // select the resulting color if ( aBackColor.IsDark() && aSysTextColor.IsDark() ) { // use white instead of dark on dark - aColor.SetColor( COL_WHITE ); + aColor = COL_WHITE; } else if ( aBackColor.IsBright() && aSysTextColor.IsBright() ) { // use black instead of bright on bright - aColor.SetColor( COL_BLACK ); + aColor = COL_BLACK; } else { diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 3fb920328116..0146f42f36df 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -2435,9 +2435,9 @@ void XclImpChChart3d::Convert( ScfPropertySet& rPropSet, bool b3dWallChart ) con bool bParallel = bRightAngled || (nPerspective == 0); eProjMode = bParallel ? cssd::ProjectionMode_PARALLEL : cssd::ProjectionMode_PERSPECTIVE; // ambient color (Gray 20%) - aAmbientColor.SetColor( RGB_COLORDATA( 204, 204, 204 ) ); + aAmbientColor = RGB_COLORDATA( 204, 204, 204 ); // light color (Gray 60%) - aLightColor.SetColor( RGB_COLORDATA( 102, 102, 102 ) ); + aLightColor = RGB_COLORDATA( 102, 102, 102 ); } else { @@ -2452,9 +2452,9 @@ void XclImpChChart3d::Convert( ScfPropertySet& rPropSet, bool b3dWallChart ) con bRightAngled = false; eProjMode = cssd::ProjectionMode_PARALLEL; // ambient color (Gray 30%) - aAmbientColor.SetColor( RGB_COLORDATA( 179, 179, 179 ) ); + aAmbientColor = RGB_COLORDATA( 179, 179, 179 ); // light color (Gray 70%) - aLightColor.SetColor( RGB_COLORDATA( 76, 76, 76 ) ); + aLightColor = RGB_COLORDATA( 76, 76, 76 ); } // properties diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 01a29ca3c7ab..2b75c82a94d4 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -3224,7 +3224,7 @@ bool XclImpSimpleDffConverter::GetColorFromPalette( sal_uInt16 nIndex, Color& rC if( nColor == COL_AUTO ) return false; - rColor.SetColor( nColor ); + rColor = nColor; return true; } diff --git a/sc/source/filter/excel/xiview.cxx b/sc/source/filter/excel/xiview.cxx index e654fc7d3492..143512b2bd92 100644 --- a/sc/source/filter/excel/xiview.cxx +++ b/sc/source/filter/excel/xiview.cxx @@ -263,7 +263,7 @@ void XclImpTabViewSettings::Finalize() // grid color if( maData.mbDefGridColor ) - rTabSett.maGridColor.SetColor( COL_AUTO ); + rTabSett.maGridColor = COL_AUTO; else rTabSett.maGridColor = maData.maGridColor; diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index 6d5f8567e127..7c7b54253931 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -186,7 +186,7 @@ void XclFontData::Clear() { maName.clear(); maStyle.clear(); - maColor.SetColor( COL_AUTO ); + maColor = COL_AUTO; mnHeight = 0; mnWeight = EXC_FONTWGHT_DONTKNOW; mnEscapem = EXC_FONTESC_NONE; diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx index cffb346ec27b..f70ecfab5a9d 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -706,7 +706,7 @@ XclImpStream& operator>>( XclImpStream& rStrm, Color& rColor ) sal_uInt8 nG = rStrm.ReaduInt8(); sal_uInt8 nB = rStrm.ReaduInt8(); rStrm.Ignore( 1 );//nD - rColor.SetColor( RGB_COLORDATA( nR, nG, nB ) ); + rColor = RGB_COLORDATA( nR, nG, nB ); return rStrm; } diff --git a/sc/source/filter/excel/xlview.cxx b/sc/source/filter/excel/xlview.cxx index 9e65e3f1f06f..5d56e2153ac6 100644 --- a/sc/source/filter/excel/xlview.cxx +++ b/sc/source/filter/excel/xlview.cxx @@ -50,7 +50,7 @@ XclTabViewData::~XclTabViewData() void XclTabViewData::SetDefaults() { maSelMap.clear(); - maGridColor.SetColor( COL_AUTO ); + maGridColor = COL_AUTO; maFirstXclPos.Set( 0, 0 ); maSecondXclPos.Set( 0, 0 ); mnSplitX = mnSplitY = 0; @@ -65,7 +65,7 @@ void XclTabViewData::SetDefaults() mbDefGridColor = true; mbShowFormulas = false; mbShowGrid = mbShowHeadings = mbShowZeros = mbShowOutline = true; - maTabBgColor.SetColor( COL_AUTO ); + maTabBgColor = COL_AUTO; mnTabBgColorId = 0; } diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index b342d37b8509..c31dd38517a8 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -1137,7 +1137,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) // always export automatic text color as black if ( aColor.GetColor() == COL_AUTO ) - aColor.SetColor( COL_BLACK ); + aColor = COL_BLACK; aStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_color). append('=').append(lcl_makeHTMLColorTriplet(aColor)); diff --git a/sc/source/filter/xml/xmlsceni.cxx b/sc/source/filter/xml/xmlsceni.cxx index 05c49e357826..e625333631cb 100644 --- a/sc/source/filter/xml/xmlsceni.cxx +++ b/sc/source/filter/xml/xmlsceni.cxx @@ -62,7 +62,7 @@ ScXMLTableScenarioContext::ScXMLTableScenarioContext( { sal_Int32 nColor(0); ::sax::Converter::convertColor(nColor, aIter.toString()); - aBorderColor.SetColor(nColor); + aBorderColor = nColor; } break; case XML_ELEMENT( TABLE, XML_COPY_BACK ): diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 62c0697d5419..9038903d57d1 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2118,7 +2118,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn ScModule* pScMod = SC_MOD(); if ( aBackCol.GetTransparency() > 0 || Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) - aBackCol.SetColor( pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor ); + aBackCol = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; mpEditEngine->SetBackgroundColor( aBackCol ); // Adjustment diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 4e1f4c33f9d6..ed47160ea08e 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -213,11 +213,11 @@ void ScCsvGrid::InitColors() OSL_PRECOND(mpColorConfig, "the object hasn't been initialized properly"); if ( !mpColorConfig ) return; - maBackColor.SetColor( static_cast< sal_uInt32 >( mpColorConfig->GetColorValue( ::svtools::DOCCOLOR ).nColor ) ); - maGridColor.SetColor( static_cast< sal_uInt32 >( mpColorConfig->GetColorValue( ::svtools::CALCGRID ).nColor ) ); - maGridPBColor.SetColor( static_cast< sal_uInt32 >( mpColorConfig->GetColorValue( ::svtools::CALCPAGEBREAK ).nColor ) ); - maAppBackColor.SetColor( static_cast< sal_uInt32 >( mpColorConfig->GetColorValue( ::svtools::APPBACKGROUND ).nColor ) ); - maTextColor.SetColor( static_cast< sal_uInt32 >( mpColorConfig->GetColorValue( ::svtools::FONTCOLOR ).nColor ) ); + maBackColor = static_cast< sal_uInt32 >( mpColorConfig->GetColorValue( ::svtools::DOCCOLOR ).nColor ); + maGridColor = static_cast< sal_uInt32 >( mpColorConfig->GetColorValue( ::svtools::CALCGRID ).nColor ); + maGridPBColor = static_cast< sal_uInt32 >( mpColorConfig->GetColorValue( ::svtools::CALCPAGEBREAK ).nColor ); + maAppBackColor = static_cast< sal_uInt32 >( mpColorConfig->GetColorValue( ::svtools::APPBACKGROUND ).nColor ); + maTextColor = static_cast< sal_uInt32 >( mpColorConfig->GetColorValue( ::svtools::FONTCOLOR ).nColor ); const StyleSettings& rSett = GetSettings().GetStyleSettings(); maHeaderBackColor = rSett.GetFaceColor(); diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index f841f075790e..9b473c7ab909 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -1214,7 +1214,7 @@ void SAL_CALL ScDataBarFormatObj::setPropertyValue( sal_Int32 nColor = COL_AUTO; if (aValue >>= nColor) { - getCoreObject()->GetDataBarData()->maPositiveColor.SetColor(nColor); + getCoreObject()->GetDataBarData()->maPositiveColor = nColor; } } break; @@ -1223,7 +1223,7 @@ void SAL_CALL ScDataBarFormatObj::setPropertyValue( sal_Int32 nAxisColor = COL_AUTO; if (aValue >>= nAxisColor) { - getCoreObject()->GetDataBarData()->maAxisColor.SetColor(nAxisColor); + getCoreObject()->GetDataBarData()->maAxisColor = nAxisColor; } } break; @@ -1233,7 +1233,7 @@ void SAL_CALL ScDataBarFormatObj::setPropertyValue( if (!(aValue >>= nNegativeColor) || !getCoreObject()->GetDataBarData()->mbNeg) throw lang::IllegalArgumentException(); - getCoreObject()->GetDataBarData()->mpNegativeColor->SetColor(nNegativeColor); + (*getCoreObject()->GetDataBarData()->mpNegativeColor) = nNegativeColor; } break; diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index f8ee6eec03fa..b413b385a801 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -82,7 +82,7 @@ static PatternMap aPatternMap( lcl_getPatternMap() ); ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xProps, ScDocument* pScDoc ) : ScVbaInterior_BASE( xParent, xContext ), m_xProps(xProps), m_pScDoc( pScDoc ) { // auto color - m_aPattColor.SetColor( sal_uInt32(0x0) ); + m_aPattColor = sal_uInt32(0x0); m_nPattern = 0; if ( !m_xProps.is() ) throw lang::IllegalArgumentException("properties", uno::Reference< uno::XInterface >(), 2 ); @@ -121,7 +121,7 @@ ScVbaInterior::SetMixedColor() if( aPatternColor.hasValue() ) { sal_uInt32 nPatternColor = GetAttributeData( aPatternColor ); - m_aPattColor.SetColor( nPatternColor ); + m_aPattColor = nPatternColor; } sal_Int32 nPatternColor = m_aPattColor.GetColor(); // back color @@ -320,7 +320,7 @@ ScVbaInterior::GetBackColor() if( aColor.hasValue() ) { nColor = GetAttributeData( aColor ); - aBackColor.SetColor( nColor ); + aBackColor = nColor; } else { @@ -329,7 +329,7 @@ ScVbaInterior::GetBackColor() if( aAny >>= nColor ) { nColor = XLRGBToOORGB( nColor ); - aBackColor.SetColor( nColor ); + aBackColor = nColor; SetUserDefinedAttributes( BACKCOLOR, SetAttributeData( nColor ) ); } } diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 16db6a191dc1..fa9469259a09 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -343,8 +343,8 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool { bWorksInPixels = true; const svtools::ColorConfig& rColorCfg = SC_MOD()->GetColorConfig(); - aPageColor.SetColor( rColorCfg.GetColorValue(svtools::CALCPAGEBREAKAUTOMATIC).nColor ); - aManualColor.SetColor( rColorCfg.GetColorValue(svtools::CALCPAGEBREAKMANUAL).nColor ); + aPageColor = rColorCfg.GetColorValue(svtools::CALCPAGEBREAKAUTOMATIC).nColor; + aManualColor = rColorCfg.GetColorValue(svtools::CALCPAGEBREAKMANUAL).nColor; } else { @@ -1160,7 +1160,7 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot bool bCellContrast = mbUseStyleColor && rStyleSettings.GetHighContrastMode(); Color aAutoTextColor; if ( bCellContrast ) - aAutoTextColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor ); + aAutoTextColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; long nInitPosX = nScrX; if ( bLayoutRTL ) @@ -1370,7 +1370,7 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext) if ( ( nOldDrawMode & DrawModeFlags::WhiteFill ) && ( nOldDrawMode & DrawModeFlags::BlackLine ) ) { rRenderContext.SetDrawMode( nOldDrawMode & (~DrawModeFlags::WhiteFill) ); - aSingleColor.SetColor( COL_BLACK ); + aSingleColor = COL_BLACK; bUseSingleColor = true; } else if ( ( nOldDrawMode & DrawModeFlags::SettingsFill ) && ( nOldDrawMode & DrawModeFlags::SettingsLine ) ) @@ -1381,7 +1381,7 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext) } else if ( bCellContrast ) { - aSingleColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor ); + aSingleColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; bUseSingleColor = true; } @@ -2320,7 +2320,7 @@ void ScOutputData::DrawClipMarks() // use DrawMode to change the arrow's outline color mpDev->SetDrawMode( nOldDrawMode | DrawModeFlags::SettingsLine ); // use text color also for the fill color - aArrowFillCol.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor ); + aArrowFillCol = SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; } long nInitPosX = nScrX; diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 5404f0c644c0..b62761e61306 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -217,8 +217,8 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, bool bPTL) : Application::GetSettings().GetStyleSettings().GetHighContrastMode(); const svtools::ColorConfig& rColorConfig = pScMod->GetColorConfig(); - aBackConfigColor.SetColor( rColorConfig.GetColorValue(svtools::DOCCOLOR).nColor ); - aTextConfigColor.SetColor( rColorConfig.GetColorValue(svtools::FONTCOLOR).nColor ); + aBackConfigColor = rColorConfig.GetColorValue(svtools::DOCCOLOR).nColor; + aTextConfigColor = rColorConfig.GetColorValue(svtools::FONTCOLOR).nColor; } void ScDrawStringsVars::SetShrinkScale( long nScale, SvtScriptType nScript ) @@ -2437,7 +2437,7 @@ void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor) Color aBackCol = mpPattern->GetItem( ATTR_BACKGROUND, mpCondSet ).GetColor(); if ( bUseStyleColor && ( aBackCol.GetTransparency() > 0 || bCellContrast ) ) - aBackCol.SetColor( nConfBackColor ); + aBackCol = nConfBackColor; mpEngine->SetBackgroundColor( aBackCol ); } @@ -4596,7 +4596,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic) Color aBackCol = pPattern->GetItem( ATTR_BACKGROUND, pCondSet ).GetColor(); if ( mbUseStyleColor && ( aBackCol.GetTransparency() > 0 || bCellContrast ) ) - aBackCol.SetColor( nConfBackColor ); + aBackCol = nConfBackColor; pEngine->SetBackgroundColor( aBackCol ); } diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index c51b9ea7c714..e4c6dc309a80 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -1626,7 +1626,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, Color aGridColor( COL_BLACK ); if ( bUseStyleColor ) - aGridColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor ); + aGridColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; aOutputData.SetGridColor( aGridColor ); if ( !pPrinter ) @@ -1964,7 +1964,7 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, bool bDoPrint, ScPr Color aBackgroundColor( COL_WHITE ); if ( bUseStyleColor ) - aBackgroundColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor ); + aBackgroundColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; pDev->SetMapMode(aOffsetMode); pDev->SetLineColor(); @@ -2033,7 +2033,7 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO Color aBackgroundColor( COL_WHITE ); if ( bUseStyleColor ) - aBackgroundColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor ); + aBackgroundColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; pDev->SetMapMode(aOffsetMode); pDev->SetLineColor(); @@ -2291,7 +2291,7 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO Color aGridColor( COL_BLACK ); if ( bUseStyleColor ) - aGridColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor ); + aGridColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; if (aTableParam.bHeaders) { diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 4ad6e7ff3b22..2cc4ebab02c7 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -1647,7 +1647,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, ScModule* pScMod = SC_MOD(); if ( aBackCol.GetTransparency() > 0 ) { - aBackCol.SetColor( pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor ); + aBackCol = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; } pEditView[eWhich]->SetBackgroundColor( aBackCol ); @@ -3073,7 +3073,7 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const rMarkData.FillRangeListWithMarks( &rTabSett.maSelection, true ); // grid color - rTabSett.maGridColor.SetColor( COL_AUTO ); + rTabSett.maGridColor = COL_AUTO; if( pOptions ) { const Color& rGridColor = pOptions->GetGridColor(); @@ -3239,7 +3239,7 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt ) { Color aGridColor( rTabSett.maGridColor ); if( aGridColor.GetColor() == COL_AUTO ) - aGridColor.SetColor( SC_STD_GRIDCOLOR ); + aGridColor = SC_STD_GRIDCOLOR; pOptions->SetGridColor( aGridColor, EMPTY_OUSTRING ); } @@ -3460,7 +3460,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue> Color aColor(static_cast<sal_uInt32>(nColor)); // #i47435# set automatic grid color explicitly if( aColor.GetColor() == COL_AUTO ) - aColor.SetColor( SC_STD_GRIDCOLOR ); + aColor = SC_STD_GRIDCOLOR; pOptions->SetGridColor(aColor, OUString()); } } diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 50421238b80f..0d54c61b3182 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -467,14 +467,14 @@ CellInfo::CellInfo( const Reference< XStyle >& xStyle ) // get style fill color if( !GetDraftFillColor(rSet, maCellColor) ) - maCellColor.SetColor( COL_TRANSPARENT ); + maCellColor = COL_TRANSPARENT; // get style text color const SvxColorItem* pTextColor = rSet.GetItem(EE_CHAR_COLOR); if( pTextColor ) maTextColor = pTextColor->GetValue(); else - maTextColor.SetColor( COL_TRANSPARENT ); + maTextColor = COL_TRANSPARENT; // get border const SvxBoxItem* pBoxItem = rSet.GetItem( SDRATTR_TABLE_BORDER ); @@ -649,7 +649,7 @@ const BitmapEx CreateDesignPreview( const Reference< XIndexAccess >& xTableStyle // draw text preview line if( aTextColor.GetColor() == COL_AUTO ) - aTextColor.SetColor( bIsPageDark ? COL_WHITE : COL_BLACK ); + aTextColor = bIsPageDark ? COL_WHITE : COL_BLACK; pVirDev->SetLineColor( aTextColor ); const Point aPnt1( nX + 2, nY + ((nCellHeight - 1 ) >> 1) ); const Point aPnt2( nX + nCellWidth - 3, aPnt1.Y() ); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 266941dcf6d8..f8dbb98176e1 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -2713,9 +2713,9 @@ void SvxIconChoiceCtrl_Impl::ShowFocus ( tools::Rectangle const & rRect ) Color aPenColor; sal_uInt16 nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3; if (nColor > 128) - aPenColor.SetColor(COL_BLACK); + aPenColor = COL_BLACK; else - aPenColor.SetColor(COL_WHITE); + aPenColor = COL_WHITE; aFocus.aPenColor = aPenColor; aFocus.aRect = rRect; diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index c63e3ecf82de..962e35ade5c1 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -315,7 +315,7 @@ void Calendar::ImplFormat() // determine colours maOtherColor = Color( COL_LIGHTGRAY ); if ( maOtherColor.IsRGBEqual( GetBackground().GetColor() ) ) - maOtherColor.SetColor( COL_GRAY ); + maOtherColor = COL_GRAY; Date aLastDate = GetLastDate(); if ( (maOldFormatLastDate != aLastDate) || diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx index 941f9bbaa779..68aad12d8566 100644 --- a/svtools/source/dialogs/colrdlg.cxx +++ b/svtools/source/dialogs/colrdlg.cxx @@ -92,7 +92,7 @@ short SvColorDialog::Execute() sal_Int32 nColor = 0; if( props[n].Value >>= nColor ) { - maColor.SetColor( nColor ); + maColor = nColor; } } diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx index 6992e3d61ce3..b48e5c360c45 100644 --- a/svx/source/unodraw/unobrushitemhelper.cxx +++ b/svx/source/unodraw/unobrushitemhelper.cxx @@ -199,7 +199,7 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt // for writerfilter: when fill style is none, then don't allow anything other than 0 or auto. if (!bXMLImportHack && aFillColor.GetColor() != 0) - aFillColor.SetColor(COL_AUTO); + aFillColor = COL_AUTO; aFillColor.SetTransparency(0xff); diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 1d0aebd450d8..6e09e74547ab 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1108,7 +1108,7 @@ bool SwFormatCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { m_bOrtho = pSwColums->IsAutomaticWidth(); m_nLineWidth = pSwColums->GetSepLineWidth(); - m_aLineColor.SetColor(pSwColums->GetSepLineColor()); + m_aLineColor = pSwColums->GetSepLineColor(); m_nLineHeight = pSwColums->GetSepLineHeightRelative(); switch ( pSwColums->GetSepLineStyle() ) { diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 40887178d8bd..464b96e1fa5a 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -259,7 +259,7 @@ Color SwViewShellImp::GetRetoucheColor() const aRet = rSh.GetViewOptions()->GetRetoucheColor(); else if(rSh.GetViewOptions()->IsPagePreview() && !SW_MOD()->GetAccessibilityOptions().GetIsForPagePreviews()) - aRet.SetColor(COL_WHITE); + aRet = COL_WHITE; else aRet = SwViewOption::GetDocColor(); } diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index c26e04acbbbf..c7316e90c2e7 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -2388,7 +2388,7 @@ static Writer& OutCSS1_SvxColor( Writer& rWrt, const SfxPoolItem& rHt ) Color aColor( static_cast<const SvxColorItem&>(rHt).GetValue() ); if( COL_AUTO == aColor.GetColor() ) - aColor.SetColor( COL_BLACK ); + aColor = COL_BLACK; rHTMLWrt.OutCSS1_PropertyAscii(sCSS1_P_color, lclGetCSS1Color(aColor)); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 5ccea69bb624..d6d4be4380b1 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1667,7 +1667,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, "Not a foreground color, after all" ); Color aColor( static_cast<const SvxColorItem&>(rItem).GetValue() ); if( COL_AUTO == aColor.GetColor() ) - aColor.SetColor( COL_BLACK ); + aColor = COL_BLACK; bSet = !bParaAttrs || !pDfltColor || !pDfltColor->IsRGBEqual( aColor ); } @@ -2618,7 +2618,7 @@ static Writer& OutHTML_SvxColor( Writer& rWrt, const SfxPoolItem& rHt ) { Color aColor( static_cast<const SvxColorItem&>(rHt).GetValue() ); if( COL_AUTO == aColor.GetColor() ) - aColor.SetColor( COL_BLACK ); + aColor = COL_BLACK; OString sOut = "<" OOO_STRING_SVTOOLS_HTML_font " " OOO_STRING_SVTOOLS_HTML_O_color "="; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index fa5b976506a4..1af09bd802d6 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -5271,7 +5271,7 @@ void SwHTMLParser::InsertHorzRule() { // set line colour and/or width if( !bColor ) - aColor.SetColor( COL_GRAY ); + aColor = COL_GRAY; SvxBorderLine aBorderLine( &aColor ); if( nSize ) diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index dd6a2dd3f0ad..c7256f05a8c0 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -854,11 +854,11 @@ static void OutBodyColor( const sal_Char* pTag, const SwFormat *pFormat, { Color aColor( pCItem->GetValue() ); if( COL_AUTO == aColor.GetColor() ) - aColor.SetColor( COL_BLACK ); + aColor = COL_BLACK; Color aRefColor( static_cast<const SvxColorItem*>(pRefItem)->GetValue() ); if( COL_AUTO == aRefColor.GetColor() ) - aRefColor.SetColor( COL_BLACK ); + aRefColor = COL_BLACK; if( !aColor.IsRGBEqual( aRefColor ) ) pColorItem = pCItem; @@ -877,7 +877,7 @@ static void OutBodyColor( const sal_Char* pTag, const SwFormat *pFormat, rHWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); Color aColor( pColorItem->GetValue() ); if( COL_AUTO == aColor.GetColor() ) - aColor.SetColor( COL_BLACK ); + aColor = COL_BLACK; HTMLOutFuncs::Out_Color( rHWrt.Strm(), aColor ); if( RES_POOLCOLL_STANDARD==pFormat->GetPoolFormatId() ) rHWrt.m_pDfltColor = new Color( aColor ); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 3142f3441ce2..1c76b54c5d51 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -4750,7 +4750,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex) switch (nWW8BrushStyle) { case 0: // Null-Brush - aColor.SetColor( nBack ); + aColor = nBack; break; default: { @@ -4764,8 +4764,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex) nGreen += aBackColor.GetGreen()* (1000 - nWW8BrushStyle); nBlue += aBackColor.GetBlue() * (1000 - nWW8BrushStyle); - aColor.SetColor( RGB_COLORDATA( nRed/1000, nGreen/1000, - nBlue/1000 ) ); + aColor = RGB_COLORDATA( nRed/1000, nGreen/1000, nBlue/1000 ); } break; } diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 32a591e82b0b..6806ae9b62b3 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -379,7 +379,7 @@ bool SvXMLImportItemMapper::PutXMLValue( if( !bOk ) return false; - aColor.SetColor(nColor); + aColor = nColor; bColorFound = true; } else if( !bOffsetFound ) diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx index bce229c2a9cd..6be60f48c2c7 100644 --- a/sw/source/filter/xml/xmlithlp.cxx +++ b/sw/source/filter/xml/xmlithlp.cxx @@ -114,7 +114,7 @@ bool sw_frmitems_parseXMLBorder( const OUString& rValue, } else if (!rHasColor && ::sax::Converter::convertColor(nTemp, aToken)) { - rColor.SetColor(nTemp); + rColor = nTemp; rHasColor = true; } else if( !rHasWidth && diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index 84439d8bb053..39b7ced20b26 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -484,7 +484,7 @@ static void lcl_FillAuthorAttr( std::size_t nAuthor, SfxItemSet &rSet, Color aCol( rAttr.m_nColor ); if( COL_TRANSPARENT == rAttr.m_nColor ) - aCol.SetColor(lcl_GetAuthorColor(nAuthor)); + aCol = lcl_GetAuthorColor(nAuthor); bool bBackGr = COL_NONE_COLOR == rAttr.m_nColor; diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx index a6cb03eb1ef5..5341cac72c35 100644 --- a/sw/source/uibase/config/modcfg.cxx +++ b/sw/source/uibase/config/modcfg.cxx @@ -362,7 +362,7 @@ void SwRevisionConfig::Load() case 4 : lcl_ConvertCfgToAttr(nVal, aFormatAttr); break; case 5 : aFormatAttr.m_nColor = nVal; break; case 6 : nMarkAlign = sal::static_int_cast< sal_uInt16, sal_Int32>(nVal); break; - case 7 : aMarkColor.SetColor(nVal); break; + case 7 : aMarkColor = nVal; break; case 8 : bShowInlineTooltip = *o3tl::doAccess<bool>(pValues[nProp]); } } diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 68eb9ada8a12..d291dc76ce50 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -443,73 +443,73 @@ Color& SwViewOption::GetHeaderFooterMarkColor() void SwViewOption::ApplyColorConfigValues(const svtools::ColorConfig& rConfig ) { - m_aDocColor.SetColor(rConfig.GetColorValue(svtools::DOCCOLOR).nColor); + m_aDocColor = rConfig.GetColorValue(svtools::DOCCOLOR).nColor; svtools::ColorConfigValue aValue = rConfig.GetColorValue(svtools::DOCBOUNDARIES); - m_aDocBoundColor.SetColor(aValue.nColor); + m_aDocBoundColor = aValue.nColor; m_nAppearanceFlags = ViewOptFlags::NONE; if(aValue.bIsVisible) m_nAppearanceFlags |= ViewOptFlags::DocBoundaries; - m_aAppBackgroundColor.SetColor(rConfig.GetColorValue(svtools::APPBACKGROUND).nColor); + m_aAppBackgroundColor = rConfig.GetColorValue(svtools::APPBACKGROUND).nColor; aValue = rConfig.GetColorValue(svtools::OBJECTBOUNDARIES); - m_aObjectBoundColor.SetColor(aValue.nColor); + m_aObjectBoundColor = aValue.nColor; if(aValue.bIsVisible) m_nAppearanceFlags |= ViewOptFlags::ObjectBoundaries; aValue = rConfig.GetColorValue(svtools::TABLEBOUNDARIES); - m_aTableBoundColor.SetColor(aValue.nColor); + m_aTableBoundColor = aValue.nColor; if(aValue.bIsVisible) m_nAppearanceFlags |= ViewOptFlags::TableBoundaries; aValue = rConfig.GetColorValue(svtools::WRITERIDXSHADINGS); - m_aIndexShadingsColor.SetColor(aValue.nColor); + m_aIndexShadingsColor = aValue.nColor; if(aValue.bIsVisible) m_nAppearanceFlags |= ViewOptFlags::IndexShadings; aValue = rConfig.GetColorValue(svtools::LINKS); - m_aLinksColor.SetColor(aValue.nColor); + m_aLinksColor = aValue.nColor; if(aValue.bIsVisible) m_nAppearanceFlags |= ViewOptFlags::Links; aValue = rConfig.GetColorValue(svtools::LINKSVISITED); - m_aVisitedLinksColor.SetColor(aValue.nColor); + m_aVisitedLinksColor = aValue.nColor; if(aValue.bIsVisible) m_nAppearanceFlags |= ViewOptFlags::VisitedLinks; aValue = rConfig.GetColorValue(svtools::SHADOWCOLOR); - m_aShadowColor.SetColor(aValue.nColor); + m_aShadowColor = aValue.nColor; if(aValue.bIsVisible) m_nAppearanceFlags |= ViewOptFlags::Shadow; - m_aDirectCursorColor.SetColor(rConfig.GetColorValue(svtools::WRITERDIRECTCURSOR).nColor); + m_aDirectCursorColor = rConfig.GetColorValue(svtools::WRITERDIRECTCURSOR).nColor; - m_aTextGridColor.SetColor(rConfig.GetColorValue(svtools::WRITERTEXTGRID).nColor); + m_aTextGridColor = rConfig.GetColorValue(svtools::WRITERTEXTGRID).nColor; - m_aSpellColor.SetColor(rConfig.GetColorValue(svtools::SPELL).nColor); + m_aSpellColor = rConfig.GetColorValue(svtools::SPELL).nColor; - m_aSmarttagColor.SetColor(rConfig.GetColorValue(svtools::SMARTTAGS).nColor); + m_aSmarttagColor = rConfig.GetColorValue(svtools::SMARTTAGS).nColor; - m_aFontColor.SetColor(rConfig.GetColorValue(svtools::FONTCOLOR).nColor); + m_aFontColor = rConfig.GetColorValue(svtools::FONTCOLOR).nColor; aValue = rConfig.GetColorValue(svtools::WRITERFIELDSHADINGS); - m_aFieldShadingsColor.SetColor(aValue.nColor); + m_aFieldShadingsColor = aValue.nColor; if(aValue.bIsVisible) m_nAppearanceFlags |= ViewOptFlags::FieldShadings; aValue = rConfig.GetColorValue(svtools::WRITERSECTIONBOUNDARIES); - m_aSectionBoundColor.SetColor(aValue.nColor); + m_aSectionBoundColor = aValue.nColor; if(aValue.bIsVisible) m_nAppearanceFlags |= ViewOptFlags::SectionBoundaries; aValue = rConfig.GetColorValue(svtools::WRITERPAGEBREAKS); - m_aPageBreakColor.SetColor(aValue.nColor); + m_aPageBreakColor = aValue.nColor; aValue = rConfig.GetColorValue(svtools::WRITERHEADERFOOTERMARK); - m_aHeaderFooterMarkColor.SetColor(aValue.nColor); + m_aHeaderFooterMarkColor = aValue.nColor; - m_aScriptIndicatorColor.SetColor(rConfig.GetColorValue(svtools::WRITERSCRIPTINDICATOR).nColor); + m_aScriptIndicatorColor = rConfig.GetColorValue(svtools::WRITERSCRIPTINDICATOR).nColor; } void SwViewOption::SetAppearanceFlag(ViewOptFlags nFlag, bool bSet, bool bSaveInConfig ) diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index 25ffbf61a8ba..59a2b2334c08 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -92,7 +92,7 @@ public: } else { - aColor.SetColor(COL_BLACK); + aColor = COL_BLACK; } return aColor; } diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 7862ced5d018..bb44f1bede5c 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -338,7 +338,7 @@ void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vc aSelectionFillColor.RGBtoHSB( h, s, b ); if( b > 50 ) b -= 40; else b += 40; - aSelectionFillColor.SetColor( Color::HSBtoRGB( h, s, b ) ); + aSelectionFillColor = Color::HSBtoRGB( h, s, b ); aSelectionBorderColor = aSelectionFillColor; } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 0945f881e7e9..1b0495f7147e 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3412,7 +3412,7 @@ void Window::DrawSelectionBackground( const tools::Rectangle& rRect, aSelectionFillCol.RGBtoHSB( h, s, b ); if( b > 50 ) b -= 40; else b += 40; - aSelectionFillCol.SetColor( Color::HSBtoRGB( h, s, b ) ); + aSelectionFillCol = Color::HSBtoRGB( h, s, b ); aSelectionBorderCol = aSelectionFillCol; } diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx index 6ff3eb1da0f2..c5e424fb5ed7 100644 --- a/xmloff/source/style/TransGradientStyle.cxx +++ b/xmloff/source/style/TransGradientStyle.cxx @@ -248,14 +248,14 @@ void XMLTransGradientStyleExport::exportXML( Color aColor; // Transparency start - aColor.SetColor( aGradient.StartColor ); + aColor = aGradient.StartColor; sal_Int32 aStartValue = 100 - static_cast<sal_Int32>(((aColor.GetRed() + 1) * 100) / 255); ::sax::Converter::convertPercent( aOut, aStartValue ); aStrValue = aOut.makeStringAndClear(); rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_START, aStrValue ); // Transparency end - aColor.SetColor( aGradient.EndColor ); + aColor = aGradient.EndColor; sal_Int32 aEndValue = 100 - static_cast<sal_Int32>(((aColor.GetRed() + 1) * 100) / 255); ::sax::Converter::convertPercent( aOut, aEndValue ); aStrValue = aOut.makeStringAndClear(); diff --git a/xmloff/source/style/shadwhdl.cxx b/xmloff/source/style/shadwhdl.cxx index 0e14ed87fbd1..bccfab9e017d 100644 --- a/xmloff/source/style/shadwhdl.cxx +++ b/xmloff/source/style/shadwhdl.cxx @@ -68,7 +68,7 @@ bool XMLShadowPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue if( !bRet ) return false; - aColor.SetColor(nColor); + aColor = nColor; bColorFound = true; } else if( !bOffsetFound ) |