summaryrefslogtreecommitdiff
path: root/vcl
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 /vcl
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 'vcl')
-rw-r--r--vcl/inc/svdata.hxx2
-rw-r--r--vcl/qa/cppunit/svm/svmtest.cxx6
-rw-r--r--vcl/source/app/settings.cxx102
-rw-r--r--vcl/source/control/button.cxx26
-rw-r--r--vcl/source/control/combobox.cxx2
-rw-r--r--vcl/source/control/edit.cxx8
-rw-r--r--vcl/source/control/fixed.cxx2
-rw-r--r--vcl/source/control/fixedhyper.cxx2
-rw-r--r--vcl/source/control/group.cxx4
-rw-r--r--vcl/source/control/listbox.cxx2
-rw-r--r--vcl/source/control/spinfld.cxx2
-rw-r--r--vcl/source/control/tabctrl.cxx6
-rw-r--r--vcl/source/edit/texteng.cxx6
-rw-r--r--vcl/source/edit/textview.cxx2
-rw-r--r--vcl/source/edit/vclmedit.cxx6
-rw-r--r--vcl/source/filter/igif/gifread.cxx6
-rw-r--r--vcl/source/filter/ixbm/xbmread.cxx6
-rw-r--r--vcl/source/filter/ixpm/xpmread.cxx4
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx4
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx22
-rw-r--r--vcl/source/gdi/alpha.cxx2
-rw-r--r--vcl/source/gdi/bitmap.cxx44
-rw-r--r--vcl/source/gdi/bitmapex.cxx6
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx2
-rw-r--r--vcl/source/gdi/gdimtf.cxx12
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx240
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx10
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx2
-rw-r--r--vcl/source/gdi/print.cxx4
-rw-r--r--vcl/source/gdi/print2.cxx2
-rw-r--r--vcl/source/gdi/print3.cxx6
-rw-r--r--vcl/source/gdi/svmconverter.cxx2
-rw-r--r--vcl/source/gdi/virdev.cxx6
-rw-r--r--vcl/source/outdev/gradient.cxx4
-rw-r--r--vcl/source/outdev/hatch.cxx4
-rw-r--r--vcl/source/outdev/outdev.cxx4
-rw-r--r--vcl/source/outdev/outdevstate.cxx24
-rw-r--r--vcl/source/outdev/text.cxx36
-rw-r--r--vcl/source/outdev/textline.cxx12
-rw-r--r--vcl/source/outdev/transparent.cxx10
-rw-r--r--vcl/source/window/decoview.cxx20
-rw-r--r--vcl/source/window/menu.cxx4
-rw-r--r--vcl/source/window/menubarwindow.cxx4
-rw-r--r--vcl/source/window/paint.cxx4
-rw-r--r--vcl/source/window/printdlg.cxx4
-rw-r--r--vcl/source/window/toolbox.cxx12
-rw-r--r--vcl/source/window/toolbox2.cxx2
-rw-r--r--vcl/source/window/window.cxx8
-rw-r--r--vcl/source/window/window2.cxx8
-rw-r--r--vcl/unx/generic/gdi/salbmp.cxx8
-rw-r--r--vcl/unx/generic/window/salframe.cxx2
-rw-r--r--vcl/workben/outdevgrind.cxx26
-rw-r--r--vcl/workben/vcldemo.cxx22
53 files changed, 388 insertions, 388 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 7949de3c0861..a074b3ce937f 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -269,7 +269,7 @@ struct ImplSVNWFData
int mnMenuFormatBorderX = 0; // horizontal inner popup menu border
int mnMenuFormatBorderY = 0; // vertical inner popup menu border
int mnMenuSeparatorBorderX = 0; // gap at each side of separator
- ::Color maMenuBarHighlightTextColor = Color( COL_TRANSPARENT ); // override highlight text color
+ ::Color maMenuBarHighlightTextColor = COL_TRANSPARENT; // override highlight text color
// in menubar if not transparent
bool mbMenuBarDockingAreaCommonBG = false; // e.g. WinXP default theme
bool mbDockingAreaSeparateTB = false; // individual toolbar backgrounds
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index e18fa0a325a5..4633c64e6a11 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -920,9 +920,9 @@ void SvmTest::testMasks()
pAccess->Erase(COL_BLUE);
}
- pVirtualDev->DrawMask(Point(1, 2), aBitmap1, Color(COL_LIGHTRED));
- pVirtualDev->DrawMask(Point(1, 2), Size(3, 4), aBitmap2, Color(COL_LIGHTRED));
- pVirtualDev->DrawMask(Point(1, 2), Size(3, 4), Point(2, 1), Size(4, 3), aBitmap3, Color(COL_LIGHTRED), MetaActionType::MASKSCALEPART);
+ pVirtualDev->DrawMask(Point(1, 2), aBitmap1, COL_LIGHTRED);
+ pVirtualDev->DrawMask(Point(1, 2), Size(3, 4), aBitmap2, COL_LIGHTRED);
+ pVirtualDev->DrawMask(Point(1, 2), Size(3, 4), Point(2, 1), Size(4, 3), aBitmap3, COL_LIGHTRED, MetaActionType::MASKSCALEPART);
checkMasks(writeAndRead(aGDIMetaFile, "masks.svm"));
}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 20fa2c749fe5..f7c35931ee60 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -695,57 +695,57 @@ void ImplStyleData::SetStandardStyles()
maFloatTitleFont = aStdFont;
maTitleFont = aStdFont;
- maFaceColor = Color( COL_LIGHTGRAY );
+ maFaceColor = COL_LIGHTGRAY;
maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
- maLightColor = Color( COL_WHITE );
- maLightBorderColor = Color( COL_LIGHTGRAY );
- maShadowColor = Color( COL_GRAY );
- maDarkShadowColor = Color( COL_BLACK );
- maButtonTextColor = Color( COL_BLACK );
- maButtonRolloverTextColor = Color( COL_BLACK );
- maRadioCheckTextColor = Color( COL_BLACK );
- maGroupTextColor = Color( COL_BLACK );
- maLabelTextColor = Color( COL_BLACK );
- maWindowColor = Color( COL_WHITE );
- maWindowTextColor = Color( COL_BLACK );
- maDialogColor = Color( COL_LIGHTGRAY );
- maDialogTextColor = Color( COL_BLACK );
+ maLightColor = COL_WHITE;
+ maLightBorderColor = COL_LIGHTGRAY;
+ maShadowColor = COL_GRAY;
+ maDarkShadowColor = COL_BLACK;
+ maButtonTextColor = COL_BLACK;
+ maButtonRolloverTextColor = COL_BLACK;
+ maRadioCheckTextColor = COL_BLACK;
+ maGroupTextColor = COL_BLACK;
+ maLabelTextColor = COL_BLACK;
+ maWindowColor = COL_WHITE;
+ maWindowTextColor = COL_BLACK;
+ maDialogColor = COL_LIGHTGRAY;
+ maDialogTextColor = COL_BLACK;
maWorkspaceColor = Color( 0xDF, 0xDF, 0xDE );
- maMonoColor = Color( COL_BLACK );
- maFieldColor = Color( COL_WHITE );
- maFieldTextColor = Color( COL_BLACK );
- maFieldRolloverTextColor = Color( COL_BLACK );
- maActiveColor = Color( COL_BLUE );
- maActiveTextColor = Color( COL_WHITE );
- maActiveBorderColor = Color( COL_LIGHTGRAY );
- maDeactiveColor = Color( COL_GRAY );
- maDeactiveTextColor = Color( COL_LIGHTGRAY );
- maDeactiveBorderColor = Color( COL_LIGHTGRAY );
- maMenuColor = Color( COL_LIGHTGRAY );
- maMenuBarColor = Color( COL_LIGHTGRAY );
- maMenuBarRolloverColor = Color( COL_BLUE );
- maMenuBorderColor = Color( COL_LIGHTGRAY );
- maMenuTextColor = Color( COL_BLACK );
- maMenuBarTextColor = Color( COL_BLACK );
- maMenuBarRolloverTextColor = Color( COL_WHITE );
- maMenuBarHighlightTextColor = Color( COL_WHITE );
- maMenuHighlightColor = Color( COL_BLUE );
- maMenuHighlightTextColor = Color( COL_WHITE );
- maHighlightColor = Color( COL_BLUE );
- maHighlightTextColor = Color( COL_WHITE );
- maActiveTabColor = Color( COL_WHITE );
- maInactiveTabColor = Color( COL_LIGHTGRAY );
- maTabTextColor = Color( COL_BLACK );
- maTabRolloverTextColor = Color( COL_BLACK );
- maTabHighlightTextColor = Color( COL_BLACK );
- maDisableColor = Color( COL_GRAY );
+ maMonoColor = COL_BLACK;
+ maFieldColor = COL_WHITE;
+ maFieldTextColor = COL_BLACK;
+ maFieldRolloverTextColor = COL_BLACK;
+ maActiveColor = COL_BLUE;
+ maActiveTextColor = COL_WHITE;
+ maActiveBorderColor = COL_LIGHTGRAY;
+ maDeactiveColor = COL_GRAY;
+ maDeactiveTextColor = COL_LIGHTGRAY;
+ maDeactiveBorderColor = COL_LIGHTGRAY;
+ maMenuColor = COL_LIGHTGRAY;
+ maMenuBarColor = COL_LIGHTGRAY;
+ maMenuBarRolloverColor = COL_BLUE;
+ maMenuBorderColor = COL_LIGHTGRAY;
+ maMenuTextColor = COL_BLACK;
+ maMenuBarTextColor = COL_BLACK;
+ maMenuBarRolloverTextColor = COL_WHITE;
+ maMenuBarHighlightTextColor = COL_WHITE;
+ maMenuHighlightColor = COL_BLUE;
+ maMenuHighlightTextColor = COL_WHITE;
+ maHighlightColor = COL_BLUE;
+ maHighlightTextColor = COL_WHITE;
+ maActiveTabColor = COL_WHITE;
+ maInactiveTabColor = COL_LIGHTGRAY;
+ maTabTextColor = COL_BLACK;
+ maTabRolloverTextColor = COL_BLACK;
+ maTabHighlightTextColor = COL_BLACK;
+ maDisableColor = COL_GRAY;
maHelpColor = Color( 0xFF, 0xFF, 0xE0 );
- maHelpTextColor = Color( COL_BLACK );
- maLinkColor = Color( COL_BLUE );
+ maHelpTextColor = COL_BLACK;
+ maLinkColor = COL_BLUE;
maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
- maToolTextColor = Color( COL_BLACK );
- maHighlightLinkColor = Color( COL_LIGHTBLUE );
- maFontColor = Color( COL_BLACK );
+ maToolTextColor = COL_BLACK;
+ maHighlightLinkColor = COL_LIGHTBLUE;
+ maFontColor = COL_BLACK;
maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
mnBorderSize = 1;
@@ -2054,8 +2054,8 @@ void StyleSettings::Set3DColors( const Color& rColor )
mxData->maFaceColor = rColor;
mxData->maLightBorderColor = rColor;
mxData->maMenuBorderColor = rColor;
- mxData->maDarkShadowColor = Color( COL_BLACK );
- if ( rColor != Color( COL_LIGHTGRAY ) )
+ mxData->maDarkShadowColor = COL_BLACK;
+ if ( rColor != COL_LIGHTGRAY )
{
mxData->maLightColor = rColor;
mxData->maShadowColor = rColor;
@@ -2074,8 +2074,8 @@ void StyleSettings::Set3DColors( const Color& rColor )
else
{
mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
- mxData->maLightColor = Color( COL_WHITE );
- mxData->maShadowColor = Color( COL_GRAY );
+ mxData->maLightColor = COL_WHITE;
+ mxData->maShadowColor = COL_GRAY;
}
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index dc437fbca9d3..bffbd1e93b66 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -799,7 +799,7 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev,
pDev->SetLineColor();
if ( bBlack )
- pDev->SetFillColor( Color( COL_BLACK ) );
+ pDev->SetFillColor( COL_BLACK );
else
pDev->SetFillColor( rColor );
pDev->DrawRect( tools::Rectangle( nX+0, nY+0, nX+6, nY+0 ) );
@@ -833,7 +833,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
pDev->IntersectClipRegion( aInRect );
if ( nDrawFlags & DrawFlags::Mono )
- aColor = Color( COL_BLACK );
+ aColor = COL_BLACK;
else if( (nDrawFlags & DrawFlags::NoRollover) && IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire) )
aColor = rStyleSettings.GetButtonRolloverTextColor();
else if ( IsControlForeground() )
@@ -915,7 +915,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
aArrowColor = rStyleSettings.GetShadowColor();
else
{
- aArrowColor = Color( COL_LIGHTGREEN );
+ aArrowColor = COL_LIGHTGREEN;
bBlack = true;
}
}
@@ -1361,7 +1361,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetFont( aFont );
if ( nFlags & DrawFlags::Mono )
{
- pDev->SetTextColor( Color( COL_BLACK ) );
+ pDev->SetTextColor( COL_BLACK );
}
else
{
@@ -2439,7 +2439,7 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
pDev->SetMapMode();
pDev->SetFont( aFont );
if ( nFlags & DrawFlags::Mono )
- pDev->SetTextColor( Color( COL_BLACK ) );
+ pDev->SetTextColor( COL_BLACK );
else
pDev->SetTextColor( GetTextColor() );
pDev->SetTextFillColor();
@@ -2452,11 +2452,11 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
long nRadY = aImageSize.Height()/2;
pDev->SetLineColor();
- pDev->SetFillColor( Color( COL_BLACK ) );
+ pDev->SetFillColor( COL_BLACK );
pDev->DrawPolygon( tools::Polygon( aCenterPos, nRadX, nRadY ) );
nRadX -= aBrd1Size.Width();
nRadY -= aBrd1Size.Height();
- pDev->SetFillColor( Color( COL_WHITE ) );
+ pDev->SetFillColor( COL_WHITE );
pDev->DrawPolygon( tools::Polygon( aCenterPos, nRadX, nRadY ) );
if ( mbChecked )
{
@@ -2466,7 +2466,7 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
nRadX = 1;
if ( !nRadY )
nRadY = 1;
- pDev->SetFillColor( Color( COL_BLACK ) );
+ pDev->SetFillColor( COL_BLACK );
pDev->DrawPolygon( tools::Polygon( aCenterPos, nRadX, nRadY ) );
}
@@ -3297,7 +3297,7 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetMapMode();
pDev->SetFont( aFont );
if ( nFlags & DrawFlags::Mono )
- pDev->SetTextColor( Color( COL_BLACK ) );
+ pDev->SetTextColor( COL_BLACK );
else
pDev->SetTextColor( GetTextColor() );
pDev->SetTextFillColor();
@@ -3306,16 +3306,16 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
aImageSize, aStateRect, aMouseRect );
pDev->SetLineColor();
- pDev->SetFillColor( Color( COL_BLACK ) );
+ pDev->SetFillColor( COL_BLACK );
pDev->DrawRect( aStateRect );
aStateRect.AdjustLeft(aBrd1Size.Width() );
aStateRect.AdjustTop(aBrd1Size.Height() );
aStateRect.AdjustRight( -(aBrd1Size.Width()) );
aStateRect.AdjustBottom( -(aBrd1Size.Height()) );
if ( meState == TRISTATE_INDET )
- pDev->SetFillColor( Color( COL_LIGHTGRAY ) );
+ pDev->SetFillColor( COL_LIGHTGRAY );
else
- pDev->SetFillColor( Color( COL_WHITE ) );
+ pDev->SetFillColor( COL_WHITE );
pDev->DrawRect( aStateRect );
if ( meState == TRISTATE_TRUE )
@@ -3332,7 +3332,7 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
Point aTempPos12( aPos12 );
Point aTempPos21( aPos21 );
Point aTempPos22( aPos22 );
- pDev->SetLineColor( Color( COL_BLACK ) );
+ pDev->SetLineColor( COL_BLACK );
long nDX = 0;
for ( long i = 0; i < nCheckWidth; i++ )
{
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 2db27dfe8d7a..91f37289f8a2 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -1192,7 +1192,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, D
if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) )
{
- pDev->SetTextColor( Color( COL_BLACK ) );
+ pDev->SetTextColor( COL_BLACK );
}
else
{
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index a7cb9b6a4a34..42dd22296585 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -658,14 +658,14 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const tools::Rectangl
else if (nAttr & ExtTextInputAttr::GrayWaveline)
{
aFont.SetUnderline(LINESTYLE_WAVE);
- rRenderContext.SetTextLineColor(Color(COL_LIGHTGRAY));
+ rRenderContext.SetTextLineColor(COL_LIGHTGRAY);
}
rRenderContext.SetFont(aFont);
if (nAttr & ExtTextInputAttr::RedText)
- rRenderContext.SetTextColor(Color(COL_RED));
+ rRenderContext.SetTextColor(COL_RED);
else if (nAttr & ExtTextInputAttr::HalfToneText)
- rRenderContext.SetTextColor(Color(COL_LIGHTGRAY));
+ rRenderContext.SetTextColor(COL_LIGHTGRAY);
rRenderContext.SetClipRegion(aClip);
rRenderContext.DrawText(aPos, aText, 0, nLen);
@@ -1773,7 +1773,7 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawF
// Content
if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) )
- pDev->SetTextColor( Color( COL_BLACK ) );
+ pDev->SetTextColor( COL_BLACK );
else
{
if ( !(nFlags & DrawFlags::NoDisable ) && !IsEnabled() )
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index d61199e69aa7..4b212fa61912 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -226,7 +226,7 @@ void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetMapMode();
pDev->SetFont( aFont );
if ( nFlags & DrawFlags::Mono )
- pDev->SetTextColor( Color( COL_BLACK ) );
+ pDev->SetTextColor( COL_BLACK );
else
pDev->SetTextColor( GetTextColor() );
pDev->SetTextFillColor();
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 49ce74bb502e..9f794c93f341 100644
--- a/vcl/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -101,7 +101,7 @@ void FixedHyperlink::RequestHelp( const HelpEvent& rHEvt )
void FixedHyperlink::GetFocus()
{
- SetTextColor( Color( COL_LIGHTRED ) );
+ SetTextColor( COL_LIGHTRED );
Invalidate(tools::Rectangle(Point(), GetSizePixel()));
ShowFocus( tools::Rectangle( Point( 1, 1 ), Size( m_nTextLen + 4, GetSizePixel().Height() - 2 ) ) );
}
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index eec8f922bbf7..78f4fc90f122 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -139,7 +139,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
if( ! bLayout )
{
if ( nDrawFlags & DrawFlags::Mono )
- pDev->SetLineColor( Color( COL_BLACK ) );
+ pDev->SetLineColor( COL_BLACK );
else
pDev->SetLineColor( rStyleSettings.GetShadowColor() );
@@ -200,7 +200,7 @@ void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetMapMode();
pDev->SetFont( aFont );
if ( nFlags & DrawFlags::Mono )
- pDev->SetTextColor( Color( COL_BLACK ) );
+ pDev->SetTextColor( COL_BLACK );
else
pDev->SetTextColor( GetTextColor() );
pDev->SetTextFillColor();
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index 36ea3202c7d8..ef945a087659 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -360,7 +360,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr
// Content
if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) )
{
- pDev->SetTextColor( Color( COL_BLACK ) );
+ pDev->SetTextColor( COL_BLACK );
}
else
{
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 13eecee94abe..99e8703d6bfe 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -991,7 +991,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D
Color aButtonTextColor;
if ((nFlags & DrawFlags::Mono) || (eOutDevType == OUTDEV_PRINTER))
- aButtonTextColor = Color( COL_BLACK );
+ aButtonTextColor = COL_BLACK;
else
aButtonTextColor = GetSettings().GetStyleSettings().GetButtonTextColor();
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 7f216b4b6555..a4f06757c2ea 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -884,7 +884,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
}
else
{
- rRenderContext.SetLineColor(Color(COL_BLACK));
+ rRenderContext.SetLineColor(COL_BLACK);
rRenderContext.DrawPixel(Point(aRect.Left() + 1 - nOff2, aRect.Top() + 1 - nOff2));
rRenderContext.DrawPixel(Point(aRect.Right() + nOff2 - 2, aRect.Top() + 1 - nOff2));
if (bLeftBorder)
@@ -1124,7 +1124,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rect
if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
rRenderContext.SetLineColor(rStyleSettings.GetLightColor());
else
- rRenderContext.SetLineColor(Color(COL_BLACK));
+ rRenderContext.SetLineColor(COL_BLACK);
if (pCurItem && !pCurItem->maRect.IsEmpty())
{
aCurRect = pCurItem->maRect;
@@ -2514,7 +2514,7 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co
if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
rRenderContext.SetLineColor(rStyleSettings.GetLightColor());
else
- rRenderContext.SetLineColor(Color(COL_BLACK));
+ rRenderContext.SetLineColor(COL_BLACK);
if (pCurItem && !pCurItem->maRect.IsEmpty())
{
aCurRect = pCurItem->maRect;
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 3f49d65f5037..e7c0d6d2614d 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -1405,9 +1405,9 @@ void TextEngine::SeekCursor( sal_uInt32 nPara, sal_Int32 nPos, vcl::Font& rFont,
else if ( nAttr & ExtTextInputAttr::DashDotUnderline )
rFont.SetUnderline( LINESTYLE_DOTTED );
if ( nAttr & ExtTextInputAttr::RedText )
- rFont.SetColor( Color( COL_RED ) );
+ rFont.SetColor( COL_RED );
else if ( nAttr & ExtTextInputAttr::HalfToneText )
- rFont.SetColor( Color( COL_LIGHTGRAY ) );
+ rFont.SetColor( COL_LIGHTGRAY );
if ( nAttr & ExtTextInputAttr::Highlight )
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
@@ -1419,7 +1419,7 @@ void TextEngine::SeekCursor( sal_uInt32 nPara, sal_Int32 nPos, vcl::Font& rFont,
{
rFont.SetUnderline( LINESTYLE_WAVE );
// if( pOut )
-// pOut->SetTextLineColor( Color( COL_LIGHTGRAY ) );
+// pOut->SetTextLineColor( COL_LIGHTGRAY );
}
}
}
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 901110ab4b8c..6485a91a7039 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -278,7 +278,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartP
if (aColor != aFont.GetFillColor())
{
if (aFont.IsTransparent())
- aColor = Color(COL_TRANSPARENT);
+ aColor = COL_TRANSPARENT;
aFont.SetFillColor(aColor);
mpImpl->mpTextEngine->maFont = aFont;
}
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 40c2c0731f08..24b3ae713f30 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -967,7 +967,7 @@ void VclMultiLineEdit::ApplySettings(vcl::RenderContext& rRenderContext)
vcl::Font theFont = rRenderContext.GetFont();
theFont.SetColor(aTextColor);
if (IsPaintTransparent())
- theFont.SetFillColor(Color(COL_TRANSPARENT));
+ theFont.SetFillColor(COL_TRANSPARENT);
else
theFont.SetFillColor(IsControlBackground() ? GetControlBackground() : rStyleSettings.GetFieldColor());
@@ -1015,7 +1015,7 @@ void VclMultiLineEdit::ImplInitSettings(bool bBackground)
vcl::Font TheFont = GetFont();
TheFont.SetColor(aTextColor);
if (IsPaintTransparent())
- TheFont.SetFillColor(Color(COL_TRANSPARENT));
+ TheFont.SetFillColor(COL_TRANSPARENT);
else
TheFont.SetFillColor(IsControlBackground() ? GetControlBackground() : rStyleSettings.GetFieldColor());
pImpVclMEdit->GetTextWindow()->SetFont(TheFont);
@@ -1368,7 +1368,7 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size&
// contents
if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) )
- pDev->SetTextColor( Color( COL_BLACK ) );
+ pDev->SetTextColor( COL_BLACK );
else
{
if ( !(nFlags & DrawFlags::NoDisable ) && !IsEnabled() )
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 208e2f84c029..7b73b990233e 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -225,7 +225,7 @@ void GIFReader::CreateBitmaps(long nWidth, long nHeight, BitmapPalette* pPal,
if (!!aBmp8 && bWatchForBackgroundColor && aAnimation.Count())
aBmp8.Erase((*pPal)[nBackgroundColor].GetColor());
else
- aBmp8.Erase(Color(COL_WHITE));
+ aBmp8.Erase(COL_WHITE);
pAcc8 = Bitmap::ScopedWriteAccess(aBmp8);
bStatus = bool(pAcc8);
@@ -300,10 +300,10 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount )
// if possible accommodate some standard colours
if( nCount < 256 )
{
- (*pPal)[ 255UL ] = Color( COL_WHITE );
+ (*pPal)[ 255UL ] = Color(COL_WHITE);
if( nCount < 255 )
- (*pPal)[ 254UL ] = Color( COL_BLACK );
+ (*pPal)[ 254UL ] = Color(COL_BLACK);
}
}
}
diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx
index 916318f2a2af..a8e88e9c48ee 100644
--- a/vcl/source/filter/ixbm/xbmread.cxx
+++ b/vcl/source/filter/ixbm/xbmread.cxx
@@ -327,8 +327,8 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
if( pAcc1 )
{
- aWhite = pAcc1->GetBestMatchingColor( Color( COL_WHITE ) );
- aBlack = pAcc1->GetBestMatchingColor( Color( COL_BLACK ) );
+ aWhite = pAcc1->GetBestMatchingColor( Color(COL_WHITE) );
+ aBlack = pAcc1->GetBestMatchingColor( Color(COL_BLACK) );
bStatus = ParseData( &rIStm, aLine, eFormat );
}
else
@@ -344,7 +344,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
Bitmap aBlackBmp( Size( pAcc1->Width(), pAcc1->Height() ), 1 );
pAcc1.reset();
- aBlackBmp.Erase( Color( COL_BLACK ) );
+ aBlackBmp.Erase( COL_BLACK );
rGraphic = BitmapEx( aBlackBmp, aBmp1 );
eReadState = XBMREAD_OK;
}
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index b7f01276bbdf..1d51fa0d6752 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -298,8 +298,8 @@ bool XPMReader::ImplGetScanLine( sal_uLong nY )
{
if ( mpMaskAcc )
{
- aWhite = mpMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) );
- aBlack = mpMaskAcc->GetBestMatchingColor( Color( COL_BLACK ) );
+ aWhite = mpMaskAcc->GetBestMatchingColor( Color(COL_WHITE) );
+ aBlack = mpMaskAcc->GetBestMatchingColor( Color(COL_BLACK) );
}
if ( mnStringSize != ( mnWidth * mnCpp ))
bStatus = false;
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 46c8ef365071..82d1279c1ba9 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -242,7 +242,7 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines)
if (!mnLastLines)
{
mpIncompleteAlpha.reset(new Bitmap(aSizePixel, 1));
- mpIncompleteAlpha->Erase(Color(COL_WHITE));
+ mpIncompleteAlpha->Erase(COL_WHITE);
}
if (nLines && (nLines < aSizePixel.Height()))
@@ -253,7 +253,7 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines)
{
{
Bitmap::ScopedWriteAccess pAccess(*mpIncompleteAlpha);
- pAccess->SetFillColor(Color(COL_BLACK));
+ pAccess->SetFillColor(COL_BLACK);
pAccess->FillRect(tools::Rectangle(Point(0, mnLastLines), Size(pAccess->Width(), nNewLines)));
}
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index bd828180c525..575f8bf0874e 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -298,7 +298,7 @@ void WMFWriter::WMFRecord_CreateBrushIndirect(const Color& rColor)
{
WriteRecordHeader(0x00000007,W_META_CREATEBRUSHINDIRECT);
- if( rColor==Color(COL_TRANSPARENT) )
+ if( rColor==COL_TRANSPARENT )
pWMF->WriteUInt16( W_BS_HOLLOW );
else
pWMF->WriteUInt16( W_BS_SOLID );
@@ -372,7 +372,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const vcl::Font & rFont)
void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo )
{
WriteRecordHeader(0x00000008,W_META_CREATEPENINDIRECT);
- sal_uInt16 nStyle = rColor == Color( COL_TRANSPARENT ) ? W_PS_NULL : W_PS_SOLID;
+ sal_uInt16 nStyle = rColor == COL_TRANSPARENT ? W_PS_NULL : W_PS_SOLID;
switch( rLineInfo.GetStyle() )
{
case LineStyle::Dash :
@@ -504,7 +504,7 @@ bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& r
Color aOldLineColor( aSrcLineColor );
aSrcLineInfo = LineInfo();
aSrcFillColor = aSrcTextColor;
- aSrcLineColor = Color( COL_TRANSPARENT );
+ aSrcLineColor = COL_TRANSPARENT;
SetLineAndFillAttr();
pVirDev->SetFont( aSrcFont );
std::vector<tools::PolyPolygon> aPolyPolyVec;
@@ -996,7 +996,7 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx:
const Color aOldLineColor(aSrcLineColor);
const Color aOldFillColor(aSrcFillColor);
- aSrcLineColor = Color( COL_TRANSPARENT );
+ aSrcLineColor = COL_TRANSPARENT;
aSrcFillColor = aOldLineColor;
SetLineAndFillAttr();
@@ -1356,7 +1356,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
if( pA->IsSetting() )
aSrcLineColor = pA->GetColor();
else
- aSrcLineColor = Color( COL_TRANSPARENT );
+ aSrcLineColor = COL_TRANSPARENT;
}
break;
@@ -1367,7 +1367,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
if( pA->IsSetting() )
aSrcFillColor = pA->GetColor();
else
- aSrcFillColor = Color( COL_TRANSPARENT );
+ aSrcFillColor = COL_TRANSPARENT;
}
break;
@@ -1384,7 +1384,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
if( pA->IsSetting() )
aSrcFont.SetFillColor( pA->GetColor() );
else
- aSrcFont.SetFillColor( Color( COL_TRANSPARENT ) );
+ aSrcFont.SetFillColor( COL_TRANSPARENT );
}
break;
@@ -1761,10 +1761,10 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
WMFRecord_SetROP2(eDstROP2);
aDstLineInfo = LineInfo();
- aDstLineColor = aSrcLineColor = Color( COL_BLACK );
+ aDstLineColor = aSrcLineColor = COL_BLACK;
CreateSelectDeletePen( aDstLineColor, aDstLineInfo );
- aDstFillColor = aSrcFillColor = Color( COL_WHITE );
+ aDstFillColor = aSrcFillColor = COL_WHITE;
CreateSelectDeleteBrush( aDstFillColor );
aDstClipRegion = aSrcClipRegion = vcl::Region();
@@ -1772,7 +1772,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
vcl::Font aFont;
aFont.SetCharSet( GetExtendedTextEncoding( RTL_TEXTENCODING_MS_1252 ) );
- aFont.SetColor( Color( COL_WHITE ) );
+ aFont.SetColor( COL_WHITE );
aFont.SetAlignment( ALIGN_BASELINE );
aDstFont = aSrcFont = aFont;
CreateSelectDeleteFont(aDstFont);
@@ -1781,7 +1781,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
eDstHorTextAlign = eSrcHorTextAlign = W_TA_LEFT;
WMFRecord_SetTextAlign( eDstTextAlign, eDstHorTextAlign );
- aDstTextColor = aSrcTextColor = Color( COL_WHITE );
+ aDstTextColor = aSrcTextColor = COL_WHITE;
WMFRecord_SetTextColor(aDstTextColor);
// Write records
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 59ca82c035ff..899795675405 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -95,7 +95,7 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
const BitmapColor aReplace( cReplaceTransparency );
const long nWidth = std::min( pMaskAcc->Width(), pAcc->Width() );
const long nHeight = std::min( pMaskAcc->Height(), pAcc->Height() );
- const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color(COL_WHITE) ) );
for( long nY = 0; nY < nHeight; nY++ )
{
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index c9619a2fb40b..e631d0593999 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -65,28 +65,28 @@ Bitmap::Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalett
if( 1 == nBitCount )
{
aPal.SetEntryCount( 2 );
- aPal[ 0 ] = Color( COL_BLACK );
- aPal[ 1 ] = Color( COL_WHITE );
+ aPal[ 0 ] = Color(COL_BLACK);
+ aPal[ 1 ] = Color(COL_WHITE);
}
else if( ( 4 == nBitCount ) || ( 8 == nBitCount ) )
{
aPal.SetEntryCount( 1 << nBitCount );
- aPal[ 0 ] = Color( COL_BLACK );
- aPal[ 1 ] = Color( COL_BLUE );
- aPal[ 2 ] = Color( COL_GREEN );
- aPal[ 3 ] = Color( COL_CYAN );
- aPal[ 4 ] = Color( COL_RED );
- aPal[ 5 ] = Color( COL_MAGENTA );
- aPal[ 6 ] = Color( COL_BROWN );
- aPal[ 7 ] = Color( COL_GRAY );
- aPal[ 8 ] = Color( COL_LIGHTGRAY );
- aPal[ 9 ] = Color( COL_LIGHTBLUE );
- aPal[ 10 ] = Color( COL_LIGHTGREEN );
- aPal[ 11 ] = Color( COL_LIGHTCYAN );
- aPal[ 12 ] = Color( COL_LIGHTRED );
- aPal[ 13 ] = Color( COL_LIGHTMAGENTA );
- aPal[ 14 ] = Color( COL_YELLOW );
- aPal[ 15 ] = Color( COL_WHITE );
+ aPal[ 0 ] = Color(COL_BLACK);
+ aPal[ 1 ] = Color(COL_BLUE);
+ aPal[ 2 ] = Color(COL_GREEN);
+ aPal[ 3 ] = Color(COL_CYAN);
+ aPal[ 4 ] = Color(COL_RED);
+ aPal[ 5 ] = Color(COL_MAGENTA);
+ aPal[ 6 ] = Color(COL_BROWN);
+ aPal[ 7 ] = Color(COL_GRAY);
+ aPal[ 8 ] = Color(COL_LIGHTGRAY);
+ aPal[ 9 ] = Color(COL_LIGHTBLUE);
+ aPal[ 10 ] = Color(COL_LIGHTGREEN);
+ aPal[ 11 ] = Color(COL_LIGHTCYAN);
+ aPal[ 12 ] = Color(COL_LIGHTRED);
+ aPal[ 13 ] = Color(COL_LIGHTMAGENTA);
+ aPal[ 14 ] = Color(COL_YELLOW);
+ aPal[ 15 ] = Color(COL_WHITE);
// Create dither palette
if( 8 == nBitCount )
@@ -1201,8 +1201,8 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uInt8 nTol ) const
{
const long nWidth = pReadAcc->Width();
const long nHeight = pReadAcc->Height();
- const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
- const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color(COL_BLACK) ) );
+ const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color(COL_WHITE) ) );
if( !nTol )
{
@@ -1510,7 +1510,7 @@ bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
{
const long nWidth = std::min( pMaskAcc->Width(), pAcc->Width() );
const long nHeight = std::min( pMaskAcc->Height(), pAcc->Height() );
- const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color(COL_WHITE) ) );
BitmapColor aReplace;
if( pAcc->HasPalette() )
@@ -1830,7 +1830,7 @@ bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
const Color aColBlack( COL_BLACK );
BitmapColor aPixel;
BitmapColor aMaskPixel;
- const BitmapColor aWhite( pAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aWhite( pAcc->GetBestMatchingColor( Color(COL_WHITE) ) );
const BitmapColor aBlack( pAcc->GetBestMatchingColor( aColBlack ) );
const BitmapColor aMaskBlack( pMaskAcc->GetBestMatchingColor( aColBlack ) );
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 9e4d5b78d7a2..ec6b504a9e79 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -401,7 +401,7 @@ bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor )
if( !!aBitmap )
{
- const bool bTransRotate = ( Color( COL_TRANSPARENT ) == rFillColor );
+ const bool bTransRotate = ( Color(COL_TRANSPARENT) == rFillColor );
if( bTransRotate )
{
@@ -551,7 +551,7 @@ bool BitmapEx::CopyPixel( const tools::Rectangle& rRectDst, const tools::Rectang
else
{
aMask = Bitmap( GetSizePixel(), 1 );
- aMask.Erase( Color( COL_BLACK ) );
+ aMask.Erase( COL_BLACK );
eTransparent = TransparentType::Bitmap;
aMask.CopyPixel( rRectDst, rRectSrc, &pBmpExSrc->aMask );
}
@@ -567,7 +567,7 @@ bool BitmapEx::CopyPixel( const tools::Rectangle& rRectDst, const tools::Rectang
{
Bitmap aMaskSrc( pBmpExSrc->GetSizePixel(), 1 );
- aMaskSrc.Erase( Color( COL_BLACK ) );
+ aMaskSrc.Erase( COL_BLACK );
aMask.CopyPixel( rRectDst, rRectSrc, &aMaskSrc );
}
}
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index e63f64ca6b4b..389a323f5d21 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -176,7 +176,7 @@ namespace
else
{
// reset alpha channel
- aVDev->SetBackground(Wallpaper(Color(COL_BLACK)));
+ aVDev->SetBackground(Wallpaper(COL_BLACK));
aVDev->Erase();
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index c38bfe4e4f5d..99b5067270db 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -985,7 +985,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
tools::Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmap() );
- aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
+ aBmpEx.Rotate( nAngle10, COL_TRANSPARENT );
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(),
aBmpEx ) );
}
@@ -999,7 +999,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
BitmapEx aBmpEx( pAct->GetBitmap() );
aBmpEx.Crop( tools::Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
- aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
+ aBmpEx.Rotate( nAngle10, COL_TRANSPARENT );
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
}
@@ -1012,7 +1012,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
tools::Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmapEx() );
- aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
+ aBmpEx.Rotate( nAngle10, COL_TRANSPARENT );
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
}
@@ -1026,7 +1026,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
BitmapEx aBmpEx( pAct->GetBitmapEx() );
aBmpEx.Crop( tools::Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
- aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
+ aBmpEx.Rotate( nAngle10, COL_TRANSPARENT );
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
}
@@ -1774,8 +1774,8 @@ BitmapEx GDIMetaFile::ImplBmpMonoFnc( const BitmapEx& rBmpEx, const void* pBmpPa
{
BitmapPalette aPal( 3 );
- aPal[ 0 ] = Color( COL_BLACK );
- aPal[ 1 ] = Color( COL_WHITE );
+ aPal[ 0 ] = Color(COL_BLACK);
+ aPal[ 1 ] = Color(COL_WHITE);
aPal[ 2 ] = static_cast<const ImplBmpMonoParam*>(pBmpParam)->aColor;
Bitmap aBmp( rBmpEx.GetSizePixel(), 4, &aPal );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index f3aeb9372234..0a7e32a4cf6f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -174,14 +174,14 @@ void doTestCode()
aWriter.SetAutoAdvanceTime( 3 );
aWriter.SetMapMode( MapMode( MapUnit::Map100thMM ) );
- aWriter.SetFillColor( Color( COL_LIGHTRED ) );
- aWriter.SetLineColor( Color( COL_LIGHTGREEN ) );
+ aWriter.SetFillColor( COL_LIGHTRED );
+ aWriter.SetLineColor( COL_LIGHTGREEN );
aWriter.DrawRect( Rectangle( Point( 2000, 200 ), Size( 8000, 3000 ) ), 5000, 2000 );
aWriter.SetFont( Font( OUString( "Times" ), Size( 0, 500 ) ) );
- aWriter.SetTextColor( Color( COL_BLACK ) );
- aWriter.SetLineColor( Color( COL_BLACK ) );
- aWriter.SetFillColor( Color( COL_LIGHTBLUE ) );
+ aWriter.SetTextColor( COL_BLACK );
+ aWriter.SetLineColor( COL_BLACK );
+ aWriter.SetFillColor( COL_LIGHTBLUE );
Rectangle aRect( Point( 5000, 5000 ), Size( 6000, 3000 ) );
aWriter.DrawRect( aRect );
@@ -193,7 +193,7 @@ void doTestCode()
aWriter.CreateNote( Rectangle( Point( aRect.Right(), aRect.Top() ), Size( 6000, 3000 ) ), aNote );
Rectangle aTargetRect( Point( 3000, 23000 ), Size( 12000, 6000 ) );
- aWriter.SetFillColor( Color( COL_LIGHTGREEN ) );
+ aWriter.SetFillColor( COL_LIGHTGREEN );
aWriter.DrawRect( aTargetRect );
aWriter.DrawText( aTargetRect, "Dest second link" );
sal_Int32 nSecondDest = aWriter.CreateDest( aTargetRect );
@@ -225,7 +225,7 @@ void doTestCode()
// set transitional mode
aWriter.SetPageTransition( PDFWriter::WipeRightToLeft, 1500 );
aWriter.SetMapMode( MapMode( MapUnit::Map100thMM ) );
- aWriter.SetTextColor( Color( COL_BLACK ) );
+ aWriter.SetTextColor( COL_BLACK );
aWriter.SetFont( Font( OUString( "Times" ), Size( 0, 500 ) ) );
aWriter.DrawText( Rectangle( Point( 4500, 1500 ), Size( 12000, 3000 ) ),
"Here's where all things come to an end ... well at least the paragraph from the last page.",
@@ -233,7 +233,7 @@ void doTestCode()
);
aWriter.EndStructureElement();
- aWriter.SetFillColor( Color( COL_LIGHTBLUE ) );
+ aWriter.SetFillColor( COL_LIGHTBLUE );
// disable structure
aWriter.BeginStructureElement( PDFWriter::NonStructElement );
aWriter.DrawRect( aRect );
@@ -241,7 +241,7 @@ void doTestCode()
aWriter.DrawText( aRect, "Link annot 2" );
sal_Int32 nSecondLink = aWriter.CreateLink( aRect );
- aWriter.SetFillColor( Color( COL_LIGHTGREEN ) );
+ aWriter.SetFillColor( COL_LIGHTGREEN );
aWriter.BeginStructureElement( PDFWriter::ListItem );
aWriter.DrawRect( aTargetRect );
aWriter.DrawText( aTargetRect, "Dest first link" );
@@ -270,19 +270,19 @@ void doTestCode()
aWriter.SetClipRegion( aClip );
aWriter.DrawEllipse( Rectangle( Point( 4500, 9600 ), Size( 12000, 3000 ) ) );
aWriter.MoveClipRegion( 1000, 500 );
- aWriter.SetFillColor( Color( COL_RED ) );
+ aWriter.SetFillColor( COL_RED );
aWriter.DrawEllipse( Rectangle( Point( 4500, 9600 ), Size( 12000, 3000 ) ) );
aWriter.Pop();
// test transparency
// draw background
Rectangle aTranspRect( Point( 7500, 13500 ), Size( 9000, 6000 ) );
- aWriter.SetFillColor( Color( COL_LIGHTRED ) );
+ aWriter.SetFillColor( COL_LIGHTRED );
aWriter.DrawRect( aTranspRect );
aWriter.BeginTransparencyGroup();
- aWriter.SetFillColor( Color( COL_LIGHTGREEN ) );
+ aWriter.SetFillColor( COL_LIGHTGREEN );
aWriter.DrawEllipse( aTranspRect );
- aWriter.SetTextColor( Color( COL_LIGHTBLUE ) );
+ aWriter.SetTextColor( COL_LIGHTBLUE );
aWriter.DrawText( aTranspRect,
"Some transparent text",
DrawTextFlags::Center | DrawTextFlags::VCenter | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak );
@@ -302,16 +302,16 @@ void doTestCode()
aWriter.DrawBitmap( Point( 600, 13500 ), Size( 3000, 3000 ), aTransMask );
aTranspRect = Rectangle( Point( 4200, 13500 ), Size( 3000, 3000 ) );
- aWriter.SetFillColor( Color( COL_LIGHTRED ) );
+ aWriter.SetFillColor( COL_LIGHTRED );
aWriter.DrawRect( aTranspRect );
- aWriter.SetFillColor( Color( COL_LIGHTGREEN ) );
+ aWriter.SetFillColor( COL_LIGHTGREEN );
aWriter.DrawEllipse( aTranspRect );
- aWriter.SetTextColor( Color( COL_LIGHTBLUE ) );
+ aWriter.SetTextColor( COL_LIGHTBLUE );
aWriter.DrawText( aTranspRect,
"Some transparent text",
DrawTextFlags::Center | DrawTextFlags::VCenter | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak );
aTranspRect = Rectangle( Point( 1500, 16500 ), Size( 4800, 3000 ) );
- aWriter.SetFillColor( Color( COL_LIGHTRED ) );
+ aWriter.SetFillColor( COL_LIGHTRED );
aWriter.DrawRect( aTranspRect );
Bitmap aImageBmp( Size( 256, 256 ), 24 );
@@ -335,7 +335,7 @@ void doTestCode()
Point( 8000, 12000 ),
Point( 3000, 19000 ) };
tools::Polygon aLIPoly( 3, aLIPoints );
- aWriter.SetLineColor( Color( COL_BLUE ) );
+ aWriter.SetLineColor( COL_BLUE );
aWriter.SetFillColor();
aWriter.DrawPolyLine( aLIPoly, aLI );
@@ -352,7 +352,7 @@ void doTestCode()
aWriter.NewPage( 595, 842 );
aWriter.SetMapMode( MapMode( MapUnit::Map100thMM ) );
aWriter.SetFont( Font( OUString( "Times" ), Size( 0, 500 ) ) );
- aWriter.SetTextColor( Color( COL_BLACK ) );
+ aWriter.SetTextColor( COL_BLACK );
aRect = Rectangle( Point( 4500, 6000 ), Size( 6000, 1500 ) );
aWriter.DrawRect( aRect );
aWriter.DrawText( aRect, "www.heise.de" );
@@ -419,9 +419,9 @@ void doTestCode()
aRB1.RadioGroup = 1;
aRB1.Border = aRB1.Background = true;
aRB1.ButtonIsLeft = false;
- aRB1.BorderColor = Color( COL_LIGHTGREEN );
- aRB1.BackgroundColor = Color( COL_LIGHTBLUE );
- aRB1.TextColor = Color( COL_LIGHTRED );
+ aRB1.BorderColor = COL_LIGHTGREEN;
+ aRB1.BackgroundColor = COL_LIGHTBLUE;
+ aRB1.TextColor = COL_LIGHTRED;
aRB1.TextFont = Font( OUString( "Courier" ), Size( 0, 800 ) );
aWriter.CreateControl( aRB1 );
@@ -451,7 +451,7 @@ void doTestCode()
aEditBox.Location = Rectangle( Point( 10000, 18000 ), Size( 5000, 1500 ) );
aEditBox.MaxLen = 100;
aEditBox.Border = aEditBox.Background = true;
- aEditBox.BorderColor = Color( COL_BLACK );
+ aEditBox.BorderColor = COL_BLACK;
aWriter.CreateControl( aEditBox );
// normal list box
@@ -463,7 +463,7 @@ void doTestCode()
aLstBox.Sort = true;
aLstBox.MultiSelect = true;
aLstBox.Border = aLstBox.Background = true;
- aLstBox.BorderColor = Color( COL_BLACK );
+ aLstBox.BorderColor = COL_BLACK;
aLstBox.Entries.push_back( OUString( "One" ) );
aLstBox.Entries.push_back( OUString( "Two" ) );
aLstBox.Entries.push_back( OUString( "Three" ) );
@@ -900,7 +900,7 @@ static void appendDouble( double fValue, OStringBuffer& rBuffer, sal_Int32 nPrec
static void appendColor( const Color& rColor, OStringBuffer& rBuffer, bool bConvertToGrey )
{
- if( rColor != Color( COL_TRANSPARENT ) )
+ if( rColor != COL_TRANSPARENT )
{
if( bConvertToGrey )
{
@@ -920,7 +920,7 @@ static void appendColor( const Color& rColor, OStringBuffer& rBuffer, bool bConv
void PDFWriterImpl::appendStrokingColor( const Color& rColor, OStringBuffer& rBuffer )
{
- if( rColor != Color( COL_TRANSPARENT ) )
+ if( rColor != COL_TRANSPARENT )
{
bool bGrey = m_aContext.ColorMode == PDFWriter::DrawGreyscale;
appendColor( rColor, rBuffer, bGrey );
@@ -930,7 +930,7 @@ void PDFWriterImpl::appendStrokingColor( const Color& rColor, OStringBuffer& rBu
void PDFWriterImpl::appendNonStrokingColor( const Color& rColor, OStringBuffer& rBuffer )
{
- if( rColor != Color( COL_TRANSPARENT ) )
+ if( rColor != COL_TRANSPARENT )
{
bool bGrey = m_aContext.ColorMode == PDFWriter::DrawGreyscale;
appendColor( rColor, rBuffer, bGrey );
@@ -4114,7 +4114,7 @@ sal_Int32 PDFWriterImpl::getBestBuiltinFont( const vcl::Font& rFont )
static inline const Color& replaceColor( const Color& rCol1, const Color& rCol2 )
{
- return (rCol1 == Color( COL_TRANSPARENT )) ? rCol2 : rCol1;
+ return (rCol1 == COL_TRANSPARENT) ? rCol2 : rCol1;
}
void PDFWriterImpl::createDefaultPushButtonAppearance( PDFWidget& rButton, const PDFWriter::PushButtonWidget& rWidget )
@@ -4130,8 +4130,8 @@ void PDFWriterImpl::createDefaultPushButtonAppearance( PDFWidget& rButton, const
// to default user space
if( rWidget.Background || rWidget.Border )
{
- setLineColor( rWidget.Border ? replaceColor( rWidget.BorderColor, rSettings.GetLightColor() ) : Color( COL_TRANSPARENT ) );
- setFillColor( rWidget.Background ? replaceColor( rWidget.BackgroundColor, rSettings.GetDialogColor() ) : Color( COL_TRANSPARENT ) );
+ setLineColor( rWidget.Border ? replaceColor( rWidget.BorderColor, rSettings.GetLightColor() ) : COL_TRANSPARENT );
+ setFillColor( rWidget.Background ? replaceColor( rWidget.BackgroundColor, rSettings.GetDialogColor() ) : COL_TRANSPARENT );
drawRectangle( rWidget.Location );
}
// prepare font to use
@@ -4182,12 +4182,12 @@ Font PDFWriterImpl::drawFieldBorder( PDFWidget& rIntern,
if( rWidget.Background || rWidget.Border )
{
- if( rWidget.Border && rWidget.BorderColor == Color( COL_TRANSPARENT ) )
+ if( rWidget.Border && rWidget.BorderColor == COL_TRANSPARENT )
{
sal_Int32 nDelta = getReferenceDevice()->GetDPIX() / 500;
if( nDelta < 1 )
nDelta = 1;
- setLineColor( Color( COL_TRANSPARENT ) );
+ setLineColor( COL_TRANSPARENT );
tools::Rectangle aRect = rIntern.m_aRect;
setFillColor( rSettings.GetLightBorderColor() );
drawRectangle( aRect );
@@ -4204,8 +4204,8 @@ Font PDFWriterImpl::drawFieldBorder( PDFWidget& rIntern,
}
else
{
- setLineColor( rWidget.Border ? replaceColor( rWidget.BorderColor, rSettings.GetShadowColor() ) : Color( COL_TRANSPARENT ) );
- setFillColor( rWidget.Background ? replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) : Color( COL_TRANSPARENT ) );
+ setLineColor( rWidget.Border ? replaceColor( rWidget.BorderColor, rSettings.GetShadowColor() ) : COL_TRANSPARENT );
+ setFillColor( rWidget.Background ? replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) : COL_TRANSPARENT );
drawRectangle( rIntern.m_aRect );
}
@@ -4285,7 +4285,7 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr
beginRedirect( pListBoxStream, rBox.m_aRect );
OStringBuffer aAppearance( 64 );
- setLineColor( Color( COL_TRANSPARENT ) );
+ setLineColor( COL_TRANSPARENT );
setFillColor( replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) );
drawRectangle( rBox.m_aRect );
@@ -4326,8 +4326,8 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
if( rWidget.Background || rWidget.Border )
{
- setLineColor( rWidget.Border ? replaceColor( rWidget.BorderColor, rSettings.GetCheckedColor() ) : Color( COL_TRANSPARENT ) );
- setFillColor( rWidget.Background ? replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) : Color( COL_TRANSPARENT ) );
+ setLineColor( rWidget.Border ? replaceColor( rWidget.BorderColor, rSettings.GetCheckedColor() ) : COL_TRANSPARENT );
+ setFillColor( rWidget.Background ? replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) : COL_TRANSPARENT );
drawRectangle( rBox.m_aRect );
}
@@ -4360,8 +4360,8 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
aTextRect.SetRight( aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta );
aTextRect.SetBottom( rBox.m_aRect.Bottom() );
}
- setLineColor( Color( COL_BLACK ) );
- setFillColor( Color( COL_TRANSPARENT ) );
+ setLineColor( COL_BLACK );
+ setFillColor( COL_TRANSPARENT );
OStringBuffer aLW( 32 );
aLW.append( "q " );
m_aPages[m_nCurrentPage].appendMappedLength( nDelta, aLW );
@@ -4430,8 +4430,8 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
if( rWidget.Background || rWidget.Border )
{
- setLineColor( rWidget.Border ? replaceColor( rWidget.BorderColor, rSettings.GetCheckedColor() ) : Color( COL_TRANSPARENT ) );
- setFillColor( rWidget.Background ? replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) : Color( COL_TRANSPARENT ) );
+ setLineColor( rWidget.Border ? replaceColor( rWidget.BorderColor, rSettings.GetCheckedColor() ) : COL_TRANSPARENT );
+ setFillColor( rWidget.Background ? replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) : COL_TRANSPARENT );
drawRectangle( rBox.m_aRect );
}
@@ -4464,8 +4464,8 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
aTextRect.SetRight( aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta );
aTextRect.SetBottom( rBox.m_aRect.Bottom() );
}
- setLineColor( Color( COL_BLACK ) );
- setFillColor( Color( COL_TRANSPARENT ) );
+ setLineColor( COL_BLACK );
+ setFillColor( COL_TRANSPARENT );
OStringBuffer aLW( 32 );
aLW.append( "q " );
m_aPages[ m_nCurrentPage ].appendMappedLength( nDelta, aLW );
@@ -4506,7 +4506,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
aDA.append( " Tf\n0 0 Td\nET\nQ\n" );
writeBuffer( aDA.getStr(), aDA.getLength() );
setFillColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ) );
- setLineColor( Color( COL_TRANSPARENT ) );
+ setLineColor( COL_TRANSPARENT );
aCheckRect.AdjustLeft(3*nDelta );
aCheckRect.AdjustTop(3*nDelta );
aCheckRect.AdjustBottom( -(3*nDelta) );
@@ -6311,13 +6311,13 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool
Color aOverlineColor = m_aCurrentPDFState.m_aOverlineColor;
Color aReliefColor( COL_LIGHTGRAY );
if( aTextColor == COL_BLACK )
- aTextColor = Color( COL_WHITE );
+ aTextColor = COL_WHITE;
if( aTextLineColor == COL_BLACK )
- aTextLineColor = Color( COL_WHITE );
+ aTextLineColor = COL_WHITE;
if( aOverlineColor == COL_BLACK )
- aOverlineColor = Color( COL_WHITE );
+ aOverlineColor = COL_WHITE;
if( aTextColor == COL_WHITE )
- aReliefColor = Color( COL_BLACK );
+ aReliefColor = COL_BLACK;
Font aSetFont = m_aCurrentPDFState.m_aFont;
aSetFont.SetRelief( FontRelief::NONE );
@@ -6354,10 +6354,10 @@ void PDFWriterImpl::drawShadow( SalLayout& rLayout, const OUString& rText, bool
Color aSaveOverlineColor = m_aCurrentPDFState.m_aOverlineColor;
Font& rFont = m_aCurrentPDFState.m_aFont;
- if( rFont.GetColor() == Color( COL_BLACK ) || rFont.GetColor().GetLuminance() < 8 )
- rFont.SetColor( Color( COL_LIGHTGRAY ) );
+ if( rFont.GetColor() == COL_BLACK || rFont.GetColor().GetLuminance() < 8 )
+ rFont.SetColor( COL_LIGHTGRAY );
else
- rFont.SetColor( Color( COL_BLACK ) );
+ rFont.SetColor( COL_BLACK );
rFont.SetShadow( false );
rFont.SetOutline( false );
setFont( rFont );
@@ -6647,14 +6647,14 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
if( m_aCurrentPDFState.m_aFont.IsOutline() )
{
aStrokeColor = m_aCurrentPDFState.m_aFont.GetColor();
- aNonStrokeColor = Color( COL_WHITE );
+ aNonStrokeColor = COL_WHITE;
}
else
aNonStrokeColor = m_aCurrentPDFState.m_aFont.GetColor();
if( bABold )
aStrokeColor = m_aCurrentPDFState.m_aFont.GetColor();
- if( aStrokeColor != Color( COL_TRANSPARENT ) && aStrokeColor != m_aCurrentPDFState.m_aLineColor )
+ if( aStrokeColor != COL_TRANSPARENT && aStrokeColor != m_aCurrentPDFState.m_aLineColor )
{
if( ! bPop )
aLine.append( "q " );
@@ -6662,7 +6662,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
appendStrokingColor( aStrokeColor, aLine );
aLine.append( "\n" );
}
- if( aNonStrokeColor != Color( COL_TRANSPARENT ) && aNonStrokeColor != m_aCurrentPDFState.m_aFillColor )
+ if( aNonStrokeColor != COL_TRANSPARENT && aNonStrokeColor != m_aCurrentPDFState.m_aFillColor )
{
if( ! bPop )
aLine.append( "q " );
@@ -6766,14 +6766,14 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
// Avoid fill color when map mode is in pixels, the below code assumes
// logic map mode.
bool bPixel = m_aCurrentPDFState.m_aMapMode.GetMapUnit() == MapUnit::MapPixel;
- if (m_aCurrentPDFState.m_aFont.GetFillColor() != Color(COL_TRANSPARENT) && !bPixel)
+ if (m_aCurrentPDFState.m_aFont.GetFillColor() != COL_TRANSPARENT && !bPixel)
{
// PDF doesn't have a text fill color, so draw a rectangle before
// drawing the actual text.
push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
setFillColor(m_aCurrentPDFState.m_aFont.GetFillColor());
// Avoid border around the rectangle for Writer shape text.
- setLineColor(Color(COL_TRANSPARENT));
+ setLineColor(COL_TRANSPARENT);
// The rectangle is the bounding box of the text, but also includes
// ascent / descent to match the on-screen rendering.
@@ -6913,12 +6913,12 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
if ( bEmphPolyLine )
{
setLineColor( m_aCurrentPDFState.m_aFont.GetColor() );
- setFillColor( Color( COL_TRANSPARENT ) );
+ setFillColor( COL_TRANSPARENT );
}
else
{
setFillColor( m_aCurrentPDFState.m_aFont.GetColor() );
- setLineColor( Color( COL_TRANSPARENT ) );
+ setLineColor( COL_TRANSPARENT );
}
writeBuffer( aLine.getStr(), aLine.getLength() );
@@ -7186,7 +7186,7 @@ void PDFWriterImpl::drawLine( const Point& rStart, const Point& rStop )
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT )
return;
OStringBuffer aLine;
@@ -7203,7 +7203,7 @@ void PDFWriterImpl::drawLine( const Point& rStart, const Point& rStop, const Lin
MARK( "drawLine with LineInfo" );
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT )
return;
if( rInfo.GetStyle() == LineStyle::Solid && rInfo.GetWidth() < 2 )
@@ -7691,17 +7691,17 @@ void PDFWriterImpl::drawPolygon( const tools::Polygon& rPoly )
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor == COL_TRANSPARENT )
return;
int nPoints = rPoly.GetSize();
OStringBuffer aLine( 20 * nPoints );
m_aPages.back().appendPolygon( rPoly, aLine );
- if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor != Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor != COL_TRANSPARENT )
aLine.append( "B*\n" );
- else if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) )
+ else if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT )
aLine.append( "S\n" );
else
aLine.append( "f*\n" );
@@ -7715,18 +7715,18 @@ void PDFWriterImpl::drawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor == COL_TRANSPARENT )
return;
int nPolygons = rPolyPoly.Count();
OStringBuffer aLine( 40 * nPolygons );
m_aPages.back().appendPolyPolygon( rPolyPoly, aLine );
- if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor != Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor != COL_TRANSPARENT )
aLine.append( "B*\n" );
- else if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) )
+ else if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT )
aLine.append( "S\n" );
else
aLine.append( "f*\n" );
@@ -7743,8 +7743,8 @@ void PDFWriterImpl::drawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uI
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor == COL_TRANSPARENT )
return;
if( m_bIsPDF_A1 || m_aContext.Version < PDFWriter::PDFVersion::PDF_1_4 )
@@ -7770,10 +7770,10 @@ void PDFWriterImpl::drawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uI
// create XObject's content stream
OStringBuffer aContent( 256 );
m_aPages.back().appendPolyPolygon( rPolyPoly, aContent );
- if( m_aCurrentPDFState.m_aLineColor != Color( COL_TRANSPARENT ) &&
- m_aCurrentPDFState.m_aFillColor != Color( COL_TRANSPARENT ) )
+ if( m_aCurrentPDFState.m_aLineColor != COL_TRANSPARENT &&
+ m_aCurrentPDFState.m_aFillColor != COL_TRANSPARENT )
aContent.append( " B*\n" );
- else if( m_aCurrentPDFState.m_aLineColor != Color( COL_TRANSPARENT ) )
+ else if( m_aCurrentPDFState.m_aLineColor != COL_TRANSPARENT )
aContent.append( " S\n" );
else
aContent.append( " f*\n" );
@@ -7862,8 +7862,8 @@ void PDFWriterImpl::beginRedirect( SvStream* pStream, const tools::Rectangle& rT
// setup graphics state for independent object stream
// force reemitting colors
- m_aCurrentPDFState.m_aLineColor = Color( COL_TRANSPARENT );
- m_aCurrentPDFState.m_aFillColor = Color( COL_TRANSPARENT );
+ m_aCurrentPDFState.m_aLineColor = COL_TRANSPARENT;
+ m_aCurrentPDFState.m_aFillColor = COL_TRANSPARENT;
}
SvStream* PDFWriterImpl::endRedirect()
@@ -7878,8 +7878,8 @@ SvStream* PDFWriterImpl::endRedirect()
pop();
- m_aCurrentPDFState.m_aLineColor = Color( COL_TRANSPARENT );
- m_aCurrentPDFState.m_aFillColor = Color( COL_TRANSPARENT );
+ m_aCurrentPDFState.m_aLineColor = COL_TRANSPARENT;
+ m_aCurrentPDFState.m_aFillColor = COL_TRANSPARENT;
// needed after pop() to set m_aCurrentPDFState
updateGraphicsState(NOWRITE);
@@ -7941,17 +7941,17 @@ void PDFWriterImpl::drawRectangle( const tools::Rectangle& rRect )
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor == COL_TRANSPARENT )
return;
OStringBuffer aLine( 40 );
m_aPages.back().appendRect( rRect, aLine );
- if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor != Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor != COL_TRANSPARENT )
aLine.append( " B*\n" );
- else if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) )
+ else if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT )
aLine.append( " S\n" );
else
aLine.append( " f*\n" );
@@ -7968,8 +7968,8 @@ void PDFWriterImpl::drawRectangle( const tools::Rectangle& rRect, sal_uInt32 nHo
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor == COL_TRANSPARENT )
return;
if( nHorzRound > static_cast<sal_uInt32>(rRect.GetWidth())/2 )
@@ -8038,10 +8038,10 @@ void PDFWriterImpl::drawRectangle( const tools::Rectangle& rRect, sal_uInt32 nHo
m_aPages.back().appendPoint( aPoints[1], aLine );
aLine.append( " c " );
- if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor != Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor != COL_TRANSPARENT )
aLine.append( "b*\n" );
- else if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) )
+ else if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT )
aLine.append( "s\n" );
else
aLine.append( "f*\n" );
@@ -8055,8 +8055,8 @@ void PDFWriterImpl::drawEllipse( const tools::Rectangle& rRect )
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor == COL_TRANSPARENT )
return;
Point aPoints[12];
@@ -8108,10 +8108,10 @@ void PDFWriterImpl::drawEllipse( const tools::Rectangle& rRect )
m_aPages.back().appendPoint( aPoints[1], aLine );
aLine.append( " c " );
- if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor != Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor != COL_TRANSPARENT )
aLine.append( "b*\n" );
- else if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) )
+ else if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT )
aLine.append( "s\n" );
else
aLine.append( "f*\n" );
@@ -8144,8 +8144,8 @@ void PDFWriterImpl::drawArc( const tools::Rectangle& rRect, const Point& rStart,
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor == COL_TRANSPARENT )
return;
// calculate start and stop angles
@@ -8204,10 +8204,10 @@ void PDFWriterImpl::drawArc( const tools::Rectangle& rRect, const Point& rStart,
}
if( ! bWithChord && ! bWithPie )
aLine.append( "S\n" );
- else if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) &&
- m_aGraphicsStack.front().m_aFillColor != Color( COL_TRANSPARENT ) )
+ else if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT &&
+ m_aGraphicsStack.front().m_aFillColor != COL_TRANSPARENT )
aLine.append( "B*\n" );
- else if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) )
+ else if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT )
aLine.append( "S\n" );
else
aLine.append( "f*\n" );
@@ -8225,7 +8225,7 @@ void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly )
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT )
return;
OStringBuffer aLine( 20 * nPoints );
@@ -8241,7 +8241,7 @@ void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const LineInfo& r
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT )
return;
OStringBuffer aLine;
@@ -8338,7 +8338,7 @@ void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const PDFWriter::
updateGraphicsState();
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor == COL_TRANSPARENT )
return;
if( rInfo.m_fTransparency >= 1.0 )
@@ -8464,9 +8464,9 @@ void PDFWriterImpl::drawPixel( const Point& rPoint, const Color& rColor )
{
MARK( "drawPixel" );
- Color aColor = ( rColor == Color( COL_TRANSPARENT ) ? m_aGraphicsStack.front().m_aLineColor : rColor );
+ Color aColor = ( rColor == COL_TRANSPARENT ? m_aGraphicsStack.front().m_aLineColor : rColor );
- if( aColor == Color( COL_TRANSPARENT ) )
+ if( aColor == COL_TRANSPARENT )
return;
// pixels are drawn in line color, so have to set
@@ -9498,11 +9498,11 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
if( aBitmap.GetBitCount() == 1 )
{
// #i47395# 1 bit bitmaps occasionally have an inverted grey palette
- sal_uInt16 nBlackIndex = pAccess->GetBestPaletteIndex( BitmapColor( Color( COL_BLACK ) ) );
+ sal_uInt16 nBlackIndex = pAccess->GetBestPaletteIndex( BitmapColor( COL_BLACK ) );
assert( nBlackIndex == 0 || nBlackIndex == 1);
- sal_uInt16 nWhiteIndex = pAccess->GetBestPaletteIndex( BitmapColor( Color( COL_WHITE ) ) );
- if( pAccess->GetPalette()[nBlackIndex] == BitmapColor( Color( COL_BLACK ) ) &&
- pAccess->GetPalette()[nWhiteIndex] == BitmapColor( Color( COL_WHITE ) ) )
+ sal_uInt16 nWhiteIndex = pAccess->GetBestPaletteIndex( BitmapColor( Color(COL_WHITE) ) );
+ if( pAccess->GetPalette()[nBlackIndex] == BitmapColor( COL_BLACK ) &&
+ pAccess->GetPalette()[nWhiteIndex] == BitmapColor( Color(COL_WHITE) ) )
{
// It is black and white
if( nBlackIndex == 1 )
@@ -9573,7 +9573,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
if( aBitmap.GetBitCount() == 1 )
{
aLine.append( "/ImageMask true\n" );
- sal_Int32 nBlackIndex = pAccess->GetBestPaletteIndex( BitmapColor( Color( COL_BLACK ) ) );
+ sal_Int32 nBlackIndex = pAccess->GetBestPaletteIndex( BitmapColor( Color(COL_BLACK) ) );
SAL_WARN_IF( nBlackIndex != 0 && nBlackIndex != 1, "vcl.pdfwriter", "wrong black index" );
if( nBlackIndex )
aLine.append( "/Decode[ 1 0 ]\n" );
@@ -9599,7 +9599,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
aLine.append( nMaskObject );
aLine.append( " 0 R\n" );
}
- else if( aTransparentColor != Color( COL_TRANSPARENT ) )
+ else if( aTransparentColor != COL_TRANSPARENT )
{
aLine.append( "/Mask[ " );
if( bTrueColor )
@@ -9624,7 +9624,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
aLine.append( " ]\n" );
}
}
- else if( m_bIsPDF_A1 && (bWriteMask || aTransparentColor != Color( COL_TRANSPARENT )) )
+ else if( m_bIsPDF_A1 && (bWriteMask || aTransparentColor != COL_TRANSPARENT) )
m_aErrors.insert( PDFWriter::Warning_Transparency_Omitted_PDFA );
aLine.append( ">>\n"
@@ -9820,7 +9820,7 @@ void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize,
updateGraphicsState();
aLine.append( "q " );
- if( rFillColor != Color( COL_TRANSPARENT ) )
+ if( rFillColor != COL_TRANSPARENT )
{
appendNonStrokingColor( rFillColor, aLine );
aLine.append( ' ' );
@@ -9903,7 +9903,7 @@ void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize,
return;
const BitmapEmit& rEmit = createBitmapEmit( BitmapEx( rBitmap ), rGraphic );
- drawBitmap( rDestPoint, rDestSize, rEmit, Color( COL_TRANSPARENT ) );
+ drawBitmap( rDestPoint, rDestSize, rEmit, COL_TRANSPARENT );
}
void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize, const BitmapEx& rBitmap )
@@ -9915,7 +9915,7 @@ void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize,
return;
const BitmapEmit& rEmit = createBitmapEmit( rBitmap, Graphic() );
- drawBitmap( rDestPoint, rDestSize, rEmit, Color( COL_TRANSPARENT ) );
+ drawBitmap( rDestPoint, rDestSize, rEmit, COL_TRANSPARENT );
}
sal_Int32 PDFWriterImpl::createGradient( const Gradient& rGradient, const Size& rSize )
@@ -9971,7 +9971,7 @@ void PDFWriterImpl::drawGradient( const tools::Rectangle& rRect, const Gradient&
m_aPages.back().appendPoint( aTranslate, aLine );
aLine.append( " cm " );
// if a stroke is appended reset the clip region before stroke
- if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT )
aLine.append( "q " );
aLine.append( "0 0 " );
m_aPages.back().appendMappedLength( static_cast<sal_Int32>(rRect.GetWidth()), aLine, false );
@@ -9982,7 +9982,7 @@ void PDFWriterImpl::drawGradient( const tools::Rectangle& rRect, const Gradient&
aLine.append( "/P" );
aLine.append( nGradient );
aLine.append( " sh " );
- if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) )
+ if( m_aGraphicsStack.front().m_aLineColor != COL_TRANSPARENT )
{
aLine.append( "Q 0 0 " );
m_aPages.back().appendMappedLength( static_cast<sal_Int32>(rRect.GetWidth()), aLine, false );
@@ -10164,7 +10164,7 @@ void PDFWriterImpl::drawWallpaper( const tools::Rectangle& rRect, const Wallpape
{
Color aOldLineColor = m_aGraphicsStack.front().m_aLineColor;
Color aOldFillColor = m_aGraphicsStack.front().m_aFillColor;
- setLineColor( Color( COL_TRANSPARENT ) );
+ setLineColor( COL_TRANSPARENT );
setFillColor( rWall.GetColor() );
drawRectangle( rRect );
setLineColor( aOldLineColor );
@@ -10255,7 +10255,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode)
{
rNewState.m_nUpdateFlags &= ~GraphicsStateUpdateFlags::LineColor;
if( m_aCurrentPDFState.m_aLineColor != rNewState.m_aLineColor &&
- rNewState.m_aLineColor != Color( COL_TRANSPARENT ) )
+ rNewState.m_aLineColor != COL_TRANSPARENT )
{
appendStrokingColor( rNewState.m_aLineColor, aLine );
aLine.append( "\n" );
@@ -10266,7 +10266,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode)
{
rNewState.m_nUpdateFlags &= ~GraphicsStateUpdateFlags::FillColor;
if( m_aCurrentPDFState.m_aFillColor != rNewState.m_aFillColor &&
- rNewState.m_aFillColor != Color( COL_TRANSPARENT ) )
+ rNewState.m_aFillColor != COL_TRANSPARENT )
{
appendNonStrokingColor( rNewState.m_aFillColor, aLine );
aLine.append( "\n" );
@@ -10295,7 +10295,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode)
void PDFWriterImpl::setFont( const vcl::Font& rFont )
{
Color aColor = rFont.GetColor();
- if( aColor == Color( COL_TRANSPARENT ) )
+ if( aColor == COL_TRANSPARENT )
aColor = m_aGraphicsStack.front().m_aFont.GetColor();
m_aGraphicsStack.front().m_aFont = rFont;
m_aGraphicsStack.front().m_aFont.SetColor( aColor );
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index ad52e8d29217..2fea30fba0f4 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -1098,19 +1098,19 @@ public:
void setLineColor( const Color& rColor )
{
- m_aGraphicsStack.front().m_aLineColor = ImplIsColorTransparent(rColor) ? Color( COL_TRANSPARENT ) : rColor;
+ m_aGraphicsStack.front().m_aLineColor = ImplIsColorTransparent(rColor) ? COL_TRANSPARENT : rColor;
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsStateUpdateFlags::LineColor;
}
void setFillColor( const Color& rColor )
{
- m_aGraphicsStack.front().m_aFillColor = ImplIsColorTransparent(rColor) ? Color( COL_TRANSPARENT ) : rColor;
+ m_aGraphicsStack.front().m_aFillColor = ImplIsColorTransparent(rColor) ? COL_TRANSPARENT : rColor;
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsStateUpdateFlags::FillColor;
}
void setTextLineColor()
{
- m_aGraphicsStack.front().m_aTextLineColor = Color( COL_TRANSPARENT );
+ m_aGraphicsStack.front().m_aTextLineColor = COL_TRANSPARENT;
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsStateUpdateFlags::TextLineColor;
}
@@ -1122,7 +1122,7 @@ public:
void setOverlineColor()
{
- m_aGraphicsStack.front().m_aOverlineColor = Color( COL_TRANSPARENT );
+ m_aGraphicsStack.front().m_aOverlineColor = COL_TRANSPARENT;
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsStateUpdateFlags::OverlineColor;
}
@@ -1140,7 +1140,7 @@ public:
}
void setTextFillColor()
{
- m_aGraphicsStack.front().m_aFont.SetFillColor( Color( COL_TRANSPARENT ) );
+ m_aGraphicsStack.front().m_aFont.SetFillColor( COL_TRANSPARENT );
m_aGraphicsStack.front().m_aFont.SetTransparent( true );
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsStateUpdateFlags::Font;
}
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 5d35f09de169..5256442be109 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -492,7 +492,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
xVDev->DrawGradient( tools::Rectangle( aPoint, aDstSize ), rTransparenceGradient );
xVDev->SetDrawMode( DrawModeFlags::Default );
xVDev->EnableMapMode( false );
- xVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) );
+ xVDev->DrawMask( aPoint, aDstSizePixel, aMask, COL_WHITE );
aAlpha = xVDev->GetBitmap( aPoint, aDstSizePixel );
Graphic aGraphic = i_pOutDevData ? i_pOutDevData->GetCurrentGraphic() : Graphic();
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 60d3649baf0b..e4a50bb36283 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -210,13 +210,13 @@ void Printer::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize,
// bitmap, but perform a full alpha blend against a white
// background here.
Bitmap aBmp( rBmpEx.GetBitmap() );
- aBmp.Blend( rBmpEx.GetAlpha(), Color( COL_WHITE) );
+ aBmp.Blend( rBmpEx.GetAlpha(), COL_WHITE );
DrawBitmap( rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel, aBmp );
}
else
{
Bitmap aBmp( rBmpEx.GetBitmap() ), aMask( rBmpEx.GetMask() );
- aBmp.Replace( aMask, Color( COL_WHITE ) );
+ aBmp.Replace( aMask, COL_WHITE );
ImplPrintTransparent( aBmp, aMask, rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel );
}
}
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 2e88362cac80..bb54e2be1821 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -737,7 +737,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
bool bStillBackground=true; // true until first non-bg action
nActionNum=0; nLastBgAction=-1;
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction();
- if( rBackground != Color( COL_TRANSPARENT ) )
+ if( rBackground != COL_TRANSPARENT )
{
aBackgroundComponent.aBgColor = rBackground;
if( meOutDevType == OUTDEV_PRINTER )
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index f8a34049fb0d..59d2efd26675 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1049,8 +1049,8 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const tools::Rectangle& i_rClipR
o_rMtf.AddAction( new MetaMapModeAction( MapMode( MapUnit::Map100thMM ) ) );
tools::Rectangle aBorderRect( i_rClipRect );
- o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), true ) );
- o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), false ) );
+ o_rMtf.AddAction( new MetaLineColorAction( COL_BLACK, true ) );
+ o_rMtf.AddAction( new MetaFillColorAction( COL_TRANSPARENT, false ) );
o_rMtf.AddAction( new MetaRectAction( aBorderRect ) );
// restore gstate
@@ -1260,7 +1260,7 @@ DrawModeFlags PrinterController::removeTransparencies( GDIMetaFile const & i_rIn
// in N-Up printing we have no "page" background operation
// we also have no way to determine the paper color
// so let's go for white, which will kill 99.9% of the real cases
- aBg = Color( COL_WHITE );
+ aBg = COL_WHITE;
}
mpImplData->mxPrinter->RemoveTransparenciesFromMetaFile( i_rIn, o_rOut, nMaxBmpDPIX, nMaxBmpDPIY,
rPrinterOptions.IsReduceTransparency(),
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index c4e77c0489a2..a3a12575ebab 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -2169,7 +2169,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile const & r
if( pAct->IsSetting() )
aSaveFont.SetFillColor( pAct->GetColor() );
else
- aSaveFont.SetFillColor( Color( COL_TRANSPARENT ) );
+ aSaveFont.SetFillColor( COL_TRANSPARENT );
rSaveVDev.SetFont( aSaveFont );
ImplWriteFont( rOStm, rSaveVDev.GetFont(), rActualCharSet );
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index a867494400eb..bcd5541dcd7e 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -181,7 +181,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
}
// virtual devices have white background by default
- SetBackground( Wallpaper( Color( COL_WHITE ) ) );
+ SetBackground( Wallpaper( COL_WHITE ) );
// #i59283# don't erase user-provided surface
if( !pData && bErase)
@@ -399,10 +399,10 @@ bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
}
// TODO: copy full outdev state to new one, here. Also needed in outdev2.cxx:DrawOutDev
- if( GetLineColor() != Color( COL_TRANSPARENT ) )
+ if( GetLineColor() != COL_TRANSPARENT )
mpAlphaVDev->SetLineColor( COL_BLACK );
- if( GetFillColor() != Color( COL_TRANSPARENT ) )
+ if( GetFillColor() != COL_TRANSPARENT )
mpAlphaVDev->SetFillColor( COL_BLACK );
mpAlphaVDev->SetMapMode( GetMapMode() );
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 4fac49ed8d6c..ca02fba67e96 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -967,9 +967,9 @@ Color OutputDevice::GetSingleColorGradientFill()
assert( mnDrawMode & ( DrawModeFlags::BlackGradient | DrawModeFlags::WhiteGradient | DrawModeFlags::SettingsGradient) );
if ( mnDrawMode & DrawModeFlags::BlackGradient )
- aColor = Color( COL_BLACK );
+ aColor = COL_BLACK;
else if ( mnDrawMode & DrawModeFlags::WhiteGradient )
- aColor = Color( COL_WHITE );
+ aColor = COL_WHITE;
else if ( mnDrawMode & DrawModeFlags::SettingsGradient )
aColor = GetSettings().GetStyleSettings().GetWindowColor();
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 1a70ec978494..2059aa364824 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -58,9 +58,9 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
Color aColor( rHatch.GetColor() );
if ( mnDrawMode & DrawModeFlags::BlackLine )
- aColor = Color( COL_BLACK );
+ aColor = COL_BLACK;
else if ( mnDrawMode & DrawModeFlags::WhiteLine )
- aColor = Color( COL_WHITE );
+ aColor = COL_WHITE;
else if ( mnDrawMode & DrawModeFlags::GrayLine )
{
const sal_uInt8 cLum = aColor.GetLuminance();
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 10951910fb48..d68fe55ad53b 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -95,8 +95,8 @@ OutputDevice::OutputDevice() :
mbOutput = true;
mbDevOutput = false;
mbOutputClipped = false;
- maTextColor = Color( COL_BLACK );
- maOverlineColor = Color( COL_TRANSPARENT );
+ maTextColor = COL_BLACK;
+ maOverlineColor = COL_TRANSPARENT;
meRasterOp = RasterOp::OverPaint;
mnAntialiasing = AntialiasingFlags::NONE;
meTextLanguage = LANGUAGE_SYSTEM; // TODO: get default from configuration?
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 07b7d1cfa85e..fa4ee99a82a4 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -319,7 +319,7 @@ void OutputDevice::SetFillColor()
{
mbInitFillColor = true;
mbFillColor = false;
- maFillColor = Color( COL_TRANSPARENT );
+ maFillColor = COL_TRANSPARENT;
}
if( mpAlphaVDev )
@@ -339,11 +339,11 @@ void OutputDevice::SetFillColor( const Color& rColor )
{
if( mnDrawMode & DrawModeFlags::BlackFill )
{
- aColor = Color( COL_BLACK );
+ aColor = COL_BLACK;
}
else if( mnDrawMode & DrawModeFlags::WhiteFill )
{
- aColor = Color( COL_WHITE );
+ aColor = COL_WHITE;
}
else if( mnDrawMode & DrawModeFlags::GrayFill )
{
@@ -352,7 +352,7 @@ void OutputDevice::SetFillColor( const Color& rColor )
}
else if( mnDrawMode & DrawModeFlags::NoFill )
{
- aColor = Color( COL_TRANSPARENT );
+ aColor = COL_TRANSPARENT;
}
else if( mnDrawMode & DrawModeFlags::SettingsFill )
{
@@ -377,7 +377,7 @@ void OutputDevice::SetFillColor( const Color& rColor )
{
mbInitFillColor = true;
mbFillColor = false;
- maFillColor = Color( COL_TRANSPARENT );
+ maFillColor = COL_TRANSPARENT;
}
}
else
@@ -404,7 +404,7 @@ void OutputDevice::SetLineColor()
{
mbInitLineColor = true;
mbLineColor = false;
- maLineColor = Color( COL_TRANSPARENT );
+ maLineColor = COL_TRANSPARENT;
}
if( mpAlphaVDev )
@@ -425,7 +425,7 @@ void OutputDevice::SetLineColor( const Color& rColor )
{
mbInitLineColor = true;
mbLineColor = false;
- maLineColor = Color( COL_TRANSPARENT );
+ maLineColor = COL_TRANSPARENT;
}
}
else
@@ -477,9 +477,9 @@ void OutputDevice::SetFont( const vcl::Font& rNewFont )
Color aTextColor( aFont.GetColor() );
if ( mnDrawMode & DrawModeFlags::BlackText )
- aTextColor = Color( COL_BLACK );
+ aTextColor = COL_BLACK;
else if ( mnDrawMode & DrawModeFlags::WhiteText )
- aTextColor = Color( COL_WHITE );
+ aTextColor = COL_WHITE;
else if ( mnDrawMode & DrawModeFlags::GrayText )
{
const sal_uInt8 cLum = aTextColor.GetLuminance();
@@ -503,9 +503,9 @@ void OutputDevice::SetFont( const vcl::Font& rNewFont )
Color aTextFillColor( aFont.GetFillColor() );
if ( mnDrawMode & DrawModeFlags::BlackFill )
- aTextFillColor = Color( COL_BLACK );
+ aTextFillColor = COL_BLACK;
else if ( mnDrawMode & DrawModeFlags::WhiteFill )
- aTextFillColor = Color( COL_WHITE );
+ aTextFillColor = COL_WHITE;
else if ( mnDrawMode & DrawModeFlags::GrayFill )
{
const sal_uInt8 cLum = aTextFillColor.GetLuminance();
@@ -515,7 +515,7 @@ void OutputDevice::SetFont( const vcl::Font& rNewFont )
aTextFillColor = GetSettings().GetStyleSettings().GetWindowColor();
else if ( mnDrawMode & DrawModeFlags::NoFill )
{
- aTextFillColor = Color( COL_TRANSPARENT );
+ aTextFillColor = COL_TRANSPARENT;
bTransFill = true;
}
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index ff2f49df9dbd..695ebf1b69af 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -221,7 +221,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
aFont.SetOrientation( 0 );
aFont.SetFontSize( Size( mpFontInstance->maFontSelData.mnWidth, mpFontInstance->maFontSelData.mnHeight ) );
pVDev->SetFont( aFont );
- pVDev->SetTextColor( Color( COL_BLACK ) );
+ pVDev->SetTextColor( COL_BLACK );
pVDev->SetTextFillColor();
pVDev->ImplNewFont();
pVDev->InitFont();
@@ -323,16 +323,16 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
// we don't have a automatic color, so black is always drawn on white
if ( aTextColor.GetColor() == COL_BLACK )
- aTextColor = Color( COL_WHITE );
+ aTextColor = COL_WHITE;
if ( aTextLineColor.GetColor() == COL_BLACK )
- aTextLineColor = Color( COL_WHITE );
+ aTextLineColor = COL_WHITE;
if ( aOverlineColor.GetColor() == COL_BLACK )
- aOverlineColor = Color( COL_WHITE );
+ aOverlineColor = COL_WHITE;
// relief-color is black for white text, in all other cases
// we set this to LightGray
if ( aTextColor.GetColor() == COL_WHITE )
- aReliefColor = Color( COL_BLACK );
+ aReliefColor = COL_BLACK;
SetTextLineColor( aReliefColor );
SetOverlineColor( aReliefColor );
SetTextColor( aReliefColor );
@@ -375,9 +375,9 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
SetOverlineColor();
if ( (GetTextColor().GetColor() == COL_BLACK)
|| (GetTextColor().GetLuminance() < 8) )
- SetTextColor( Color( COL_LIGHTGRAY ) );
+ SetTextColor( COL_LIGHTGRAY );
else
- SetTextColor( Color( COL_BLACK ) );
+ SetTextColor( COL_BLACK );
ImplInitTextColor();
rSalLayout.DrawBase() += Point( nOff, nOff );
ImplDrawTextDirect( rSalLayout, mbTextLines );
@@ -411,9 +411,9 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
ImplDrawTextDirect( rSalLayout, mbTextLines );
rSalLayout.DrawBase() = aOrigPos;
- SetTextColor( Color( COL_WHITE ) );
- SetTextLineColor( Color( COL_WHITE ) );
- SetOverlineColor( Color( COL_WHITE ) );
+ SetTextColor( COL_WHITE );
+ SetTextLineColor( COL_WHITE );
+ SetOverlineColor( COL_WHITE );
ImplInitTextColor();
ImplDrawTextDirect( rSalLayout, mbTextLines );
SetTextColor( aOldColor );
@@ -662,9 +662,9 @@ void OutputDevice::SetTextColor( const Color& rColor )
DrawModeFlags::SettingsText ) )
{
if ( mnDrawMode & DrawModeFlags::BlackText )
- aColor = Color( COL_BLACK );
+ aColor = COL_BLACK;
else if ( mnDrawMode & DrawModeFlags::WhiteText )
- aColor = Color( COL_WHITE );
+ aColor = COL_WHITE;
else if ( mnDrawMode & DrawModeFlags::GrayText )
{
const sal_uInt8 cLum = aColor.GetLuminance();
@@ -700,8 +700,8 @@ void OutputDevice::SetTextFillColor()
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), false ) );
- if ( maFont.GetColor() != Color( COL_TRANSPARENT ) ) {
- maFont.SetFillColor( Color( COL_TRANSPARENT ) );
+ if ( maFont.GetColor() != COL_TRANSPARENT ) {
+ maFont.SetFillColor( COL_TRANSPARENT );
}
if ( !maFont.IsTransparent() )
maFont.SetTransparent( true );
@@ -723,9 +723,9 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
DrawModeFlags::GhostedFill | DrawModeFlags::SettingsFill ) )
{
if ( mnDrawMode & DrawModeFlags::BlackFill )
- aColor = Color( COL_BLACK );
+ aColor = COL_BLACK;
else if ( mnDrawMode & DrawModeFlags::WhiteFill )
- aColor = Color( COL_WHITE );
+ aColor = COL_WHITE;
else if ( mnDrawMode & DrawModeFlags::GrayFill )
{
const sal_uInt8 cLum = aColor.GetLuminance();
@@ -735,7 +735,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
aColor = GetSettings().GetStyleSettings().GetWindowColor();
else if ( mnDrawMode & DrawModeFlags::NoFill )
{
- aColor = Color( COL_TRANSPARENT );
+ aColor = COL_TRANSPARENT;
bTransFill = true;
}
@@ -763,7 +763,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
Color OutputDevice::GetTextFillColor() const
{
if ( maFont.IsTransparent() )
- return Color( COL_TRANSPARENT );
+ return COL_TRANSPARENT;
else
return maFont.GetFillColor();
}
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 2ee5a8b91017..be8f55e902cf 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -816,7 +816,7 @@ void OutputDevice::SetTextLineColor()
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), false ) );
- maTextLineColor = Color( COL_TRANSPARENT );
+ maTextLineColor = COL_TRANSPARENT;
if( mpAlphaVDev )
mpAlphaVDev->SetTextLineColor();
@@ -833,11 +833,11 @@ void OutputDevice::SetTextLineColor( const Color& rColor )
{
if ( mnDrawMode & DrawModeFlags::BlackText )
{
- aColor = Color( COL_BLACK );
+ aColor = COL_BLACK;
}
else if ( mnDrawMode & DrawModeFlags::WhiteText )
{
- aColor = Color( COL_WHITE );
+ aColor = COL_WHITE;
}
else if ( mnDrawMode & DrawModeFlags::GrayText )
{
@@ -873,7 +873,7 @@ void OutputDevice::SetOverlineColor()
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaOverlineColorAction( Color(), false ) );
- maOverlineColor = Color( COL_TRANSPARENT );
+ maOverlineColor = COL_TRANSPARENT;
if( mpAlphaVDev )
mpAlphaVDev->SetOverlineColor();
@@ -890,11 +890,11 @@ void OutputDevice::SetOverlineColor( const Color& rColor )
{
if ( mnDrawMode & DrawModeFlags::BlackText )
{
- aColor = Color( COL_BLACK );
+ aColor = COL_BLACK;
}
else if ( mnDrawMode & DrawModeFlags::WhiteText )
{
- aColor = Color( COL_WHITE );
+ aColor = COL_WHITE;
}
else if ( mnDrawMode & DrawModeFlags::GrayText )
{
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index b88b6ceb0b61..4b7f72c6017f 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -88,11 +88,11 @@ Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) const
{
if( nDrawMode & DrawModeFlags::BlackLine )
{
- aColor = Color( COL_BLACK );
+ aColor = COL_BLACK;
}
else if( nDrawMode & DrawModeFlags::WhiteLine )
{
- aColor = Color( COL_WHITE );
+ aColor = COL_WHITE;
}
else if( nDrawMode & DrawModeFlags::GrayLine )
{
@@ -168,7 +168,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
if( aMask.IsEmpty() )
{
aMask = Bitmap( aSrcRect.GetSize(), 1 );
- aMask.Erase( Color( COL_BLACK ) );
+ aMask.Erase( COL_BLACK );
}
// do painting
@@ -475,7 +475,7 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
{
BitmapColor aPixCol;
const BitmapColor aFillCol( GetFillColor() );
- const BitmapColor aBlack( pR->GetBestMatchingColor( Color( COL_BLACK ) ) );
+ const BitmapColor aBlack( pR->GetBestMatchingColor( Color(COL_BLACK) ) );
const long nWidth = pW->Width();
const long nHeight = pW->Height();
const long nR = aFillCol.GetRed();
@@ -802,7 +802,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
xVDev->DrawGradient( tools::Rectangle( rPos, rSize ), rTransparenceGradient );
xVDev->SetDrawMode( DrawModeFlags::Default );
xVDev->EnableMapMode( false );
- xVDev->DrawMask( Point(), xVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) );
+ xVDev->DrawMask( Point(), xVDev->GetOutputSizePixel(), aMask, COL_WHITE );
aAlpha = xVDev->GetBitmap( Point(), xVDev->GetOutputSizePixel() );
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 8b30b88a754d..65d9b995530b 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -488,9 +488,9 @@ void ImplDrawButton( OutputDevice *const pDev, tools::Rectangle aFillRect,
{
// Hack: in monochrome mode on printers we like to have grey buttons
if ( pDev->GetOutDevType() == OUTDEV_PRINTER )
- pDev->SetFillColor( Color( COL_LIGHTGRAY ) );
+ pDev->SetFillColor( COL_LIGHTGRAY );
else
- pDev->SetFillColor( Color( COL_WHITE ) );
+ pDev->SetFillColor( COL_WHITE );
pDev->DrawRect( aFillRect );
}
}
@@ -634,12 +634,12 @@ void ImplDrawFrame( OutputDevice *const pDev, tools::Rectangle& rRect,
if (
(bRound && aColor.IsDark()) ||
(
- (aColor == Color(COL_BLACK)) &&
+ (aColor == COL_BLACK) &&
pDev->GetSettings().GetStyleSettings().GetFaceColor().IsDark()
)
)
{
- aColor = Color( COL_WHITE );
+ aColor = COL_WHITE;
}
ImplDrawDPILineRect( pDev, rRect, &aColor, bRound );
}
@@ -842,8 +842,8 @@ void DecorationView::DrawHighlightFrame( const tools::Rectangle& rRect,
if ( (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ||
(mpOutDev->GetOutDevType() == OUTDEV_PRINTER) )
{
- aLightColor = Color( COL_BLACK );
- aShadowColor = Color( COL_BLACK );
+ aLightColor = COL_BLACK;
+ aShadowColor = COL_BLACK;
}
else
{
@@ -851,7 +851,7 @@ void DecorationView::DrawHighlightFrame( const tools::Rectangle& rRect,
if ( aBackground.IsBitmap() || aBackground.IsGradient() )
{
aLightColor = rStyleSettings.GetFaceColor();
- aShadowColor = Color( COL_BLACK );
+ aShadowColor = COL_BLACK;
}
else
{
@@ -859,8 +859,8 @@ void DecorationView::DrawHighlightFrame( const tools::Rectangle& rRect,
if ( (aLightColor.GetColorError( aBackColor ) < 32) ||
(aShadowColor.GetColorError( aBackColor ) < 32) )
{
- aLightColor = Color( COL_WHITE );
- aShadowColor = Color( COL_BLACK );
+ aLightColor = COL_WHITE;
+ aShadowColor = COL_BLACK;
if ( aLightColor.GetColorError( aBackColor ) < 32 )
aLightColor.DecreaseLuminance( 64 );
@@ -1009,7 +1009,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
mpOutDev->Push( PushFlags::LINECOLOR );
if ( rStyleSettings.GetOptions() & StyleSettingsOptions::Mono )
- mpOutDev->SetLineColor( Color( COL_BLACK ) );
+ mpOutDev->SetLineColor( COL_BLACK );
else
mpOutDev->SetLineColor( rStyleSettings.GetShadowColor() );
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 72a4198513ce..b4ab69cccfee 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -129,9 +129,9 @@ void lclDrawMoreIndicator(vcl::RenderContext& rRenderContext, const tools::Recta
rRenderContext.SetLineColor();
if (rRenderContext.GetSettings().GetStyleSettings().GetFaceColor().IsDark())
- rRenderContext.SetFillColor(Color(COL_WHITE));
+ rRenderContext.SetFillColor(COL_WHITE);
else
- rRenderContext.SetFillColor(Color(COL_BLACK));
+ rRenderContext.SetFillColor(COL_BLACK);
float fScaleFactor = rRenderContext.GetDPIScaleFactor();
int linewidth = 1 * fScaleFactor;
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 18339eec8c11..c25c29e49db0 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -944,7 +944,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
rStyleSettings.GetHighContrastMode())
{
rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::MAPMODE);
- rRenderContext.SetLineColor(Color(COL_WHITE));
+ rRenderContext.SetLineColor(COL_WHITE);
rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
Size aSize = GetSizePixel();
rRenderContext.DrawLine(Point(0, aSize.Height() - 1),
@@ -1109,7 +1109,7 @@ void MenuBarWindow::ImplInitStyleSettings()
ImplGetFrame()->UpdateSettings(aSettings); // to update persona
StyleSettings aStyle(aSettings.GetStyleSettings());
Color aHighlightTextColor = ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor;
- if (aHighlightTextColor != Color(COL_TRANSPARENT))
+ if (aHighlightTextColor != COL_TRANSPARENT)
{
aStyle.SetMenuHighlightTextColor(aHighlightTextColor);
}
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index d1256289168b..6817ff45c485 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -326,7 +326,7 @@ void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vc
Color aSelectionFillColor(aSelectionBorderColor);
bool bDark = rStyles.GetFaceColor().IsDark();
- bool bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) );
+ bool bBright = ( rStyles.GetFaceColor() == COL_WHITE );
int c1 = aSelectionBorderColor.GetLuminance();
int c2 = rWindow.GetDisplayBackground().GetColor().GetLuminance();
@@ -361,7 +361,7 @@ void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vc
rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
if (bDrawBorder)
- rRenderContext.SetLineColor(bDark ? Color(COL_WHITE) : (bBright ? Color(COL_BLACK) : aSelectionBorderColor));
+ rRenderContext.SetLineColor(bDark ? COL_WHITE : (bBright ? COL_BLACK : aSelectionBorderColor));
else
rRenderContext.SetLineColor();
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 396cc69a9b2d..5c10cc161d0b 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -75,7 +75,7 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( vcl::Window* i_pParent )
{
SetPaintTransparent( true );
SetBackground();
- maPageVDev->SetBackground( Color( COL_WHITE ) );
+ maPageVDev->SetBackground( Wallpaper(COL_WHITE) );
maHorzDim->Show();
maVertDim->Show();
@@ -103,7 +103,7 @@ void PrintDialog::PrintPreviewWindow::DataChanged( const DataChangedEvent& i_rDC
// react on settings changed
if( i_rDCEvt.GetType() == DataChangedEventType::SETTINGS )
{
- maPageVDev->SetBackground( Color( COL_WHITE ) );
+ maPageVDev->SetBackground( Wallpaper(COL_WHITE) );
}
Window::DataChanged( i_rDCEvt );
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index ee75679c9ded..da263ec2a7b8 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -531,7 +531,7 @@ void ToolBox::ImplErase(vcl::RenderContext& rRenderContext, const tools::Rectang
// choose the same color as the popup will use
rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetFaceGradientColor());
else
- rRenderContext.SetFillColor(Color(COL_WHITE));
+ rRenderContext.SetFillColor(COL_WHITE);
rRenderContext.DrawRect(rRect);
rRenderContext.Pop();
@@ -2425,9 +2425,9 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const tool
rRenderContext.SetLineColor();
if (rRenderContext.GetSettings().GetStyleSettings().GetFaceColor().IsDark())
- rRenderContext.SetFillColor(Color(COL_WHITE));
+ rRenderContext.SetFillColor(COL_WHITE);
else
- rRenderContext.SetFillColor(Color(COL_BLACK));
+ rRenderContext.SetFillColor(COL_BLACK);
float fScaleFactor = rRenderContext.GetDPIScaleFactor();
int linewidth = 1 * fScaleFactor;
@@ -2498,9 +2498,9 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tool
if ( bSetColor )
{
if (rRenderContext.GetSettings().GetStyleSettings().GetFaceColor().IsDark())
- rRenderContext.SetFillColor(Color(COL_WHITE));
+ rRenderContext.SetFillColor(COL_WHITE);
else
- rRenderContext.SetFillColor(Color(COL_BLACK));
+ rRenderContext.SetFillColor(COL_BLACK);
}
float fScaleFactor = rRenderContext.GetDPIScaleFactor();
@@ -2699,7 +2699,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
bool bHighContrastWhite = false;
// check the face color as highcontrast indicator
// because the toolbox itself might have a gradient
- if (rStyleSettings.GetFaceColor() == Color(COL_WHITE))
+ if (rStyleSettings.GetFaceColor() == COL_WHITE)
bHighContrastWhite = true;
// Compute buttons area.
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index c1e5d9ab4d7d..d61d8ae6d60d 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -991,7 +991,7 @@ static Image ImplRotImage( const Image& rImage, long nAngle10 )
{
BitmapEx aRotBitmapEx( rImage.GetBitmapEx() );
- aRotBitmapEx.Rotate( nAngle10, Color( COL_WHITE ) );
+ aRotBitmapEx.Rotate( nAngle10, COL_WHITE );
return Image( aRotBitmapEx );
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 4540cfdf3dcd..5571e74a4cea 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -622,8 +622,8 @@ WindowImpl::WindowImpl( WindowType nType )
mpCursor = nullptr; // cursor
mpVCLXWindow = nullptr;
mpAccessibleInfos = nullptr;
- maControlForeground = Color( COL_TRANSPARENT ); // no foreground set
- maControlBackground = Color( COL_TRANSPARENT ); // no background set
+ maControlForeground = COL_TRANSPARENT; // no foreground set
+ maControlBackground = COL_TRANSPARENT; // no background set
mnLeftBorder = 0; // left border
mnTopBorder = 0; // top border
mnRightBorder = 0; // right border
@@ -3398,7 +3398,7 @@ void Window::DrawSelectionBackground( const tools::Rectangle& rRect,
Color aSelectionFillCol( aSelectionBorderCol );
bool bDark = rStyles.GetFaceColor().IsDark();
- bool bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) );
+ bool bBright = ( rStyles.GetFaceColor() == COL_WHITE );
int c1 = aSelectionBorderCol.GetLuminance();
int c2 = GetDisplayBackground().GetColor().GetLuminance();
@@ -3419,7 +3419,7 @@ void Window::DrawSelectionBackground( const tools::Rectangle& rRect,
Color oldLineCol = GetLineColor();
if( bDrawBorder )
- SetLineColor( bDark ? Color(COL_WHITE) : ( bBright ? Color(COL_BLACK) : aSelectionBorderCol ) );
+ SetLineColor( bDark ? COL_WHITE : ( bBright ? COL_BLACK : aSelectionBorderCol ) );
else
SetLineColor();
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 72896dbce9fe..b46fae5c3f09 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -523,7 +523,7 @@ void Window::SetControlForeground()
{
if (mpWindowImpl->mbControlForeground)
{
- mpWindowImpl->maControlForeground = Color(COL_TRANSPARENT);
+ mpWindowImpl->maControlForeground = COL_TRANSPARENT;
mpWindowImpl->mbControlForeground = false;
CompatStateChanged(StateChangedType::ControlForeground);
}
@@ -535,7 +535,7 @@ void Window::SetControlForeground(const Color& rColor)
{
if (mpWindowImpl->mbControlForeground)
{
- mpWindowImpl->maControlForeground = Color(COL_TRANSPARENT);
+ mpWindowImpl->maControlForeground = COL_TRANSPARENT;
mpWindowImpl->mbControlForeground = false;
CompatStateChanged(StateChangedType::ControlForeground);
}
@@ -563,7 +563,7 @@ void Window::SetControlBackground()
{
if (mpWindowImpl->mbControlBackground)
{
- mpWindowImpl->maControlBackground = Color(COL_TRANSPARENT);
+ mpWindowImpl->maControlBackground = COL_TRANSPARENT;
mpWindowImpl->mbControlBackground = false;
CompatStateChanged(StateChangedType::ControlBackground);
}
@@ -575,7 +575,7 @@ void Window::SetControlBackground(const Color& rColor)
{
if (mpWindowImpl->mbControlBackground)
{
- mpWindowImpl->maControlBackground = Color(COL_TRANSPARENT);
+ mpWindowImpl->maControlBackground = COL_TRANSPARENT;
mpWindowImpl->mbControlBackground = false;
CompatStateChanged(StateChangedType::ControlBackground);
}
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index 5da3e9637d74..68f4a2c4ea75 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -355,8 +355,8 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
rPal.SetEntryCount( 2 );
pDstPal = &rPal;
- rPal[ 0 ] = Color( COL_BLACK );
- rPal[ 1 ] = Color( COL_WHITE );
+ rPal[ 0 ] = Color(COL_BLACK);
+ rPal[ 1 ] = Color(COL_WHITE);
}
else if( pImage->depth == 8 && bGrey )
{
@@ -518,8 +518,8 @@ XImage* X11SalBitmap::ImplCreateXImage(
if( pImage->depth == 1 )
{
xPal.reset(new BitmapPalette( 2 ));
- (*xPal)[ 0 ] = Color( COL_BLACK );
- (*xPal)[ 1 ] = Color( COL_WHITE );
+ (*xPal)[ 0 ] = Color(COL_BLACK);
+ (*xPal)[ 1 ] = Color(COL_WHITE);
}
else if( pImage->depth == 8 && mbGrey )
{
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index ba0aac67b129..4bdf8469671b 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -2400,7 +2400,7 @@ void X11SalFrame::UpdateSettings( AllSettings& rSettings )
{
StyleSettings aStyleSettings = rSettings.GetStyleSettings();
aStyleSettings.SetCursorBlinkTime( 500 );
- aStyleSettings.SetMenuBarTextColor( aStyleSettings.GetPersonaMenuBarTextColor().get_value_or( Color( COL_BLACK ) ) );
+ aStyleSettings.SetMenuBarTextColor( aStyleSettings.GetPersonaMenuBarTextColor().get_value_or( COL_BLACK ) );
rSettings.SetStyleSettings( aStyleSettings );
}
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 277a370486a8..341b509905ba 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -151,7 +151,7 @@ void setupMethodStubs( functor_vector_type& res )
const Wallpaper aWallpaper( aWhiteColor );
GDIMetaFile aMtf;
- aMtf.AddAction( new MetaFillColorAction(Color(COL_RED),true) );
+ aMtf.AddAction( new MetaFillColorAction(COL_RED,true) );
aMtf.AddAction( new MetaRectAction(aRect) );
#ifdef FIXME_NEEDS_LOVE
@@ -630,38 +630,38 @@ void outDevGrind(vcl::RenderContext& rTarget)
const functor_vector_type::const_iterator end = aMethods.end();
while( iter != end )
{
- rTarget.SetLineColor( Color(COL_BLACK) );
- rTarget.SetFillColor( Color(COL_GREEN) );
+ rTarget.SetLineColor( COL_BLACK );
+ rTarget.SetFillColor( COL_GREEN );
rTarget.SetRasterOp( RasterOp::OverPaint );
rTarget.SetClipRegion();
grindFunc( rTarget, iter, nTurns, "w/o clip, w/o xor" );
- rTarget.SetLineColor( Color(COL_BLACK) );
- rTarget.SetFillColor( Color(COL_GREEN) );
+ rTarget.SetLineColor( COL_BLACK );
+ rTarget.SetFillColor( COL_GREEN );
rTarget.SetRasterOp( RasterOp::OverPaint );
rTarget.SetClipRegion( vcl::Region( aClipRect ) );
grindFunc( rTarget, iter, nTurns, "with rect clip, w/o xor" );
- rTarget.SetLineColor( Color(COL_BLACK) );
- rTarget.SetFillColor( Color(COL_GREEN) );
+ rTarget.SetLineColor( COL_BLACK );
+ rTarget.SetFillColor( COL_GREEN );
rTarget.SetRasterOp( RasterOp::OverPaint );
rTarget.SetClipRegion( vcl::Region( aClipPoly ) );
grindFunc( rTarget, iter, nTurns, "with complex clip, w/o xor" );
- rTarget.SetLineColor( Color(COL_BLACK) );
- rTarget.SetFillColor( Color(COL_GREEN) );
+ rTarget.SetLineColor( COL_BLACK );
+ rTarget.SetFillColor( COL_GREEN );
rTarget.SetRasterOp( RasterOp::Xor );
rTarget.SetClipRegion();
grindFunc( rTarget, iter, nTurns, "w/o clip, with xor" );
- rTarget.SetLineColor( Color(COL_BLACK) );
- rTarget.SetFillColor( Color(COL_GREEN) );
+ rTarget.SetLineColor( COL_BLACK );
+ rTarget.SetFillColor( COL_GREEN );
rTarget.SetRasterOp( RasterOp::Xor );
rTarget.SetClipRegion( vcl::Region( aClipRect ) );
grindFunc( rTarget, iter, nTurns, "with rect clip, with xor" );
- rTarget.SetLineColor( Color(COL_BLACK) );
- rTarget.SetFillColor( Color(COL_GREEN) );
+ rTarget.SetLineColor( COL_BLACK );
+ rTarget.SetFillColor( COL_GREEN );
rTarget.SetRasterOp( RasterOp::Xor );
rTarget.SetClipRegion( vcl::Region( aClipPoly ) );
grindFunc( rTarget, iter, nTurns, "with complex clip, with xor" );
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index dc170e644fb7..3b502340bd53 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -292,7 +292,7 @@ public:
} aPoints[] = {
{ 0.2, 0.2 }, { 0.8, 0.3 }, { 0.7, 0.8 }
};
- rDev.SetLineColor(Color(COL_BLACK));
+ rDev.SetLineColor(COL_BLACK);
basegfx::B2DPolygon aPoly;
tools::Rectangle aSub(aRegions[i]);
for (size_t j = 0; j < SAL_N_ELEMENTS(aPoints); j++)
@@ -305,8 +305,8 @@ public:
}
else
{
- rDev.SetFillColor(Color(COL_LIGHTRED));
- rDev.SetLineColor(Color(COL_BLACK));
+ rDev.SetFillColor(COL_LIGHTRED);
+ rDev.SetLineColor(COL_BLACK);
rDev.DrawRect(r);
for(long i=0; i<r.GetHeight(); i+=15)
@@ -730,8 +730,8 @@ public:
r.GetHeight()-nDy*2));
tools::Polygon aPoly(aShrunk);
tools::PolyPolygon aPPoly(aPoly);
- rDev.SetLineColor(Color(COL_RED));
- rDev.SetFillColor(Color(COL_RED));
+ rDev.SetLineColor(COL_RED);
+ rDev.SetFillColor(COL_RED);
// This hits the optional 'drawPolyPolygon' code-path
rDev.DrawTransparent(aPPoly, 64);
}
@@ -753,8 +753,8 @@ public:
virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
- rDev.SetLineColor(Color(COL_RED));
- rDev.SetFillColor(Color(COL_GREEN));
+ rDev.SetLineColor(COL_RED);
+ rDev.SetFillColor(COL_GREEN);
rDev.DrawEllipse(r);
if (rCtx.meStyle == RENDER_EXPANDED)
@@ -952,8 +952,8 @@ public:
aSubRect.GetHeight() * aPoints[v].nY),
v);
}
- rDev.SetLineColor(Color(COL_YELLOW));
- rDev.SetFillColor(Color(COL_BLACK));
+ rDev.SetLineColor(COL_YELLOW);
+ rDev.SetFillColor(COL_BLACK);
rDev.DrawPolygon(aPoly);
// now move and add to the polypolygon
@@ -961,8 +961,8 @@ public:
aPolyPoly.Insert(aPoly);
}
}
- rDev.SetLineColor(Color(COL_LIGHTRED));
- rDev.SetFillColor(Color(COL_GREEN));
+ rDev.SetLineColor(COL_LIGHTRED);
+ rDev.SetFillColor(COL_GREEN);
rDev.DrawTransparent(aPolyPoly, 50);
}
};