diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-26 17:13:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-28 07:34:27 +0100 |
commit | e2cb154195fdc2ffccdb6f5e87cae8b29640b3eb (patch) | |
tree | 7c3d53d78e0867aa879b98d84211d1e73602520f /sc | |
parent | 0ea41fea75cd1ac1d81fa57c4411e75a6b4001f0 (diff) |
convert COL_ constants to be of type Color
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
22 files changed, 59 insertions, 53 deletions
diff --git a/sc/qa/extras/new_cond_format.cxx b/sc/qa/extras/new_cond_format.cxx index ee0a0e60e6b1..b6587e6059e7 100644 --- a/sc/qa/extras/new_cond_format.cxx +++ b/sc/qa/extras/new_cond_format.cxx @@ -23,6 +23,12 @@ using namespace css; +inline std::ostream& operator<<(std::ostream& rStrm, const Color& rColor) +{ + rStrm << "Color: R:" << static_cast<int>(rColor.GetRed()) << " G:" << static_cast<int>(rColor.GetGreen()) << " B: " << static_cast<int>(rColor.GetBlue()); + return rStrm; +} + namespace sc_apitest { class ScConditionalFormatTest : public CalcUnoApiTest @@ -350,10 +356,10 @@ void ScConditionalFormatTest::testDataBarProperties() namespace { void testColorScaleEntry(uno::Reference<sheet::XColorScaleEntry> const & xEntry, - sal_Int32 nType, const OUString& rString, sal_uInt32 nColor) + sal_Int32 nType, const OUString& rString, Color nColor) { CPPUNIT_ASSERT_EQUAL(nType, xEntry->getType()); - CPPUNIT_ASSERT_EQUAL(nColor, sal_uInt32(xEntry->getColor())); + CPPUNIT_ASSERT_EQUAL(nColor, Color(xEntry->getColor())); switch (nType) { case sheet::ColorScaleEntryType::COLORSCALE_VALUE: @@ -370,9 +376,9 @@ void testColorScaleEntry(uno::Reference<sheet::XColorScaleEntry> const & xEntry, } void testColorScaleEntries(uno::Reference<beans::XPropertySet> const & xPropSet, sal_Int32 nEntries, - sal_Int32 nMinType, const OUString& rMinString, sal_uInt32 nMinColor, - sal_Int32 nMediumType, const OUString& rMediumString, sal_uInt32 nMediumColor, - sal_Int32 nMaxType, const OUString& rMaxString, sal_uInt32 nMaxColor) + sal_Int32 nMinType, const OUString& rMinString, Color nMinColor, + sal_Int32 nMediumType, const OUString& rMediumString, Color nMediumColor, + sal_Int32 nMaxType, const OUString& rMaxString, Color nMaxColor) { uno::Any aAny = xPropSet->getPropertyValue("ColorScaleEntries"); CPPUNIT_ASSERT(aAny.hasValue()); diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 90f37a89db56..f99d23df203e 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -179,7 +179,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat) vcl::Font aFont; pPattern->GetFont(aFont,SC_AUTOCOL_RAW); CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", 200l, aFont.GetFontSize().getHeight()); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font color should be black", COL_AUTO, aFont.GetColor().GetColor()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font color should be black", COL_AUTO, aFont.GetColor()); pPattern = pDoc->GetPattern(0,1,1); pPattern->GetFont(aFont, SC_AUTOCOL_RAW); CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", 240l, aFont.GetFontSize().getHeight()); @@ -191,7 +191,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat) CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); pPattern = pDoc->GetPattern(1,0,1); pPattern->GetFont(aFont, SC_AUTOCOL_RAW); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be blue", COL_BLUE, aFont.GetColor().GetColor()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be blue", COL_BLUE, aFont.GetColor()); pPattern = pDoc->GetPattern(1,1,1); pPattern->GetFont(aFont, SC_AUTOCOL_RAW); CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be striked out with a single line", STRIKEOUT_SINGLE, aFont.GetStrikeout()); @@ -224,7 +224,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat) } pPattern = pDoc->GetPattern(1,4,1); Color aColor = pPattern->GetItem(ATTR_BACKGROUND).GetColor(); - CPPUNIT_ASSERT_EQUAL_MESSAGE("background color should be green", Color(COL_LIGHTGREEN), aColor); + CPPUNIT_ASSERT_EQUAL_MESSAGE("background color should be green", COL_LIGHTGREEN, aColor); pPattern = pDoc->GetPattern(2,0,1); SvxCellHorJustify eHorJustify = pPattern->GetItem(ATTR_HOR_JUSTIFY).GetValue(); CPPUNIT_ASSERT_EQUAL_MESSAGE("cell content should be aligned centre horizontally", SvxCellHorJustify::Center, eHorJustify); diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 8899e6861811..47ed37c4ee76 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -1178,7 +1178,7 @@ void ScExportTest::testMiscRowHeightExport() namespace { -void setAttribute( ScFieldEditEngine& rEE, sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, sal_uInt16 nType, sal_uInt32 nColor = COL_BLACK ) +void setAttribute( ScFieldEditEngine& rEE, sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, sal_uInt16 nType, Color nColor = COL_BLACK ) { ESelection aSel; aSel.nStartPara = aSel.nEndPara = nPara; @@ -1438,7 +1438,7 @@ void ScExportTest::testRichTextExportODS() return false; } - static bool isColor(const editeng::Section& rAttr, sal_uInt32 nColor) + static bool isColor(const editeng::Section& rAttr, Color nColor) { if (rAttr.maAttributes.empty()) return false; diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 38a3950df7fc..be17f2ad3f50 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -989,7 +989,7 @@ void ScFiltersTest::testBorderODS() CPPUNIT_ASSERT(pRight); CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::SOLID, pRight->GetBorderLineStyle()); CPPUNIT_ASSERT_EQUAL(5L, pRight->GetWidth()); - CPPUNIT_ASSERT_EQUAL(Color(COL_BLUE), pRight->GetColor()); + CPPUNIT_ASSERT_EQUAL(COL_BLUE, pRight->GetColor()); xDocSh->DoClose(); } @@ -2179,7 +2179,7 @@ void ScFiltersTest::testCondFormatThemeColorXLSX() CPPUNIT_ASSERT_EQUAL(Color(157, 195, 230), pDataBarFormatData->maPositiveColor); CPPUNIT_ASSERT(pDataBarFormatData->mpNegativeColor.get()); - CPPUNIT_ASSERT_EQUAL(Color(COL_LIGHTRED), *pDataBarFormatData->mpNegativeColor.get()); + CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, *pDataBarFormatData->mpNegativeColor.get()); CPPUNIT_ASSERT_EQUAL(size_t(1), rDoc.GetCondFormList(1)->size()); pFormat = rDoc.GetCondFormat(0, 0, 1); @@ -3563,17 +3563,17 @@ void ScFiltersTest::testBackgroundColorStandardXLSXML() const std::vector<Check> aChecks = { - { OUString("Background Color"), Color(COL_BLACK), Color(COL_TRANSPARENT) }, - { OUString("Dark Red"), Color(COL_WHITE), Color(192, 0, 0) }, - { OUString("Red"), Color(COL_WHITE), Color(255, 0, 0) }, - { OUString("Orange"), Color(COL_WHITE), Color(255, 192, 0) }, - { OUString("Yellow"), Color(COL_WHITE), Color(255, 255, 0) }, - { OUString("Light Green"), Color(COL_WHITE), Color(146, 208, 80) }, - { OUString("Green"), Color(COL_WHITE), Color( 0, 176, 80) }, - { OUString("Light Blue"), Color(COL_WHITE), Color( 0, 176, 240) }, - { OUString("Blue"), Color(COL_WHITE), Color( 0, 112, 192) }, - { OUString("Dark Blue"), Color(COL_WHITE), Color( 0, 32, 96) }, - { OUString("Purple"), Color(COL_WHITE), Color(112, 48, 160) }, + { OUString("Background Color"), COL_BLACK, COL_TRANSPARENT }, + { OUString("Dark Red"), COL_WHITE, Color(192, 0, 0) }, + { OUString("Red"), COL_WHITE, Color(255, 0, 0) }, + { OUString("Orange"), COL_WHITE, Color(255, 192, 0) }, + { OUString("Yellow"), COL_WHITE, Color(255, 255, 0) }, + { OUString("Light Green"), COL_WHITE, Color(146, 208, 80) }, + { OUString("Green"), COL_WHITE, Color( 0, 176, 80) }, + { OUString("Light Blue"), COL_WHITE, Color( 0, 176, 240) }, + { OUString("Blue"), COL_WHITE, Color( 0, 112, 192) }, + { OUString("Dark Blue"), COL_WHITE, Color( 0, 32, 96) }, + { OUString("Purple"), COL_WHITE, Color(112, 48, 160) }, }; for (size_t nRow = 0; nRow < aChecks.size(); ++nRow) @@ -3728,7 +3728,7 @@ void ScFiltersTest::testBorderDirectionsXLSXML() return false; } - if (Color(COL_BLACK) != pLine->GetColor()) + if (COL_BLACK != pLine->GetColor()) { std::cout << "Border color was expected to be black, but is not." << std::endl; return false; diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index ba41d58fef4d..3cc8c729bc1c 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -354,7 +354,7 @@ void ScPatternAttr::GetFont( // determine effective font color - if ( ( aColor.GetColor() == COL_AUTO && eAutoMode != SC_AUTOCOL_RAW ) || + if ( ( aColor == COL_AUTO && eAutoMode != SC_AUTOCOL_RAW ) || eAutoMode == SC_AUTOCOL_IGNOREFONT || eAutoMode == SC_AUTOCOL_IGNOREALL ) { if ( eAutoMode == SC_AUTOCOL_BLACK ) @@ -704,7 +704,7 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r // put items into EditEngine ItemSet - if ( aColorItem.GetValue().GetColor() == COL_AUTO ) + if ( aColorItem.GetValue() == COL_AUTO ) { // When cell attributes are converted to EditEngine paragraph attributes, // don't create a hard item for automatic color, because that would be converted @@ -1081,7 +1081,7 @@ bool ScPatternAttr::IsVisible() const eState = rSet.GetItemState( ATTR_BACKGROUND, true, &pItem ); if ( eState == SfxItemState::SET ) - if ( static_cast<const SvxBrushItem*>(pItem)->GetColor().GetColor() != COL_TRANSPARENT ) + if ( static_cast<const SvxBrushItem*>(pItem)->GetColor() != COL_TRANSPARENT ) return true; eState = rSet.GetItemState( ATTR_BORDER, true, &pItem ); diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx index 0331f7a896d0..f291105c04fe 100644 --- a/sc/source/core/tool/appoptio.cxx +++ b/sc/source/core/tool/appoptio.cxx @@ -72,10 +72,10 @@ void ScAppOptions::SetDefaults() pLRUList[4] = SC_OPCODE_IF; nLRUFuncCount = 5; - nTrackContentColor = COL_TRANSPARENT; - nTrackInsertColor = COL_TRANSPARENT; - nTrackDeleteColor = COL_TRANSPARENT; - nTrackMoveColor = COL_TRANSPARENT; + nTrackContentColor = sal_uInt32(COL_TRANSPARENT); + nTrackInsertColor = sal_uInt32(COL_TRANSPARENT); + nTrackDeleteColor = sal_uInt32(COL_TRANSPARENT); + nTrackMoveColor = sal_uInt32(COL_TRANSPARENT); eLinkMode = LM_ON_DEMAND; nDefaultObjectSizeWidth = 8000; diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index 483c3045f853..6d4d4bf05789 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -129,7 +129,7 @@ void ScViewOptions::SetDefaults() aModeArr[VOBJ_TYPE_CHART] = VOBJ_MODE_SHOW; aModeArr[VOBJ_TYPE_DRAW ] = VOBJ_MODE_SHOW; - aGridCol = Color( SC_STD_GRIDCOLOR ); + aGridCol = SC_STD_GRIDCOLOR; aGridColName = ScGlobal::GetRscString( STR_GRIDCOLOR ); aGridOpt.SetDefaults(); diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 3da3b4d32536..d9f7e3806e28 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -497,7 +497,7 @@ XclExpStringRef lclCreateFormattedString( // add escapement aFont.SetEscapement( nEsc ); // modify automatic font color for hyperlinks - if( bIsHyperlink && aItemSet.Get( ATTR_FONT_COLOR ).GetValue().GetColor() == COL_AUTO) + if( bIsHyperlink && aItemSet.Get( ATTR_FONT_COLOR ).GetValue() == COL_AUTO) aFont.SetColor( COL_LIGHTBLUE ); // insert font into buffer diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 2262a448d1ec..a8f7d6b1bcfc 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -332,7 +332,7 @@ XclExpPaletteImpl::XclExpPaletteImpl( const XclDefaultPalette& rDefPal ) : sal_uInt32 XclExpPaletteImpl::InsertColor( const Color& rColor, XclExpColorType eType, sal_uInt16 nAutoDefault ) { - if( rColor.GetColor() == COL_AUTO ) + if( rColor == COL_AUTO ) return GetColorIdFromIndex( nAutoDefault ); sal_uInt32 nFoundIdx = 0; diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx index 38146f00a1ad..f0c7b503a172 100644 --- a/sc/source/filter/excel/xeview.cxx +++ b/sc/source/filter/excel/xeview.cxx @@ -362,7 +362,7 @@ XclExpTabViewSettings::XclExpTabViewSettings( const XclExpRoot& rRoot, SCTAB nSc // grid color const Color& rGridColor = rTabSett.maGridColor; - maData.mbDefGridColor = rGridColor.GetColor() == COL_AUTO; + maData.mbDefGridColor = rGridColor == COL_AUTO; if( !maData.mbDefGridColor ) { if( GetBiff() == EXC_BIFF8 ) diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 5e5b1d12f490..947fc2598ae3 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -715,7 +715,7 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa XOBitmap aXOBitmap( aBitmap ); aXOBitmap.Bitmap2Array(); - if( aXOBitmap.GetBackgroundColor().GetColor() == COL_BLACK ) + if( aXOBitmap.GetBackgroundColor() == COL_BLACK ) ::std::swap( aPattColor, aBackColor ); aXOBitmap.SetPixelColor( aPattColor ); aXOBitmap.SetBackgroundColor( aBackColor ); diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index c31dd38517a8..abb85f513d63 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -1136,7 +1136,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) Color aColor = rColorItem.GetValue(); // always export automatic text color as black - if ( aColor.GetColor() == COL_AUTO ) + if ( aColor == COL_AUTO ) aColor = COL_BLACK; aStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_color). diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index c149fd1b2bad..e02f32f8c7bd 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1102,7 +1102,7 @@ const SvxFieldData* toXMLPropertyStates( if (!static_cast<const SvxColorItem*>(p)->QueryValue(aAny, pEntry->mnFlag)) continue; - sal_uInt32 nColor = 0; + ::Color nColor; if ( aAny >>= nColor ) { sal_Int32 nIndexColor = ( nColor == COL_AUTO ) ? xMapper->GetEntryIndex( @@ -4455,7 +4455,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab) else { OUStringBuffer aBuffer; - ::sax::Converter::convertColor(aBuffer, COL_LIGHTRED); + ::sax::Converter::convertColor(aBuffer, sal_Int32(COL_LIGHTRED)); AddAttribute(XML_NAMESPACE_CALC_EXT, XML_NEGATIVE_COLOR, aBuffer.makeStringAndClear()); } } diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx index 4ba1d4f935cd..9ff271df2863 100644 --- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx @@ -213,12 +213,12 @@ void SAL_CALL ScAccessibleContextBase::grabFocus( ) sal_Int32 SAL_CALL ScAccessibleContextBase::getForeground( ) { - return COL_BLACK; + return sal_Int32(COL_BLACK); } sal_Int32 SAL_CALL ScAccessibleContextBase::getBackground( ) { - return COL_WHITE; + return sal_Int32(COL_WHITE); } //===== XAccessibleContext ================================================== diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 2aed5a341243..cf062dd513dd 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -2437,7 +2437,7 @@ css::uno::Sequence< css::uno::Any > sal_Int32 SAL_CALL ScAccessibleDocument::getForeground( ) { - return COL_BLACK; + return sal_Int32(COL_BLACK); } sal_Int32 SAL_CALL ScAccessibleDocument::getBackground( ) diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index edaa96b58b57..0111d548bc69 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -994,7 +994,7 @@ void SAL_CALL ScAccessibleSpreadsheet::grabFocus( ) sal_Int32 SAL_CALL ScAccessibleSpreadsheet::getForeground( ) { - return COL_BLACK; + return sal_Int32(COL_BLACK); } sal_Int32 SAL_CALL ScAccessibleSpreadsheet::getBackground( ) diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index 129cf1df71ce..80d4daf69a7a 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -139,7 +139,7 @@ void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font lcl_SetFontProperties( rCTLFont, *pCTLFontItem, *pCTLWeightItem, *pCTLPostureItem ); Color aColor( pColorItem->GetValue() ); - if( aColor.GetColor() == COL_TRANSPARENT ) + if( aColor == COL_TRANSPARENT ) aColor = GetSettings().GetStyleSettings().GetWindowTextColor(); #define SETONALLFONTS( MethodName, Value ) \ diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index b035b5e35412..ab93cb559397 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -215,7 +215,7 @@ ScScenarioWindow::ScScenarioWindow( vcl::Window* pParent, const OUString& aQH_Li aLbScenario->SetQuickHelpText(aQH_List); aEdComment->SetQuickHelpText(aQH_Comment); - aEdComment->SetBackground( Color(COL_LIGHTGRAY) ); + aEdComment->SetBackground( COL_LIGHTGRAY ); SfxViewFrame* pViewFrm = SfxViewFrame::Current(); if (pViewFrm) diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 7a4b999cf969..39d420f7f827 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -309,7 +309,7 @@ void ScTpContentOptions::InitGridOpt() OUString aName; Color aCol = pLocalOptions->GetGridColor( &aName ); - if (aName.trim().isEmpty() && aCol == Color(SC_STD_GRIDCOLOR)) + if (aName.trim().isEmpty() && aCol == SC_STD_GRIDCOLOR) aName = ScGlobal::GetRscString(STR_GRIDCOLOR); pColorLB->SelectEntry(std::make_pair(aCol, aName)); diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index 9b473c7ab909..b3078655ffc6 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -1211,7 +1211,7 @@ void SAL_CALL ScDataBarFormatObj::setPropertyValue( break; case DataBar_Color: { - sal_Int32 nColor = COL_AUTO; + Color nColor = COL_AUTO; if (aValue >>= nColor) { getCoreObject()->GetDataBarData()->maPositiveColor = nColor; @@ -1220,7 +1220,7 @@ void SAL_CALL ScDataBarFormatObj::setPropertyValue( break; case AxisColor: { - sal_Int32 nAxisColor = COL_AUTO; + Color nAxisColor = COL_AUTO; if (aValue >>= nAxisColor) { getCoreObject()->GetDataBarData()->maAxisColor = nAxisColor; @@ -1229,7 +1229,7 @@ void SAL_CALL ScDataBarFormatObj::setPropertyValue( break; case NegativeColor: { - sal_Int32 nNegativeColor = COL_AUTO; + Color nNegativeColor = COL_AUTO; if (!(aValue >>= nNegativeColor) || !getCoreObject()->GetDataBarData()->mbNeg) throw lang::IllegalArgumentException(); diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index c8190c608992..81f9bf233f01 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -535,7 +535,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig(); Color aGridColor( rColorCfg.GetColorValue( svtools::CALCGRID, false ).nColor ); - if ( aGridColor.GetColor() == COL_TRANSPARENT ) + if ( aGridColor == COL_TRANSPARENT ) { // use view options' grid color only if color config has "automatic" color aGridColor = rOpts.GetGridColor(); diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 4c42ecad42fc..52c6f456d97b 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -3077,7 +3077,7 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const if( pOptions ) { const Color& rGridColor = pOptions->GetGridColor(); - if( rGridColor.GetColor() != SC_STD_GRIDCOLOR ) + if( rGridColor != SC_STD_GRIDCOLOR ) rTabSett.maGridColor = rGridColor; } rTabSett.mbShowGrid = pViewTab->bShowGrid; @@ -3238,7 +3238,7 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt ) if( pOptions ) { Color aGridColor( rTabSett.maGridColor ); - if( aGridColor.GetColor() == COL_AUTO ) + if( aGridColor == COL_AUTO ) aGridColor = SC_STD_GRIDCOLOR; pOptions->SetGridColor( aGridColor, EMPTY_OUSTRING ); } @@ -3459,7 +3459,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 ) + if( aColor == COL_AUTO ) aColor = SC_STD_GRIDCOLOR; pOptions->SetGridColor(aColor, OUString()); } |