summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-26 13:30:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-27 11:28:29 +0100
commitc98d3303027bd8bf8e0881b61918710ac479864c (patch)
treee6843dfd93352f134207cbc482451e8f17266bc2 /sc/source
parent44a485c2baaf5bab81748f992915459bdaa58615 (diff)
replace Color(COL_*) with COL_*
using git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)" | xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g" and then some manual fixup where the resulting expression no longer compiled Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4 Reviewed-on: https://gerrit.libreoffice.org/50372 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/docpool.cxx4
-rw-r--r--sc/source/core/data/documen3.cxx2
-rw-r--r--sc/source/core/data/global.cxx6
-rw-r--r--sc/source/filter/excel/excrecds.cxx2
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx2
-rw-r--r--sc/source/filter/excel/xistyle.cxx2
-rw-r--r--sc/source/filter/inc/xlview.hxx2
-rw-r--r--sc/source/filter/lotus/lotattr.cxx18
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx6
-rw-r--r--sc/source/ui/condformat/colorformat.cxx6
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx4
-rw-r--r--sc/source/ui/dbgui/csvcontrol.cxx4
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx2
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx2
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx2
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx8
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/tabbgcolordlg.cxx6
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx2
-rw-r--r--sc/source/ui/view/cellsh2.cxx2
-rw-r--r--sc/source/ui/view/cellsh3.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx6
-rw-r--r--sc/source/ui/view/gridwin4.cxx4
-rw-r--r--sc/source/ui/view/output.cxx6
-rw-r--r--sc/source/ui/view/tabsplit.cxx8
28 files changed, 60 insertions, 60 deletions
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 3387d51dc380..7bcfa8e603d8 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -216,7 +216,7 @@ ScDocumentPool::ScDocumentPool()
rPoolDefaults[ ATTR_FONT_CROSSEDOUT - ATTR_STARTINDEX ] = new SvxCrossedOutItem( STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT );
rPoolDefaults[ ATTR_FONT_CONTOUR - ATTR_STARTINDEX ] = new SvxContourItem( false, ATTR_FONT_CONTOUR );
rPoolDefaults[ ATTR_FONT_SHADOWED - ATTR_STARTINDEX ] = new SvxShadowedItem( false, ATTR_FONT_SHADOWED );
- rPoolDefaults[ ATTR_FONT_COLOR - ATTR_STARTINDEX ] = new SvxColorItem( Color(COL_AUTO), ATTR_FONT_COLOR );
+ rPoolDefaults[ ATTR_FONT_COLOR - ATTR_STARTINDEX ] = new SvxColorItem( COL_AUTO, ATTR_FONT_COLOR );
rPoolDefaults[ ATTR_FONT_LANGUAGE - ATTR_STARTINDEX ] = new SvxLanguageItem( LANGUAGE_DONTKNOW, ATTR_FONT_LANGUAGE );
rPoolDefaults[ ATTR_CJK_FONT - ATTR_STARTINDEX ] = pCjkFont;
rPoolDefaults[ ATTR_CJK_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_CJK_FONT_HEIGHT );
@@ -258,7 +258,7 @@ ScDocumentPool::ScDocumentPool()
rPoolDefaults[ ATTR_MERGE_FLAG - ATTR_STARTINDEX ] = new ScMergeFlagAttr;
rPoolDefaults[ ATTR_VALUE_FORMAT - ATTR_STARTINDEX ] = new SfxUInt32Item( ATTR_VALUE_FORMAT, 0 );
rPoolDefaults[ ATTR_LANGUAGE_FORMAT - ATTR_STARTINDEX ] = new SvxLanguageItem( ScGlobal::eLnge, ATTR_LANGUAGE_FORMAT );
- rPoolDefaults[ ATTR_BACKGROUND - ATTR_STARTINDEX ] = new SvxBrushItem( Color(COL_TRANSPARENT), ATTR_BACKGROUND );
+ rPoolDefaults[ ATTR_BACKGROUND - ATTR_STARTINDEX ] = new SvxBrushItem( COL_TRANSPARENT, ATTR_BACKGROUND );
rPoolDefaults[ ATTR_PROTECTION - ATTR_STARTINDEX ] = new ScProtectionAttr;
rPoolDefaults[ ATTR_BORDER - ATTR_STARTINDEX ] = new SvxBoxItem( ATTR_BORDER );
rPoolDefaults[ ATTR_BORDER_INNER - ATTR_STARTINDEX ] = pGlobalBorderInnerAttr;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 8f37ada3dcbb..b4f300b352b3 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -451,7 +451,7 @@ Color ScDocument::GetTabBgColor( SCTAB nTab ) const
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetTabBgColor();
- return Color(COL_AUTO);
+ return COL_AUTO;
}
void ScDocument::SetTabBgColor( SCTAB nTab, const Color& rColor )
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index d3777cfe7135..b6924ae6e198 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -464,10 +464,10 @@ void ScGlobal::Init()
pRscString = new std::map<const char*, OUString>;
- pEmptyBrushItem = new SvxBrushItem( Color( COL_TRANSPARENT ), ATTR_BACKGROUND );
+ pEmptyBrushItem = new SvxBrushItem( COL_TRANSPARENT, ATTR_BACKGROUND );
pButtonBrushItem = new SvxBrushItem( Color(), ATTR_BACKGROUND );
- pEmbeddedBrushItem = new SvxBrushItem( Color( COL_LIGHTCYAN ), ATTR_BACKGROUND );
- pProtectedBrushItem = new SvxBrushItem( Color( COL_LIGHTGRAY ), ATTR_BACKGROUND );
+ pEmbeddedBrushItem = new SvxBrushItem( COL_LIGHTCYAN, ATTR_BACKGROUND );
+ pProtectedBrushItem = new SvxBrushItem( COL_LIGHTGRAY, ATTR_BACKGROUND );
InitPPT();
//ScCompiler::InitSymbolsNative();
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 4dab73a20805..ba8904885925 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -425,7 +425,7 @@ void XclExpXmlSheetPr::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_outlinePr
- if (maTabColor != Color(COL_AUTO))
+ if (maTabColor != COL_AUTO)
rWorksheet->singleElement(
XML_tabColor, XML_rgb, XclXmlUtils::ToOString(maTabColor).getStr(), FSEND);
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 45553c6b2110..3da3b4d32536 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -498,7 +498,7 @@ XclExpStringRef lclCreateFormattedString(
aFont.SetEscapement( nEsc );
// modify automatic font color for hyperlinks
if( bIsHyperlink && aItemSet.Get( ATTR_FONT_COLOR ).GetValue().GetColor() == COL_AUTO)
- aFont.SetColor( Color( COL_LIGHTBLUE ) );
+ aFont.SetColor( COL_LIGHTBLUE );
// insert font into buffer
sal_uInt16 nFontIdx = rFontBuffer.Insert( aFont, EXC_COLOR_CELLTEXT );
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 466ad9a395bd..2262a448d1ec 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -327,7 +327,7 @@ XclExpPaletteImpl::XclExpPaletteImpl( const XclDefaultPalette& rDefPal ) :
for( sal_uInt16 nIdx = 0; nIdx < nCount; ++nIdx )
maPalette.emplace_back( mrDefPal.GetDefColor( GetXclIndex( nIdx ) ) );
- InsertColor( Color( COL_BLACK ), EXC_COLOR_CELLTEXT );
+ InsertColor( COL_BLACK, EXC_COLOR_CELLTEXT );
}
sal_uInt32 XclExpPaletteImpl::InsertColor( const Color& rColor, XclExpColorType eType, sal_uInt16 nAutoDefault )
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 8b54b6241afd..1187deb0c658 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1070,7 +1070,7 @@ void XclImpCellArea::FillToItemSet( SfxItemSet& rItemSet, const XclImpPalette& r
// do not use IsTransparent() - old Calc filter writes tranparency with different color indexes
if( mnPattern == EXC_PATT_NONE )
{
- aBrushItem.SetColor( Color( COL_TRANSPARENT ) );
+ aBrushItem.SetColor( COL_TRANSPARENT );
}
else
{
diff --git a/sc/source/filter/inc/xlview.hxx b/sc/source/filter/inc/xlview.hxx
index a742bb678427..824f9a783269 100644
--- a/sc/source/filter/inc/xlview.hxx
+++ b/sc/source/filter/inc/xlview.hxx
@@ -141,7 +141,7 @@ struct XclTabViewData
bool mbShowZeros; /// true = Show zero value zells.
bool mbShowOutline; /// true = Show outlines.
Color maTabBgColor; /// Tab Color default = (COL_AUTO )
- bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO); };
+ bool IsDefaultTabBgColor() const { return maTabBgColor == COL_AUTO; };
sal_uInt32 mnTabBgColorId; /// palette color id
explicit XclTabViewData();
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index e303b435abbe..6883178e43eb 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -51,14 +51,14 @@ LotAttrCache::LotAttrCache (LOTUS_ROOT* pLotRoot)
pDocPool = mpLotusRoot->pDoc->GetPool();
pColTab = new Color [ 8 ];
- pColTab[ 0 ] = Color( COL_WHITE );
- pColTab[ 1 ] = Color( COL_LIGHTBLUE );
- pColTab[ 2 ] = Color( COL_LIGHTGREEN );
- pColTab[ 3 ] = Color( COL_LIGHTCYAN );
- pColTab[ 4 ] = Color( COL_LIGHTRED );
- pColTab[ 5 ] = Color( COL_LIGHTMAGENTA );
- pColTab[ 6 ] = Color( COL_YELLOW );
- pColTab[ 7 ] = Color( COL_BLACK );
+ pColTab[ 0 ] = COL_WHITE;
+ pColTab[ 1 ] = COL_LIGHTBLUE;
+ pColTab[ 2 ] = COL_LIGHTGREEN;
+ pColTab[ 3 ] = COL_LIGHTCYAN;
+ pColTab[ 4 ] = COL_LIGHTRED;
+ pColTab[ 5 ] = COL_LIGHTMAGENTA;
+ pColTab[ 6 ] = COL_YELLOW;
+ pColTab[ 7 ] = COL_BLACK;
ppColorItems[ 0 ] = new SvxColorItem( GetColor( 1 ), ATTR_FONT_COLOR ); // 1
ppColorItems[ 1 ] = new SvxColorItem( GetColor( 2 ), ATTR_FONT_COLOR );
@@ -67,7 +67,7 @@ LotAttrCache::LotAttrCache (LOTUS_ROOT* pLotRoot)
ppColorItems[ 4 ] = new SvxColorItem( GetColor( 5 ), ATTR_FONT_COLOR );
ppColorItems[ 5 ] = new SvxColorItem( GetColor( 6 ), ATTR_FONT_COLOR ); // 6
- pWhite = new SvxColorItem( Color( COL_WHITE ), ATTR_FONT_COLOR );
+ pWhite = new SvxColorItem( COL_WHITE, ATTR_FONT_COLOR );
}
LotAttrCache::~LotAttrCache()
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index dc5621c08ca5..04d5c773d650 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1887,7 +1887,7 @@ void Fill::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const
SvxBrushItem aBrushItem( ATTR_BACKGROUND );
if ( maApiData.mbTransparent )
{
- aBrushItem.SetColor( ::Color( COL_TRANSPARENT ) );
+ aBrushItem.SetColor( ::COL_TRANSPARENT );
}
else
{
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 9c09a1ee0eb0..c149fd1b2bad 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4455,7 +4455,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
else
{
OUStringBuffer aBuffer;
- ::sax::Converter::convertColor(aBuffer, Color(COL_LIGHTRED).GetColor());
+ ::sax::Converter::convertColor(aBuffer, COL_LIGHTRED);
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_NEGATIVE_COLOR, aBuffer.makeStringAndClear());
}
}
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index b0e7c6d3d8c0..6b8980ae2905 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -432,11 +432,11 @@ void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext)
pVDev->DrawGradient(aRect, aGradient);
// draw slider
- pVDev->SetLineColor(Color(COL_WHITE));
+ pVDev->SetLineColor(COL_WHITE);
pVDev->DrawRect(aSecondLine);
pVDev->DrawRect(aRight);
- pVDev->SetLineColor(Color(COL_GRAY));
+ pVDev->SetLineColor(COL_GRAY);
pVDev->DrawRect(aFirstLine);
pVDev->DrawRect(aLeft);
@@ -446,7 +446,7 @@ void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext)
aSnappingPointIter != mpImpl->maSnappingPointOffsets.end();
++aSnappingPointIter)
{
- pVDev->SetLineColor(Color(COL_GRAY));
+ pVDev->SetLineColor(COL_GRAY);
tools::Rectangle aSnapping(aRect);
aSnapping.SetBottom( aSlider.Top() );
aSnapping.SetTop( aSnapping.Bottom() - nSnappingHeight );
diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx
index b86d2c3d1bee..290bcbad4d40 100644
--- a/sc/source/ui/condformat/colorformat.cxx
+++ b/sc/source/ui/condformat/colorformat.cxx
@@ -151,9 +151,9 @@ void ScDataBarSettingsDlg::dispose()
void ScDataBarSettingsDlg::Init()
{
- mpLbNeg->SelectEntry(Color(COL_LIGHTRED));
- mpLbAxisCol->SelectEntry(Color(COL_BLACK));
- mpLbPos->SelectEntry(Color(COL_LIGHTBLUE));
+ mpLbNeg->SelectEntry(COL_LIGHTRED);
+ mpLbAxisCol->SelectEntry(COL_BLACK);
+ mpLbPos->SelectEntry(COL_LIGHTBLUE);
mpBtnOk->SetClickHdl( LINK( this, ScDataBarSettingsDlg, OkBtnHdl ) );
mpLbTypeMin->SetSelectHdl( LINK( this, ScDataBarSettingsDlg, TypeSelectHdl ) );
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index ede6a4ead202..cbec1095517c 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -936,8 +936,8 @@ void ScColorScale3FrmtEntry::Init()
maLbEntryTypeMin->SetSelectHdl( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
maLbEntryTypeMax->SetSelectHdl( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
maLbEntryTypeMiddle->SetSelectHdl( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
- maLbColMin->SelectEntry(Color(COL_LIGHTRED));
- maLbColMiddle->SelectEntry(Color(COL_YELLOW));
+ maLbColMin->SelectEntry(COL_LIGHTRED);
+ maLbColMiddle->SelectEntry(COL_YELLOW);
maLbColMax->SelectEntry(Color(0x00CC00));
}
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index e79cdad8c076..ab43130cfbcb 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -259,8 +259,8 @@ sal_Int32 ScCsvControl::GetLineFromY( sal_Int32 nY ) const
void ScCsvControl::ImplInvertRect( OutputDevice& rOutDev, const tools::Rectangle& rRect )
{
rOutDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::RASTEROP );
- rOutDev.SetLineColor( Color( COL_BLACK ) );
- rOutDev.SetFillColor( Color( COL_BLACK ) );
+ rOutDev.SetLineColor( COL_BLACK );
+ rOutDev.SetFillColor( COL_BLACK );
rOutDev.SetRasterOp( RasterOp::Invert );
rOutDev.DrawRect( rRect );
rOutDev.Pop();
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index 6233c6795c03..9370a3decc89 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -145,7 +145,7 @@ void ScCsvRuler::InitColors()
maBackColor = rSett.GetFaceColor();
maActiveColor = rSett.GetWindowColor();
maTextColor = rSett.GetLabelTextColor();
- maSplitColor = maBackColor.IsDark() ? maTextColor : Color( COL_LIGHTRED );
+ maSplitColor = maBackColor.IsDark() ? maTextColor : COL_LIGHTRED;
InvalidateGfx();
}
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 77eb9ba6f610..5520213fbbbb 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -73,7 +73,7 @@ ScNewScenarioDlg::ScNewScenarioDlg( vcl::Window* pParent, const OUString& rName,
m_pBtnOk->SetClickHdl( LINK( this, ScNewScenarioDlg, OkHdl ) );
m_pCbShowFrame->SetClickHdl( LINK( this, ScNewScenarioDlg, EnableHdl ) );
- m_pLbColor->SelectEntry( Color( COL_LIGHTGRAY ) );
+ m_pLbColor->SelectEntry( COL_LIGHTGRAY );
m_pCbShowFrame->Check();
m_pCbTwoWay->Check();
m_pCbCopyAll->Check(false);
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index e3abe848a2c6..c5cad42309be 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -69,7 +69,7 @@ ScFunctionWin::ScFunctionWin(vcl::Window* pParent, const css::uno::Reference<css
nArgs=0;
aCatBox->SetDropDownLineCount(9);
vcl::Font aFont=aFiFuncDesc->GetFont();
- aFont.SetColor(Color(COL_BLACK));
+ aFont.SetColor(COL_BLACK);
aFiFuncDesc->SetFont(aFont);
aFiFuncDesc->SetBackground( GetBackground() ); //! never transparent?
aFiFuncDesc->set_height_request(5 * aFiFuncDesc->GetTextHeight());
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index c8b162a493e1..6a6f6f3e2684 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -477,12 +477,12 @@ SvTreeListEntry* ScAcceptChgDlg::AppendChangeAction(
if(!bFlag&& bUseColor&& pParent==nullptr)
{
pEntry = pTheView->InsertEntry(
- aBuf.makeStringAndClear() ,pNewData, Color(COL_LIGHTBLUE), pParent, TREELIST_APPEND);
+ aBuf.makeStringAndClear() ,pNewData, COL_LIGHTBLUE, pParent, TREELIST_APPEND);
}
else if(bFlag&& bUseColor&& pParent!=nullptr)
{
pEntry = pTheView->InsertEntry(
- aBuf.makeStringAndClear(), pNewData, Color(COL_GREEN), pParent, TREELIST_APPEND);
+ aBuf.makeStringAndClear(), pNewData, COL_GREEN, pParent, TREELIST_APPEND);
SvTreeListEntry* pExpEntry=pParent;
while(pExpEntry!=nullptr && !pTheView->IsExpanded(pExpEntry))
@@ -739,7 +739,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC
pEntry=pTheView->InsertEntry(aString,pNewData,pParent);
}
else
- pEntry=pTheView->InsertEntry(aString,pNewData,Color(COL_LIGHTBLUE),pParent);
+ pEntry=pTheView->InsertEntry(aString,pNewData,COL_LIGHTBLUE,pParent);
return pEntry;
}
@@ -1364,7 +1364,7 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvTreeListBox*, pTable, bool )
{
bTheTestFlag=InsertAcceptedORejected(pEntry);
}
- if(bTheTestFlag) pTheView->InsertEntry(aStrNoEntry,nullptr,Color(COL_GRAY),pEntry);
+ if(bTheTestFlag) pTheView->InsertEntry(aStrNoEntry,nullptr,COL_GRAY,pEntry);
}
}
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 54375859b6e6..0e7bc58ff38f 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -144,7 +144,7 @@ void ScMoveTableDlg::CheckNewTabName()
{
// New sheet name is empty. This is not good.
pFtWarn->Show();
- pFtWarn->SetControlBackground(Color(COL_YELLOW));
+ pFtWarn->SetControlBackground(COL_YELLOW);
pFtWarn->SetText(msStrTabNameEmpty);
pBtnOk->Disable();
return;
@@ -154,7 +154,7 @@ void ScMoveTableDlg::CheckNewTabName()
{
// New sheet name contains invalid characters.
pFtWarn->Show();
- pFtWarn->SetControlBackground(Color(COL_YELLOW));
+ pFtWarn->SetControlBackground(COL_YELLOW);
pFtWarn->SetText(msStrTabNameInvalid);
pBtnOk->Disable();
return;
@@ -176,7 +176,7 @@ void ScMoveTableDlg::CheckNewTabName()
if ( bFound )
{
pFtWarn->Show();
- pFtWarn->SetControlBackground(Color(COL_YELLOW));
+ pFtWarn->SetControlBackground(COL_YELLOW);
pFtWarn->SetText(msStrTabNameUsed);
pBtnOk->Disable();
}
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index 78fa4903941c..522596bbe002 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -115,7 +115,7 @@ void ScTabBgColorDlg::FillColorValueSets_Impl()
IMPL_LINK_NOARG(ScTabBgColorDlg, TabBgColorDblClickHdl_Impl, ValueSet*, void)
{
sal_uInt16 nItemId = m_pTabBgColorSet->GetSelectItemId();
- Color aColor = nItemId ? ( m_pTabBgColorSet->GetItemColor( nItemId ) ) : Color( COL_AUTO );
+ Color aColor = nItemId ? ( m_pTabBgColorSet->GetItemColor( nItemId ) ) : COL_AUTO;
m_aTabBgColor = aColor;
EndDialog( RET_OK );
}
@@ -124,7 +124,7 @@ IMPL_LINK_NOARG(ScTabBgColorDlg, TabBgColorDblClickHdl_Impl, ValueSet*, void)
IMPL_LINK_NOARG(ScTabBgColorDlg, TabBgColorOKHdl_Impl, Button*, void)
{
sal_uInt16 nItemId = m_pTabBgColorSet->GetSelectItemId();
- Color aColor = nItemId ? ( m_pTabBgColorSet->GetItemColor( nItemId ) ) : Color( COL_AUTO );
+ Color aColor = nItemId ? ( m_pTabBgColorSet->GetItemColor( nItemId ) ) : COL_AUTO;
m_aTabBgColor = aColor;
EndDialog( RET_OK );
}
@@ -165,7 +165,7 @@ void ScTabBgColorDlg::ScTabBgColorValueSet::KeyInput( const KeyEvent& rKEvt )
case KEY_RETURN:
{
sal_uInt16 nItemId = GetSelectItemId();
- const Color& aColor = nItemId ? ( GetItemColor( nItemId ) ) : Color( COL_AUTO );
+ const Color& aColor = nItemId ? ( GetItemColor( nItemId ) ) : COL_AUTO;
m_pTabBgColorDlg->m_aTabBgColor = aColor;
m_pTabBgColorDlg->EndDialog(RET_OK);
}
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index b0ffd8b125ab..b035b5e35412 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( Color(COL_LIGHTGRAY) );
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if (pViewFrm)
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 1c5c3acb485a..7ab26814d1a4 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -172,7 +172,7 @@ static bool lcl_GetSortParam( const ScViewData* pData, const ScSortParam& rSortP
((rSortParam.nCol1 == rSortParam.nCol2 && aExternalRange.aStart.Col() != aExternalRange.aEnd.Col()) ||
(rSortParam.nRow1 == rSortParam.nRow2 && aExternalRange.aStart.Row() != aExternalRange.aEnd.Row())))
{
- pTabViewShell->AddHighlightRange( aExternalRange,Color( COL_LIGHTBLUE ) );
+ pTabViewShell->AddHighlightRange( aExternalRange,COL_LIGHTBLUE );
ScRange rExtendRange( aExternalRange.aStart.Col(), aExternalRange.aStart.Row(), nTab, aExternalRange.aEnd.Col(), aExternalRange.aEnd.Row(), nTab );
OUString aExtendStr(rExtendRange.Format(ScRefFlags::VALID, pDoc));
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 3322d1701c56..6bb35605525d 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -491,7 +491,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, true, &pItem ) == SfxItemState::SET )
aArgComment = static_cast<const SfxStringItem*>(pItem)->GetValue();
- aColor = Color( COL_LIGHTGRAY ); // Default
+ aColor = COL_LIGHTGRAY; // Default
nFlags = ScScenarioFlags::NONE; // not TwoWay
pTabViewShell->MakeScenario( aArgName, aArgComment, aColor, nFlags );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index fb2ac988fd25..007522ec6324 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6222,7 +6222,7 @@ void ScGridWindow::UpdateDragRectOverlay()
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
sdr::overlay::OverlayType::Invert,
- Color(COL_BLACK),
+ COL_BLACK,
aRanges,
false);
@@ -6268,7 +6268,7 @@ void ScGridWindow::UpdateHeaderOverlay()
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
sdr::overlay::OverlayType::Invert,
- Color(COL_BLACK),
+ COL_BLACK,
aRanges,
false);
@@ -6335,7 +6335,7 @@ void ScGridWindow::UpdateShrinkOverlay()
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
sdr::overlay::OverlayType::Invert,
- Color(COL_BLACK),
+ COL_BLACK,
aRanges,
false);
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index b5b5a1215639..c8190c608992 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1350,7 +1350,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
{
// use single font and call DrawText directly
rDefPattern.GetFont( aFont, SC_AUTOCOL_BLACK );
- aFont.SetColor( Color( COL_LIGHTGRAY ) );
+ aFont.SetColor( COL_LIGHTGRAY );
// font size is set as needed
}
else
@@ -1360,7 +1360,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
pEditEng->SetRefMapMode(rRenderContext.GetMapMode());
SfxItemSet* pEditDefaults = new SfxItemSet( pEditEng->GetEmptyItemSet() );
rDefPattern.FillEditItemSet( pEditDefaults );
- pEditDefaults->Put( SvxColorItem( Color( COL_LIGHTGRAY ), EE_CHAR_COLOR ) );
+ pEditDefaults->Put( SvxColorItem( COL_LIGHTGRAY, EE_CHAR_COLOR ) );
pEditEng->SetDefaults( pEditDefaults );
}
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 9bf0c94d3b88..a5bf884681ad 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -295,9 +295,9 @@ void ScOutputData::SetSyntaxMode( bool bNewMode )
if (bNewMode)
if (!pValueColor)
{
- pValueColor = new Color( COL_LIGHTBLUE );
- pTextColor = new Color( COL_BLACK );
- pFormulaColor = new Color( COL_GREEN );
+ pValueColor = new Color(COL_LIGHTBLUE);
+ pTextColor = new Color(COL_BLACK);
+ pFormulaColor = new Color(COL_GREEN);
}
}
diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx
index 541cd47268b2..59ca3922ce8a 100644
--- a/sc/source/ui/view/tabsplit.cxx
+++ b/sc/source/ui/view/tabsplit.cxx
@@ -70,8 +70,8 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const tools::Rect
rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()));
// Draw handle
- rRenderContext.SetLineColor(Color(COL_BLACK));
- rRenderContext.SetFillColor(Color(COL_BLACK));
+ rRenderContext.SetLineColor(COL_BLACK);
+ rRenderContext.SetFillColor(COL_BLACK);
const long xc = rRect.Right() + rRect.Left();
const long h4 = rRect.GetHeight() / 4;
// First xc fraction is truncated, second one is rounded. This will draw a centered line
@@ -101,8 +101,8 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const tools::Rect
rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()));
// Draw handle
- rRenderContext.SetLineColor(Color(COL_BLACK));
- rRenderContext.SetFillColor(Color(COL_BLACK));
+ rRenderContext.SetLineColor(COL_BLACK);
+ rRenderContext.SetFillColor(COL_BLACK);
const long yc = rRect.Top() + rRect.Bottom();
const long w4 = rRect.GetWidth() / 4;
// First yc fraction is truncated, second one is rounded. This will draw a centered line