summaryrefslogtreecommitdiff
path: root/vcl/workben
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/workben
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/workben')
-rw-r--r--vcl/workben/outdevgrind.cxx26
-rw-r--r--vcl/workben/vcldemo.cxx22
2 files changed, 24 insertions, 24 deletions
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);
}
};