summaryrefslogtreecommitdiff
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
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>
-rw-r--r--basctl/source/basicide/baside2.cxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx4
-rw-r--r--basctl/source/dlged/dlged.cxx2
-rw-r--r--canvas/workben/canvasdemo.cxx6
-rw-r--r--chart2/source/controller/accessibility/AccessibleBase.cxx2
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx4
-rw-r--r--chart2/source/view/axes/VPolarAngleAxis.cxx2
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx6
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx6
-rw-r--r--cui/source/customize/SvxToolbarConfigPage.cxx2
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--cui/source/dialogs/screenshotannotationdlg.cxx2
-rw-r--r--cui/source/options/fontsubs.cxx2
-rw-r--r--cui/source/options/optcolor.cxx6
-rw-r--r--cui/source/tabpages/backgrnd.cxx6
-rw-r--r--cui/source/tabpages/chardlg.cxx8
-rw-r--r--cui/source/tabpages/grfpage.cxx4
-rw-r--r--cui/source/tabpages/numpages.cxx4
-rw-r--r--cui/source/tabpages/tpcolor.cxx2
-rw-r--r--cui/source/tabpages/tptrans.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx2
-rw-r--r--desktop/source/lib/init.cxx4
-rw-r--r--desktop/source/splash/splash.cxx6
-rw-r--r--drawinglayer/source/tools/converters.cxx2
-rw-r--r--editeng/source/editeng/eerdll.cxx6
-rw-r--r--editeng/source/editeng/impedit3.cxx6
-rw-r--r--editeng/source/items/frmitems.cxx2
-rw-r--r--editeng/source/items/svxfont.cxx2
-rw-r--r--editeng/source/items/textitem.cxx2
-rw-r--r--editeng/source/outliner/outliner.cxx2
-rw-r--r--editeng/source/rtf/rtfitem.cxx4
-rw-r--r--emfio/inc/mtftools.hxx2
-rw-r--r--emfio/source/reader/mtftools.cxx26
-rw-r--r--emfio/source/reader/wmfreader.cxx4
-rw-r--r--extensions/source/scanner/grid.cxx6
-rw-r--r--extensions/source/scanner/sanedlg.cxx4
-rw-r--r--filter/source/flash/swfwriter.cxx2
-rw-r--r--filter/source/flash/swfwriter1.cxx10
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx12
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx6
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx2
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx64
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx34
-rw-r--r--filter/source/graphicfilter/ipict/shape.cxx2
-rw-r--r--filter/source/msfilter/escherex.cxx2
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--filter/source/msfilter/mstoolbar.cxx2
-rw-r--r--filter/source/msfilter/svdfppt.cxx4
-rw-r--r--filter/source/svg/svgwriter.cxx14
-rw-r--r--filter/source/svg/svgwriter.hxx4
-rw-r--r--forms/source/component/imgprod.cxx4
-rw-r--r--forms/source/solar/control/navtoolbar.cxx2
-rw-r--r--fpicker/source/office/iodlg.cxx2
-rw-r--r--include/svtools/valueset.hxx2
-rw-r--r--include/svx/sdr/overlay/overlaymanager.hxx4
-rw-r--r--include/svx/svdpagv.hxx2
-rw-r--r--include/vcl/outdev.hxx6
-rw-r--r--include/vcl/pdfwriter.hxx6
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx2
-rw-r--r--sc/qa/unit/ucalc.cxx2
-rw-r--r--sc/source/core/data/docpool.cxx4
-rw-r--r--sc/source/core/data/documen3.cxx2
-rw-r--r--sc/source/core/data/global.cxx6
-rw-r--r--sc/source/filter/excel/excrecds.cxx2
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx2
-rw-r--r--sc/source/filter/excel/xistyle.cxx2
-rw-r--r--sc/source/filter/inc/xlview.hxx2
-rw-r--r--sc/source/filter/lotus/lotattr.cxx18
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx6
-rw-r--r--sc/source/ui/condformat/colorformat.cxx6
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx4
-rw-r--r--sc/source/ui/dbgui/csvcontrol.cxx4
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx2
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx2
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx2
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx8
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/tabbgcolordlg.cxx6
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx2
-rw-r--r--sc/source/ui/view/cellsh2.cxx2
-rw-r--r--sc/source/ui/view/cellsh3.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx6
-rw-r--r--sc/source/ui/view/gridwin4.cxx4
-rw-r--r--sc/source/ui/view/output.cxx6
-rw-r--r--sc/source/ui/view/tabsplit.cxx8
-rw-r--r--sd/qa/unit/export-tests.cxx4
-rw-r--r--sd/source/core/drawdoc4.cxx6
-rw-r--r--sd/source/core/stlpool.cxx24
-rw-r--r--sd/source/filter/html/htmlex.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx2
-rw-r--r--sd/source/ui/animations/motionpathtag.cxx2
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx6
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx2
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.cxx2
-rw-r--r--sd/source/ui/dlg/docprev.cxx2
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx2
-rw-r--r--sd/source/ui/slideshow/showwin.cxx12
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx4
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx4
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx2
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx2
-rw-r--r--starmath/source/ElementsDockingWindow.cxx4
-rw-r--r--starmath/source/node.cxx36
-rw-r--r--starmath/source/view.cxx6
-rw-r--r--starmath/source/visitors.cxx6
-rw-r--r--svl/source/numbers/zforscan.cxx20
-rw-r--r--svtools/source/brwbox/brwbox1.cxx2
-rw-r--r--svtools/source/brwbox/brwbox2.cxx8
-rw-r--r--svtools/source/brwbox/datwin.cxx2
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx2
-rw-r--r--svtools/source/contnr/iconview.cxx2
-rw-r--r--svtools/source/contnr/imivctl1.cxx2
-rw-r--r--svtools/source/contnr/svimpbox.cxx2
-rw-r--r--svtools/source/contnr/treelistbox.cxx2
-rw-r--r--svtools/source/control/calendar.cxx2
-rw-r--r--svtools/source/control/headbar.cxx6
-rw-r--r--svtools/source/control/tabbar.cxx22
-rw-r--r--svtools/source/control/valueset.cxx16
-rw-r--r--svtools/source/filter/DocumentToGraphicRenderer.cxx2
-rw-r--r--svtools/source/graphic/grfmgr2.cxx14
-rw-r--r--svtools/source/misc/embedhlp.cxx4
-rw-r--r--svx/source/dialog/_bmpmask.cxx10
-rw-r--r--svx/source/dialog/_contdlg.cxx6
-rw-r--r--svx/source/dialog/contwnd.cxx6
-rw-r--r--svx/source/dialog/ctredlin.cxx4
-rw-r--r--svx/source/dialog/dlgctl3d.cxx4
-rw-r--r--svx/source/dialog/dlgctrl.cxx10
-rw-r--r--svx/source/dialog/framelink.cxx2
-rw-r--r--svx/source/dialog/hexcolorcontrol.cxx2
-rw-r--r--svx/source/dialog/imapwnd.cxx10
-rw-r--r--svx/source/dialog/langbox.cxx2
-rw-r--r--svx/source/dialog/pagectrl.cxx4
-rw-r--r--svx/source/dialog/paraprev.cxx2
-rw-r--r--svx/source/dialog/svxruler.cxx4
-rw-r--r--svx/source/dialog/swframeexample.cxx14
-rw-r--r--svx/source/engine3d/float3d.cxx2
-rw-r--r--svx/source/form/tbxform.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx2
-rw-r--r--svx/source/sdr/overlay/overlayanimatedbitmapex.cxx2
-rw-r--r--svx/source/sdr/overlay/overlaybitmapex.cxx2
-rw-r--r--svx/source/sdr/overlay/overlaycrosshair.cxx2
-rw-r--r--svx/source/sdr/overlay/overlayhelpline.cxx2
-rw-r--r--svx/source/sdr/overlay/overlayline.cxx2
-rw-r--r--svx/source/sdr/overlay/overlaymanager.cxx4
-rw-r--r--svx/source/sdr/overlay/overlaypolypolygon.cxx2
-rw-r--r--svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx2
-rw-r--r--svx/source/sdr/overlay/overlayrollingrectangle.cxx2
-rw-r--r--svx/source/sdr/properties/textproperties.cxx2
-rw-r--r--svx/source/svdraw/svdcrtv.cxx6
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--svx/source/svdraw/svdetc.cxx2
-rw-r--r--svx/source/svdraw/svdhdl.cxx24
-rw-r--r--svx/source/svdraw/svdibrow.cxx6
-rw-r--r--svx/source/svdraw/svdobj.cxx2
-rw-r--r--svx/source/svdraw/svdpntv.cxx2
-rw-r--r--svx/source/table/tablehandles.cxx2
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx4
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx6
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx10
-rw-r--r--svx/source/xoutdev/xattr.cxx4
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2
-rw-r--r--sw/source/core/inc/wrong.hxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx4
-rw-r--r--sw/source/core/text/itrpaint.cxx4
-rw-r--r--sw/source/core/text/redlnitr.cxx2
-rw-r--r--sw/source/core/text/txtdrop.cxx2
-rw-r--r--sw/source/core/text/txtinit.cxx2
-rw-r--r--sw/source/core/text/txtpaint.hxx4
-rw-r--r--sw/source/filter/html/htmlatr.cxx2
-rw-r--r--sw/source/filter/html/svxcss1.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx4
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/config/optpage.cxx32
-rw-r--r--sw/source/ui/misc/num.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx2
-rw-r--r--sw/source/uibase/app/docshini.cxx2
-rw-r--r--sw/source/uibase/config/viewopt.cxx6
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx4
-rw-r--r--sw/source/uibase/docvw/AnnotationMenuButton.cxx2
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx8
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx6
-rw-r--r--sw/source/uibase/lingu/sdrhhcwrap.cxx2
-rw-r--r--sw/source/uibase/misc/swruler.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx2
-rw-r--r--toolkit/source/helper/formpdfexport.cxx2
-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
246 files changed, 891 insertions, 891 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index f27cff062a77..6d6ef01ed0a8 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -101,7 +101,7 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage,
const Color aOldFillColor( pPrinter->GetFillColor() );
const vcl::Font aOldFont( pPrinter->GetFont() );
- pPrinter->SetLineColor( Color( COL_BLACK ) );
+ pPrinter->SetLineColor( COL_BLACK );
pPrinter->SetFillColor();
vcl::Font aFont( aOldFont );
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index b7e0fbe518ad..06604ba9c0b6 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -129,11 +129,11 @@ void lcl_DrawIDEWindowFrame(DockingWindow const * pWin, vcl::RenderContext& rRen
Size aSz(pWin->GetOutputSizePixel());
const Color aOldLineColor(rRenderContext.GetLineColor());
- rRenderContext.SetLineColor(Color(COL_WHITE));
+ rRenderContext.SetLineColor(COL_WHITE);
// White line on top
rRenderContext.DrawLine(Point(0, 0), Point(aSz.Width(), 0));
// Black line at bottom
- rRenderContext.SetLineColor(Color(COL_BLACK));
+ rRenderContext.SetLineColor(COL_BLACK);
rRenderContext.DrawLine(Point(0, aSz.Height() - 1),
Point(aSz.Width(), aSz.Height() - 1));
rRenderContext.SetLineColor(aOldLineColor);
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index b82b5915c43e..ec3a2e0c3045 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -557,7 +557,7 @@ void DlgEditor::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
if (pTargetPaintWindow)
{
OutputDevice& rTargetOutDev = pTargetPaintWindow->GetTargetOutputDevice();
- rTargetOutDev.DrawWallpaper(aPaintRect, Wallpaper(Color(COL_WHITE)));
+ rTargetOutDev.DrawWallpaper(aPaintRect, Wallpaper(COL_WHITE));
}
// do paint (unbuffered) and mark repaint end
diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index 294b7d25c2e4..94e6531d208c 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -112,9 +112,9 @@ class DemoRenderer
maBox(),
maViewState(),
maRenderState(),
- maColorBlack( vcl::unotools::colorToStdColorSpaceSequence( Color(COL_BLACK)) ),
- maColorWhite( vcl::unotools::colorToStdColorSpaceSequence( Color(COL_WHITE)) ),
- maColorRed( vcl::unotools::colorToStdColorSpaceSequence( Color(COL_RED)) ),
+ maColorBlack( vcl::unotools::colorToStdColorSpaceSequence( COL_BLACK) ),
+ maColorWhite( vcl::unotools::colorToStdColorSpaceSequence( COL_WHITE) ),
+ maColorRed( vcl::unotools::colorToStdColorSpaceSequence( COL_RED) ),
mxCanvas(xCanvas),
mxDefaultFont(),
mxDevice( xDevice )
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 354fcc7b83f2..784dc5096b4b 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -731,7 +731,7 @@ sal_Int32 SAL_CALL AccessibleBase::getBackground()
sal_Int32 AccessibleBase::getColor( eColorType eColType )
{
- sal_Int32 nResult = static_cast< sal_Int32 >( Color( COL_TRANSPARENT ).GetColor());
+ sal_Int32 nResult = static_cast< sal_Int32 >( Color(COL_TRANSPARENT).GetColor());
if( m_bAlwaysTransparent )
return nResult;
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 9493102a93c4..2089b2705d40 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -700,7 +700,7 @@ bool VCartesianAxis::createTextShapes(
getAxisLabelProperties(aPropNames, aPropValues, m_aAxisProperties, rAxisLabelProperties, nLimitedSpaceForText, bLimitedHeight);
uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor");
- sal_Int32 nColor = Color( COL_AUTO ).GetColor();
+ sal_Int32 nColor = Color(COL_AUTO).GetColor();
if(pColorAny)
*pColorAny >>= nColor;
@@ -888,7 +888,7 @@ bool VCartesianAxis::createTextShapesSimple(
getAxisLabelProperties(aPropNames, aPropValues, m_aAxisProperties, rAxisLabelProperties, -1, bLimitedHeight);
uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor");
- sal_Int32 nColor = Color( COL_AUTO ).GetColor();
+ sal_Int32 nColor = Color(COL_AUTO).GetColor();
if(pColorAny)
*pColorAny >>= nColor;
diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx
index 7e4132f84321..ee2c7343d760 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -67,7 +67,7 @@ bool VPolarAngleAxis::createTextShapes_ForAngleAxis(
, rAxisLabelProperties.m_aFontReferenceSize );
uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor");
- sal_Int32 nColor = Color( COL_AUTO ).GetColor();
+ sal_Int32 nColor = Color(COL_AUTO).GetColor();
if(pColorAny)
*pColorAny >>= nColor;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 491fc81bf89c..fa08f0325714 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -912,21 +912,21 @@ namespace cppcanvas
::Color aTextColor = vcl::unotools::doubleSequenceToColor(
rState.textColor, xColorSpace );
- aReliefColor = ::Color( COL_LIGHTGRAY );
+ aReliefColor = ::COL_LIGHTGRAY;
// we don't have a automatic color, so black is always
// drawn on white (literally copied from
// vcl/source/gdi/outdev3.cxx)
if( aTextColor.GetColor() == COL_BLACK )
{
- aTextColor = ::Color( COL_WHITE );
+ aTextColor = ::COL_WHITE;
rParms.mrStates.getState().textColor =
vcl::unotools::colorToDoubleSequence(
aTextColor, xColorSpace );
}
if( aTextColor.GetColor() == COL_WHITE )
- aReliefColor = ::Color( COL_BLACK );
+ aReliefColor = ::COL_BLACK;
aReliefColor.SetTransparency( aTextColor.GetTransparency() );
}
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 550b98e699a6..cc5c382187dc 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -1610,7 +1610,7 @@ namespace cppcanvas
mnOutlineWidth( calcOutlineWidth(rState,rVDev) ),
maFillColor(
vcl::unotools::colorToDoubleSequence(
- ::Color( COL_WHITE ),
+ ::COL_WHITE,
rCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace() )),
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
maLinesOverallSize(),
@@ -1652,7 +1652,7 @@ namespace cppcanvas
mnOutlineWidth( calcOutlineWidth(rState,rVDev) ),
maFillColor(
vcl::unotools::colorToDoubleSequence(
- ::Color( COL_WHITE ),
+ ::COL_WHITE,
rCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace() )),
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
maLinesOverallSize(),
@@ -1746,7 +1746,7 @@ namespace cppcanvas
double nOutlineWidth ) :
maFillColor(
vcl::unotools::colorToDoubleSequence(
- ::Color( COL_WHITE ),
+ ::COL_WHITE,
rCanvas->getDevice()->getDeviceColorSpace() )),
mnOutlineWidth( nOutlineWidth ),
mrCanvas( rCanvas ),
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx
index 50511fdecf3e..5e2746ffc66d 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -882,7 +882,7 @@ Image SvxToolbarEntriesListBox::GetSizedImage(
rVDev.DrawImage( aPos, aImage );
// Draw separator line 2 pixels left from the right border
- Color aLineColor = GetDisplayBackground().GetColor().IsDark() ? Color( COL_WHITE ) : Color( COL_BLACK );
+ Color aLineColor = GetDisplayBackground().GetColor().IsDark() ? COL_WHITE : COL_BLACK;
rVDev.SetLineColor( aLineColor );
rVDev.DrawLine( Point( aNewSize.Width()-3, 0 ), Point( aNewSize.Width()-3, aNewSize.Height()-1 ));
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 9b96ccc0e7e4..fbc0e61fa355 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -979,11 +979,11 @@ public:
if (rRenderContext.GetFillColor() == COL_WHITE)
{
- rRenderContext.SetFillColor(Color(COL_BLACK));
+ rRenderContext.SetFillColor(COL_BLACK);
}
else
{
- rRenderContext.SetFillColor(Color(COL_WHITE));
+ rRenderContext.SetFillColor(COL_WHITE);
}
long n = 0;
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx
index b8010a8ef1be..01f14fc446dc 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -510,7 +510,7 @@ void ScreenshotAnnotationDlg_Impl::RepaintToBuffer(
for (auto&& rCandidate : maSelected)
{
static double fLineWidthEntries(5.0);
- PaintControlDataEntry(*rCandidate, Color(COL_LIGHTRED), fLineWidthEntries, fTransparence * 0.2);
+ PaintControlDataEntry(*rCandidate, COL_LIGHTRED, fLineWidthEntries, fTransparence * 0.2);
}
// paint hilighted entry
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index b7ceda7a8576..311668f9c852 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -403,7 +403,7 @@ void SvxFontSubstTabPage::CheckEnable()
if (m_pCheckLB->IsEnabled())
{
m_pCheckLB->DisableTable();
- m_pCheckLB->SetTextColor(Color(COL_GRAY));
+ m_pCheckLB->SetTextColor(COL_GRAY);
m_pCheckLB->Invalidate();
m_pCheckLB->SelectAll(false);
}
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index f4312f67cc22..9bb88e7c412b 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -412,7 +412,7 @@ void ColorConfigWindow_Impl::Entry::Update (
) {
Color aColor(rValue.getColor());
if (rValue.getColor() == rValue.getDefaultColor())
- m_pColorList->SelectEntry(Color(COL_AUTO));
+ m_pColorList->SelectEntry(COL_AUTO);
else
m_pColorList->SelectEntry(aColor);
}
@@ -549,7 +549,7 @@ void ColorConfigWindow_Impl::SetAppearance ()
Wallpaper const aTransparentWall(COL_TRANSPARENT);
StyleSettings const& rStyleSettings = GetSettings().GetStyleSettings();
Color const aBackColor = rStyleSettings.GetHighContrastMode() ?
- rStyleSettings.GetShadowColor() : Color(COL_LIGHTGRAY);
+ rStyleSettings.GetShadowColor() : COL_LIGHTGRAY;
Wallpaper const aBackWall(aBackColor);
for (size_t i = 0; i != vChapters.size(); ++i)
vChapters[i]->Show(aBackWall);
@@ -565,7 +565,7 @@ void ColorConfigWindow_Impl::SetAppearance ()
aRCheckCol.Invert();
// if inversion didn't work (gray) then it's set to black
if (aRCheckCol == aWinCol)
- aRCheckCol = Color(COL_BLACK);
+ aRCheckCol = COL_BLACK;
// setting new text color for each entry
for (size_t i = 0; i != vEntries.size(); ++i)
vEntries[i]->SetTextColor(aRCheckCol);
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index da9e79626002..024a8361b144 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -284,7 +284,7 @@ void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const ::to
if (bIsBmp)
{
- rRenderContext.SetFillColor(Color(COL_TRANSPARENT));
+ rRenderContext.SetFillColor(COL_TRANSPARENT);
}
rRenderContext.DrawRect(aDrawRect);
@@ -759,7 +759,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) )
rCoreSet->ClearItem( nWhich );
}
- else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != Color( COL_WHITE ) )
+ else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != COL_WHITE )
{
rCoreSet->Put( SvxBrushItem( aBgdColor, nWhich ) );
bModified = true;
@@ -1045,7 +1045,7 @@ SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl()
IMPL_LINK_NOARG(SvxBackgroundTabPage, BackgroundColorHdl_Impl, ValueSet*, void)
{
sal_uInt16 nItemId = m_pBackgroundColorSet->GetSelectItemId();
- Color aColor = nItemId ? ( m_pBackgroundColorSet->GetItemColor( nItemId ) ) : Color( COL_TRANSPARENT );
+ Color aColor = nItemId ? ( m_pBackgroundColorSet->GetItemColor( nItemId ) ) : COL_TRANSPARENT;
aBgdColor = aColor;
m_bColorSelected = true;
m_pPreviewWin1->NotifyChange( aBgdColor );
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index a4cba1fa4c52..497dae51e59b 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1370,9 +1370,9 @@ void SvxCharEffectsPage::EnableNoneFontColor()
Color SvxCharEffectsPage::GetPreviewFontColor(const Color& rColor) const
{
if (rColor.GetColor() == COL_AUTO)
- return Color(COL_BLACK);
+ return COL_BLACK;
if (m_bEnableNoneFontColor && rColor == COL_NONE_COLOR)
- return Color(COL_BLACK);
+ return COL_BLACK;
return rColor;
}
@@ -1763,7 +1763,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
}
else
{
- m_pUnderlineColorLB->SelectEntry(Color(COL_AUTO));
+ m_pUnderlineColorLB->SelectEntry(COL_AUTO);
m_pUnderlineColorLB->Disable();
}
}
@@ -1807,7 +1807,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
}
else
{
- m_pOverlineColorLB->SelectEntry(Color(COL_AUTO));
+ m_pOverlineColorLB->SelectEntry(COL_AUTO);
m_pOverlineColorLB->Disable();
}
}
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 3ce3925c937d..c2ecb7e0d912 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -784,7 +784,7 @@ void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re
rRenderContext.SetRasterOp(RasterOp::OverPaint);
rRenderContext.DrawRect(::tools::Rectangle(Point(), aWinSize));
- rRenderContext.SetLineColor(Color(COL_WHITE));
+ rRenderContext.SetLineColor(COL_WHITE);
::tools::Rectangle aRect(Point((aWinSize.Width() - aFrameSize.Width())/2,
(aWinSize.Height() - aFrameSize.Height())/2),
aFrameSize);
@@ -792,7 +792,7 @@ void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re
Size aSz(2, 0);
aSz = rRenderContext.PixelToLogic(aSz);
- rRenderContext.SetFillColor(Color(COL_TRANSPARENT));
+ rRenderContext.SetFillColor(COL_TRANSPARENT);
rRenderContext.SetRasterOp(RasterOp::Invert);
aRect.AdjustLeft(aTopLeft.Y() );
aRect.AdjustTop(aTopLeft.X() );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index e46831efbf59..31217781f427 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1136,7 +1136,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* pParent,
get(m_pPreviewWIN, "preview");
- m_pPreviewWIN->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+ m_pPreviewWIN->SetBackground(Wallpaper(COL_TRANSPARENT));
SetExchangeSupport();
aActBulletFont = lcl_GetDefaultBulletFont();
@@ -2605,7 +2605,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(vcl::Window* pParent,
get(m_pStandardPB, "standard");
get(m_pPreviewWIN, "preview");
- m_pPreviewWIN->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+ m_pPreviewWIN->SetBackground(Wallpaper(COL_TRANSPARENT));
m_pRelativeCB->Check();
m_pAlignLB->SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl));
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 134e6a6f33c2..d9519b32baa0 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -59,7 +59,7 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr
, rOutAttrs ( rInAttrs )
// All the horrific pointers we store and should not
, pnColorListState( nullptr )
- , aXFillColorItem( OUString(), Color( COL_BLACK ) )
+ , aXFillColorItem( OUString(), COL_BLACK )
, aXFillAttr( rInAttrs.GetPool() )
, rXFSet( aXFillAttr.GetItemSet() )
, eCM( ColorModel::RGB )
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index 553e94d232f3..206e46704f4c 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -374,7 +374,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs)
// disable unused XFillFloatTransparenceItem
if(bSwitchOffGradient && (bGradActive || bGradUsed))
{
- XGradient aGrad(COL_BLACK, Color(COL_WHITE));
+ XGradient aGrad(COL_BLACK, COL_WHITE);
aGrad.SetStartIntens(100);
aGrad.SetEndIntens(100);
XFillFloatTransparenceItem aItem(aGrad);
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 256ed0234fca..5c57b4f9d3d0 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -571,7 +571,7 @@ void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const tools:
rRenderContext.DrawImage(aPos, Size(SMALL_ICON_SIZE, SMALL_ICON_SIZE), m_aWarningImage);
}
- rRenderContext.SetLineColor(Color(COL_LIGHTGRAY));
+ rRenderContext.SetLineColor(COL_LIGHTGRAY);
rRenderContext.DrawLine(rRect.BottomLeft(), rRect.BottomRight());
}
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b6d4f6eb5951..fdc02e3128d3 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2031,7 +2031,7 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis,
#if !defined(ANDROID)
// Set background to transparent by default.
- pDevice->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+ pDevice->SetBackground(Wallpaper(COL_TRANSPARENT));
#endif
pDevice->SetOutputSizePixelScaleOffsetAndBuffer(
@@ -3446,7 +3446,7 @@ static void doc_paintWindow(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWind
}
ScopedVclPtrInstance<VirtualDevice> pDevice(nullptr, Size(1, 1), DeviceFormat::DEFAULT);
- pDevice->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+ pDevice->SetBackground(Wallpaper(COL_TRANSPARENT));
pDevice->SetOutputSizePixelScaleOffsetAndBuffer(Size(nWidth, nHeight), Fraction(1.0), Point(), pBuffer);
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index a58b8227d928..b7724ec1e636 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -296,7 +296,7 @@ SplashScreen::initialize( const css::uno::Sequence< css::uno::Any>& aArguments )
_textBaseline = _height;
if ( NOT_LOADED_COLOR == _cProgressFrameColor )
- _cProgressFrameColor = Color( COL_LIGHTGRAY );
+ _cProgressFrameColor = COL_LIGHTGRAY;
if ( NOT_LOADED_COLOR == _cProgressBarColor )
{
@@ -304,11 +304,11 @@ SplashScreen::initialize( const css::uno::Sequence< css::uno::Any>& aArguments )
if ( _width > 500 )
_cProgressBarColor = Color( 157, 202, 18 );
else
- _cProgressBarColor = Color( COL_BLUE );
+ _cProgressBarColor = COL_BLUE;
}
if ( NOT_LOADED_COLOR == _cProgressTextColor )
- _cProgressTextColor = Color( COL_BLACK );
+ _cProgressTextColor = COL_BLACK;
Application::AddEventListener(
LINK( this, SplashScreen, AppEventListenerHdl ) );
diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index cb14d9dbb567..64810162305e 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -74,7 +74,7 @@ namespace drawinglayer
pContent->SetMapMode(aMapModePixel);
// set to all white
- pContent->SetBackground(Wallpaper(Color(COL_WHITE)));
+ pContent->SetBackground(Wallpaper(COL_WHITE));
pContent->Erase();
// create pixel processor, also already takes care of AAing and
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 9033db06b84d..c8feafaedcf4 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -114,7 +114,7 @@ DefItems::DefItems()
rDefItems[17] = new SvxVerJustifyItem( SvxCellVerJustify::Standard, EE_PARA_VER_JUST );
// Character attributes:
- rDefItems[18] = new SvxColorItem( Color( COL_AUTO ), EE_CHAR_COLOR );
+ rDefItems[18] = new SvxColorItem( COL_AUTO, EE_CHAR_COLOR );
rDefItems[19] = new SvxFontItem( EE_CHAR_FONTINFO );
rDefItems[20] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT );
rDefItems[21] = new SvxCharScaleWidthItem( 100, EE_CHAR_FONTWIDTH );
@@ -146,11 +146,11 @@ DefItems::DefItems()
rDefItems[47] = new SvxOverlineItem( LINESTYLE_NONE, EE_CHAR_OVERLINE );
rDefItems[48] = new SvxCaseMapItem( SvxCaseMap::NotMapped, EE_CHAR_CASEMAP );
rDefItems[49] = new SfxGrabBagItem( EE_CHAR_GRABBAG );
- rDefItems[50] = new SvxBackgroundColorItem( Color( COL_AUTO ), EE_CHAR_BKGCOLOR );
+ rDefItems[50] = new SvxBackgroundColorItem( COL_AUTO, EE_CHAR_BKGCOLOR );
// Features
rDefItems[51] = new SfxVoidItem( EE_FEATURE_TAB );
rDefItems[52] = new SfxVoidItem( EE_FEATURE_LINEBR );
- rDefItems[53] = new SvxCharSetColorItem( Color( COL_RED ), EE_FEATURE_NOTCONV );
+ rDefItems[53] = new SvxCharSetColorItem( COL_RED, EE_FEATURE_NOTCONV );
rDefItems[54] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
assert(EDITITEMCOUNT == 55 && "ITEMCOUNT changed, adjust DefItems!");
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index a5879f7bdb6d..cbb8c2b3d3d9 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2875,9 +2875,9 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
else if ( nAttr & ExtTextInputAttr::DashDotUnderline )
rFont.SetUnderline( LINESTYLE_DOTTED );
else 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();
@@ -2889,7 +2889,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
{
rFont.SetUnderline( LINESTYLE_WAVE );
if( pOut )
- pOut->SetTextLineColor( Color( COL_LIGHTGRAY ) );
+ pOut->SetTextLineColor( COL_LIGHTGRAY );
}
}
}
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index f39dc856fb3d..040f1a53fe09 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3055,7 +3055,7 @@ SvxBrushItem::SvxBrushItem(SvStream& rStream, sal_uInt16 nVersion, sal_uInt16 _n
break;
case 0: // BRUSH_NULL:
- aColor = Color( COL_TRANSPARENT );
+ aColor = COL_TRANSPARENT;
break;
default:
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 77a95bfac63a..fff084f04427 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -84,7 +84,7 @@ void SvxFont::DrawArrow( OutputDevice &rOut, const tools::Rectangle& rRect,
Color aOldLineColor = rOut.GetLineColor();
Color aOldFillColor = rOut.GetFillColor();
rOut.SetFillColor( rCol );
- rOut.SetLineColor( Color( COL_BLACK ) );
+ rOut.SetLineColor( COL_BLACK );
rOut.DrawPolygon( aPoly );
rOut.DrawLine( aTmp, aNxt );
rOut.SetLineColor( aOldLineColor );
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 515125461713..a5d8b7925558 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1726,7 +1726,7 @@ SvStream& SvxColorItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
{
if( VERSION_USEAUTOCOLOR == nItemVersion &&
COL_AUTO == mColor.GetColor() )
- WriteColor( rStrm, Color( COL_BLACK ) );
+ WriteColor( rStrm, Color(COL_BLACK) );
else
WriteColor( rStrm, mColor );
return rStrm;
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index f89b715cc428..26fb338b5424 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1073,7 +1073,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
}
const Color& rOldLineColor = pOutDev->GetLineColor();
- pOutDev->SetLineColor( Color( COL_BLACK ) );
+ pOutDev->SetLineColor( COL_BLACK );
pOutDev->DrawLine( aStartPos, aEndPos );
pOutDev->SetLineColor( rOldLineColor );
}
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index be516bbcd4ef..0c81088e140e 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1662,12 +1662,12 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet,
if( USHRT_MAX != nColor )
aCol = GetColor( nColor );
else
- aCol = Color( COL_BLACK );
+ aCol = COL_BLACK;
if( USHRT_MAX != nFillColor )
aFCol = GetColor( nFillColor );
else
- aFCol = Color( COL_WHITE );
+ aFCol = COL_WHITE;
}
Color aColor;
diff --git a/emfio/inc/mtftools.hxx b/emfio/inc/mtftools.hxx
index 6c12078f051e..4dff8d391e0a 100644
--- a/emfio/inc/mtftools.hxx
+++ b/emfio/inc/mtftools.hxx
@@ -336,7 +336,7 @@ namespace emfio
Bitmap aBmp;
WinMtfFillStyle()
- : aFillColor(Color(COL_BLACK))
+ : aFillColor(COL_BLACK)
, bTransparent(false)
, aType(WinMtfFillStyleType::Solid)
{}
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index b0cef5242839..a6caafd8cfe0 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -566,48 +566,48 @@ namespace emfio
{
case WHITE_BRUSH :
{
- maFillStyle = WinMtfFillStyle( Color( COL_WHITE ) );
+ maFillStyle = WinMtfFillStyle( COL_WHITE );
mbFillStyleSelected = true;
}
break;
case LTGRAY_BRUSH :
{
- maFillStyle = WinMtfFillStyle( Color( COL_LIGHTGRAY ) );
+ maFillStyle = WinMtfFillStyle( COL_LIGHTGRAY );
mbFillStyleSelected = true;
}
break;
case GRAY_BRUSH :
case DKGRAY_BRUSH :
{
- maFillStyle = WinMtfFillStyle( Color( COL_GRAY ) );
+ maFillStyle = WinMtfFillStyle( COL_GRAY );
mbFillStyleSelected = true;
}
break;
case BLACK_BRUSH :
{
- maFillStyle = WinMtfFillStyle( Color( COL_BLACK ) );
+ maFillStyle = WinMtfFillStyle( COL_BLACK );
mbFillStyleSelected = true;
}
break;
case NULL_BRUSH :
{
- maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), true );
+ maFillStyle = WinMtfFillStyle( COL_TRANSPARENT, true );
mbFillStyleSelected = true;
}
break;
case WHITE_PEN :
{
- maLineStyle = WinMtfLineStyle( Color( COL_WHITE ) );
+ maLineStyle = WinMtfLineStyle( COL_WHITE );
}
break;
case BLACK_PEN :
{
- maLineStyle = WinMtfLineStyle( Color( COL_BLACK ) );
+ maLineStyle = WinMtfLineStyle( COL_BLACK );
}
break;
case NULL_PEN :
{
- maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), true );
+ maLineStyle = WinMtfLineStyle( COL_TRANSPARENT, true );
}
break;
default:
@@ -1043,8 +1043,8 @@ namespace emfio
{
maNopFillStyle = maFillStyle;
maNopLineStyle = maLineStyle;
- maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), true );
- maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), true );
+ maFillStyle = WinMtfFillStyle( COL_TRANSPARENT, true );
+ maLineStyle = WinMtfLineStyle( COL_TRANSPARENT, true );
mbNopMode = true;
}
}
@@ -1639,7 +1639,7 @@ namespace emfio
}
pVDev->SetMapMode( aMapMode );
pVDev->SetOutputSizePixel( aSizePixel );
- pVDev->SetFillColor( Color( COL_BLACK ) );
+ pVDev->SetFillColor( COL_BLACK );
const tools::PolyPolygon aClip( maClipPath.getClipPath() );
pVDev->DrawPolyPolygon( aClip );
const Point aEmptyPoint;
@@ -1691,9 +1691,9 @@ namespace emfio
else
{
// need to blend in Mask quality (1Bit)
- Bitmap aMask(aVDevMask.CreateMask(Color(COL_WHITE)));
+ Bitmap aMask(aVDevMask.CreateMask(COL_WHITE));
- if ( rBitmap.GetTransparentColor() == Color( COL_WHITE ) )
+ if ( rBitmap.GetTransparentColor() == COL_WHITE )
{
aMask.CombineSimple( rBitmap.GetMask(), BmpCombine::Or );
}
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 97a7f806c764..483c6ba95841 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -846,13 +846,13 @@ namespace emfio
case W_META_CREATEBRUSH:
{
- CreateObject(o3tl::make_unique<WinMtfFillStyle>( Color( COL_WHITE ), false ));
+ CreateObject(o3tl::make_unique<WinMtfFillStyle>( COL_WHITE, false ));
}
break;
case W_META_CREATEPATTERNBRUSH:
{
- CreateObject(o3tl::make_unique<WinMtfFillStyle>( Color( COL_WHITE ), false ));
+ CreateObject(o3tl::make_unique<WinMtfFillStyle>( COL_WHITE, false ));
}
break;
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index 89091b8d8df0..30a325bd3ac0 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -455,7 +455,7 @@ void GridWindow::setBoundings(double fMinX, double fMinY, double fMaxX, double f
void GridWindow::drawGrid(vcl::RenderContext& rRenderContext)
{
char pBuf[256];
- rRenderContext.SetLineColor(Color(COL_BLACK));
+ rRenderContext.SetLineColor(COL_BLACK);
// draw vertical lines
for (double fX = m_fMinChunkX; fX < m_fMaxX; fX += m_fChunkX)
{
@@ -494,7 +494,7 @@ void GridWindow::drawOriginal(vcl::RenderContext& rRenderContext)
{
if (m_nValues && m_pXValues && m_pOrigYValues)
{
- rRenderContext.SetLineColor(Color(COL_RED));
+ rRenderContext.SetLineColor(COL_RED);
for (int i = 0; i < m_nValues - 1; i++)
{
drawLine(rRenderContext,
@@ -509,7 +509,7 @@ void GridWindow::drawNew(vcl::RenderContext& rRenderContext)
if (m_nValues && m_pXValues && m_pNewYValues)
{
rRenderContext.SetClipRegion(vcl::Region(m_aGridArea));
- rRenderContext.SetLineColor(Color(COL_YELLOW));
+ rRenderContext.SetLineColor(COL_YELLOW);
for (int i = 0; i < m_nValues - 1; i++)
{
drawLine(rRenderContext,
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index d435b836f588..bfe51fd77bf1 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -952,8 +952,8 @@ void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
{
Window::Paint(rRenderContext, rRect);
rRenderContext.SetMapMode(MapMode(MapUnit::MapAppFont));
- rRenderContext.SetFillColor(Color(COL_WHITE));
- rRenderContext.SetLineColor(Color(COL_WHITE));
+ rRenderContext.SetFillColor(COL_WHITE);
+ rRenderContext.SetLineColor(COL_WHITE);
rRenderContext.DrawRect(tools::Rectangle(Point(0, 0),
Size(PREVIEW_WIDTH, PREVIEW_HEIGHT)));
rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index 071f567073e5..2d9f44c577a5 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -62,7 +62,7 @@ Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int
// define an invisible button with the size of a page
tools::Rectangle aRect( 0, 0, static_cast<long>( mnDocWidth * mnDocXScale ), static_cast<long>( mnDocHeight * mnDocYScale ) );
tools::Polygon aPoly( aRect );
- FillStyle aFill = FillStyle( Color(COL_WHITE) );
+ FillStyle aFill = FillStyle( COL_WHITE );
mnWhiteBackgroundShapeId = defineShape( aPoly, aFill );
::basegfx::B2DHomMatrix m; // #i73264#
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 90464d195b25..bab13eea44cb 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -401,10 +401,10 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
Color aTextColor( mpVDev->GetTextColor() );
if ( aTextColor.GetColor() == COL_BLACK )
- aTextColor = Color( COL_WHITE );
+ aTextColor = COL_WHITE;
if ( aTextColor.GetColor() == COL_WHITE )
- aReliefColor = Color( COL_BLACK );
+ aReliefColor = COL_BLACK;
Point aPos( rPos );
@@ -434,7 +434,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
Color aShadowColor( COL_BLACK );
if ( (aTextColor.GetColor() == COL_BLACK) || (aTextColor.GetLuminance() < 8) )
- aShadowColor = Color( COL_LIGHTGRAY );
+ aShadowColor = COL_LIGHTGRAY;
Point aPos( rPos );
aPos += Point( nOff, nOff );
@@ -465,7 +465,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
aPos = rPos + Point(+6,+0);
Impl_writeText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor() );
- Impl_writeText( rPos, rText, pDXArray, nWidth, Color( COL_WHITE ) );
+ Impl_writeText( rPos, rText, pDXArray, nWidth, COL_WHITE );
}
}
}
@@ -569,7 +569,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
#if 0 // makes the calculated bound rect visible for debugging
{
tools::Polygon aTmpPoly( aPoly );
- sal_uInt16 nID = FlashGeometryExporter::writePolygonShape( aMovieStream, aTmpPoly, false, Color(COL_MAGENTA), Color(COL_MAGENTA), mpClipPolyPolygon );
+ sal_uInt16 nID = FlashGeometryExporter::writePolygonShape( aMovieStream, aTmpPoly, false, COL_MAGENTA, COL_MAGENTA, mpClipPolyPolygon );
ImplPlaceObject( nID );
}
#endif
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 8dc125837701..4643533770c4 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -397,18 +397,18 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
nBoundingY2 = pMTF->GetPrefSize().Height();
pGDIStack = nullptr;
- aColor = Color( COL_TRANSPARENT );
+ aColor = COL_TRANSPARENT;
bLineColor = true;
- aLineColor = Color( COL_BLACK );
+ aLineColor = COL_BLACK;
bFillColor = true;
- aFillColor = Color( COL_WHITE );
+ aFillColor = COL_WHITE;
bTextFillColor = true;
- aTextFillColor = Color( COL_BLACK );
+ aTextFillColor = COL_BLACK;
fLineWidth = 1;
fMiterLimit = 15; // use same limit as most graphic systems and basegfx
eLineCap = SvtGraphicStroke::capButt;
eJoinType = SvtGraphicStroke::joinMiter;
- aBackgroundColor = Color( COL_WHITE );
+ aBackgroundColor = COL_WHITE;
eTextAlign = ALIGN_BASELINE;
nNextChrSetId = 1;
@@ -495,7 +495,7 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
nLines *= aSizeBitmap.Height();
ImplWriteLong( nLines );
sal_Int32 nCount2, nCount = 4;
- const BitmapColor aBlack( pAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
+ const BitmapColor aBlack( pAcc->GetBestMatchingColor( Color(COL_BLACK) ) );
for ( long nY = 0; nY < aSizeBitmap.Height(); nY++ )
{
nCount2 = 0;
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 3e8976e50c36..203fc9a7f911 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -157,8 +157,8 @@ bool DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE)
pVirDev->SetLineColor( aActLineColor = aColor );
}
- if (aActFillColor!=Color( COL_TRANSPARENT )) {
- pVirDev->SetFillColor(aActFillColor = Color( COL_TRANSPARENT ));
+ if (aActFillColor!=COL_TRANSPARENT) {
+ pVirDev->SetFillColor(aActFillColor = COL_TRANSPARENT);
}
return true;
}
@@ -177,7 +177,7 @@ bool DXF2GDIMetaFile::SetAreaAttribute(const DXFBasicEntity & rE)
pVirDev->SetLineColor( aActLineColor = aColor );
}
- if ( aActFillColor == Color( COL_TRANSPARENT ) || aActFillColor != aColor) {
+ if ( aActFillColor == COL_TRANSPARENT || aActFillColor != aColor) {
pVirDev->SetFillColor( aActFillColor = aColor );
}
return true;
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index e2b5b8e383ab..ee634180c1f1 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -457,7 +457,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
pVDev->EnableOutput( false );
aMtf.Record( pVDev );
- pVDev->SetLineColor( Color( COL_RED ) );
+ pVDev->SetLineColor( COL_RED );
pVDev->SetFillColor();
aFont.SetColor( COL_LIGHTRED );
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 7a1255ba2d98..6d6d5ee7d38d 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -705,7 +705,7 @@ void OS2METReader::ChangeBrush(const Color& rPatColor, bool bFill )
if( bFill )
aColor = rPatColor;
else
- aColor = Color( COL_TRANSPARENT );
+ aColor = COL_TRANSPARENT;
if( pVirDev->GetFillColor() != aColor )
pVirDev->SetFillColor( aColor );
@@ -947,7 +947,7 @@ void OS2METReader::ReadBox(bool bGivenPos)
}
else
{
- ChangeBrush( Color( COL_TRANSPARENT ), false );
+ ChangeBrush( COL_TRANSPARENT, false );
SetRasterOp(aAttr.eLinMix);
}
@@ -1148,7 +1148,7 @@ void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize)
else
{
SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- ChangeBrush(Color( COL_TRANSPARENT ), false);
+ ChangeBrush(COL_TRANSPARENT, false);
SetRasterOp(aAttr.eLinMix);
}
pVirDev->DrawEllipse(aRect);
@@ -1369,7 +1369,7 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen)
}
else
{
- ChangeBrush(Color(COL_TRANSPARENT), false);
+ ChangeBrush(COL_TRANSPARENT, false);
}
if (bCoord32) nNumPoints=nOrderLen/8; else nNumPoints=nOrderLen/4;
if (!bGivenPos) nNumPoints++;
@@ -1600,7 +1600,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
if( p->bStroke )
{
SetPen( aAttr.aPatCol, aAttr.nStrLinWidth );
- ChangeBrush(Color(COL_TRANSPARENT), false);
+ ChangeBrush(COL_TRANSPARENT, false);
SetRasterOp( aAttr.ePatMix );
if ( IsLineInfo() )
{
@@ -1648,7 +1648,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
{
SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
SetRasterOp(aAttr.eLinMix);
- ChangeBrush(Color(COL_TRANSPARENT), false);
+ ChangeBrush(COL_TRANSPARENT, false);
nC=p->aPPoly.Count();
for (i=0; i<nC; i++)
{
@@ -1732,10 +1732,10 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
}
else {
const auto nVal = ReadLittleEndian3BytesLong();
- if ((nFlags&0x40)!=0 && nVal==1) aCol=Color(COL_BLACK);
- else if ((nFlags&0x40)!=0 && nVal==2) aCol=Color(COL_WHITE);
- else if ((nFlags&0x40)!=0 && nVal==4) aCol=Color(COL_WHITE);
- else if ((nFlags&0x40)!=0 && nVal==5) aCol=Color(COL_BLACK);
+ if ((nFlags&0x40)!=0 && nVal==1) aCol=COL_BLACK;
+ else if ((nFlags&0x40)!=0 && nVal==2) aCol=COL_WHITE;
+ else if ((nFlags&0x40)!=0 && nVal==4) aCol=COL_WHITE;
+ else if ((nFlags&0x40)!=0 && nVal==5) aCol=COL_BLACK;
else aCol=GetPaletteColor(nVal);
if (nA==1) switch (nP) {
case 1: aAttr.aLinCol=aCol; break;
@@ -1792,10 +1792,10 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
}
else {
const auto nVal = ReadLittleEndian3BytesLong();
- if ((nFlags&0x40)!=0 && nVal==1) aCol=Color(COL_BLACK);
- else if ((nFlags&0x40)!=0 && nVal==2) aCol=Color(COL_WHITE);
- else if ((nFlags&0x40)!=0 && nVal==4) aCol=Color(COL_WHITE);
- else if ((nFlags&0x40)!=0 && nVal==5) aCol=Color(COL_BLACK);
+ if ((nFlags&0x40)!=0 && nVal==1) aCol=COL_BLACK;
+ else if ((nFlags&0x40)!=0 && nVal==2) aCol=COL_WHITE;
+ else if ((nFlags&0x40)!=0 && nVal==4) aCol=COL_WHITE;
+ else if ((nFlags&0x40)!=0 && nVal==5) aCol=COL_BLACK;
else aCol=GetPaletteColor(nVal);
aAttr.aLinCol = aAttr.aChrCol = aAttr.aMrkCol = aAttr.aPatCol =
aAttr.aImgCol = aCol;
@@ -1823,8 +1823,8 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
aAttr.aImgCol=aDefAttr.aImgCol;
}
else {
- if (nVal==0x0007) aCol=Color(COL_WHITE);
- else if (nVal==0x0008) aCol=Color(COL_BLACK);
+ if (nVal==0x0007) aCol=COL_WHITE;
+ else if (nVal==0x0008) aCol=COL_BLACK;
else if (nVal==0xff08) aCol=GetPaletteColor(1);
else aCol=GetPaletteColor(static_cast<sal_uInt32>(nVal) & 0x000000ff);
aAttr.aLinCol = aAttr.aChrCol = aAttr.aMrkCol = aAttr.aPatCol =
@@ -1847,8 +1847,8 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
aAttr.aImgBgCol=aDefAttr.aImgBgCol;
}
else {
- if (nVal==0x0007) aCol=Color(COL_WHITE);
- else if (nVal==0x0008) aCol=Color(COL_BLACK);
+ if (nVal==0x0007) aCol=COL_WHITE;
+ else if (nVal==0x0008) aCol=COL_BLACK;
else if (nVal==0xff08) aCol=GetPaletteColor(0);
else aCol=GetPaletteColor(static_cast<sal_uInt32>(nVal) & 0x000000ff);
aAttr.aLinBgCol = aAttr.aChrBgCol = aAttr.aMrkBgCol =
@@ -1871,10 +1871,10 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
}
else {
const auto nVal = ReadLittleEndian3BytesLong();
- if ((nFlags&0x40)!=0 && nVal==1) aCol=Color(COL_BLACK);
- else if ((nFlags&0x40)!=0 && nVal==2) aCol=Color(COL_WHITE);
- else if ((nFlags&0x40)!=0 && nVal==4) aCol=Color(COL_WHITE);
- else if ((nFlags&0x40)!=0 && nVal==5) aCol=Color(COL_BLACK);
+ if ((nFlags&0x40)!=0 && nVal==1) aCol=COL_BLACK;
+ else if ((nFlags&0x40)!=0 && nVal==2) aCol=COL_WHITE;
+ else if ((nFlags&0x40)!=0 && nVal==4) aCol=COL_WHITE;
+ else if ((nFlags&0x40)!=0 && nVal==5) aCol=COL_BLACK;
else aCol=GetPaletteColor(nVal);
aAttr.aLinBgCol = aAttr.aChrBgCol = aAttr.aMrkBgCol =
aAttr.aPatBgCol = aAttr.aImgBgCol = aCol;
@@ -2645,24 +2645,24 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
pBitmapList=nullptr;
pAttrStack=nullptr;
- aDefAttr.aLinCol =Color(COL_BLACK);
- aDefAttr.aLinBgCol =Color(COL_WHITE);
+ aDefAttr.aLinCol =COL_BLACK;
+ aDefAttr.aLinBgCol =COL_WHITE;
aDefAttr.eLinMix =RasterOp::OverPaint;
aDefAttr.eLinBgMix =RasterOp::OverPaint;
- aDefAttr.aChrCol =Color(COL_BLACK);
- aDefAttr.aChrBgCol =Color(COL_WHITE);
+ aDefAttr.aChrCol =COL_BLACK;
+ aDefAttr.aChrBgCol =COL_WHITE;
aDefAttr.eChrMix =RasterOp::OverPaint;
aDefAttr.eChrBgMix =RasterOp::OverPaint;
- aDefAttr.aMrkCol =Color(COL_BLACK);
- aDefAttr.aMrkBgCol =Color(COL_WHITE);
+ aDefAttr.aMrkCol =COL_BLACK;
+ aDefAttr.aMrkBgCol =COL_WHITE;
aDefAttr.eMrkMix =RasterOp::OverPaint;
aDefAttr.eMrkBgMix =RasterOp::OverPaint;
- aDefAttr.aPatCol =Color(COL_BLACK);
- aDefAttr.aPatBgCol =Color(COL_WHITE);
+ aDefAttr.aPatCol =COL_BLACK;
+ aDefAttr.aPatBgCol =COL_WHITE;
aDefAttr.ePatMix =RasterOp::OverPaint;
aDefAttr.ePatBgMix =RasterOp::OverPaint;
- aDefAttr.aImgCol =Color(COL_BLACK);
- aDefAttr.aImgBgCol =Color(COL_WHITE);
+ aDefAttr.aImgCol =COL_BLACK;
+ aDefAttr.aImgBgCol =COL_WHITE;
aDefAttr.eImgMix =RasterOp::OverPaint;
aDefAttr.eImgBgMix =RasterOp::OverPaint;
aDefAttr.nArcP =1;
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index c34b55bec422..193c18656d62 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -414,15 +414,15 @@ Color PictReader::ReadColor()
pPict->ReadUInt32( nCol );
switch (nCol)
{
- case 33: aCol=Color( COL_BLACK ); break;
- case 30: aCol=Color( COL_WHITE ); break;
- case 205: aCol=Color( COL_LIGHTRED ); break;
- case 341: aCol=Color( COL_LIGHTGREEN ); break;
- case 409: aCol=Color( COL_LIGHTBLUE ); break;
- case 273: aCol=Color( COL_LIGHTCYAN ); break;
- case 137: aCol=Color( COL_LIGHTMAGENTA ); break;
- case 69: aCol=Color( COL_YELLOW ); break;
- default: aCol=Color( COL_LIGHTGRAY );
+ case 33: aCol=COL_BLACK; break;
+ case 30: aCol=COL_WHITE; break;
+ case 205: aCol=COL_LIGHTRED; break;
+ case 341: aCol=COL_LIGHTGREEN; break;
+ case 409: aCol=COL_LIGHTBLUE; break;
+ case 273: aCol=COL_LIGHTCYAN; break;
+ case 137: aCol=COL_LIGHTMAGENTA; break;
+ case 69: aCol=COL_YELLOW; break;
+ default: aCol=COL_LIGHTGRAY;
}
return aCol;
}
@@ -635,11 +635,11 @@ void PictReader::DrawingMethod(PictDrawingMethod eMethod)
SetLineColor( aActForeColor );
else
SetLineColor(eActPenPattern.getColor(aActBackColor, aActForeColor));
- SetFillColor( Color(COL_TRANSPARENT) );
+ SetFillColor( COL_TRANSPARENT );
pVirDev->SetRasterOp(eActROP);
break;
case PictDrawingMethod::PAINT:
- SetLineColor( Color(COL_TRANSPARENT) );
+ SetLineColor( COL_TRANSPARENT );
if (eActPenPattern.isDefault())
SetFillColor( aActForeColor );
else
@@ -647,7 +647,7 @@ void PictReader::DrawingMethod(PictDrawingMethod eMethod)
pVirDev->SetRasterOp(eActROP);
break;
case PictDrawingMethod::ERASE:
- SetLineColor( Color(COL_TRANSPARENT) );
+ SetLineColor( COL_TRANSPARENT );
if (eActBackPattern.isDefault())
SetFillColor( aActBackColor );// Osnola: previously aActForeColor
else // checkMe
@@ -655,12 +655,12 @@ void PictReader::DrawingMethod(PictDrawingMethod eMethod)
pVirDev->SetRasterOp(RasterOp::OverPaint);
break;
case PictDrawingMethod::INVERT: // checkme
- SetLineColor( Color(COL_TRANSPARENT));
- SetFillColor( Color( COL_BLACK ) );
+ SetLineColor( COL_TRANSPARENT);
+ SetFillColor( COL_BLACK );
pVirDev->SetRasterOp(RasterOp::Invert);
break;
case PictDrawingMethod::FILL:
- SetLineColor( Color(COL_TRANSPARENT) );
+ SetLineColor( COL_TRANSPARENT );
if (eActFillPattern.isDefault())
SetFillColor( aActForeColor );
else
@@ -1891,8 +1891,8 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
nOrigPos = pPict->Tell();
SvStreamEndian nOrigNumberFormat = pPict->GetEndian();
- aActForeColor = Color(COL_BLACK);
- aActBackColor = Color(COL_WHITE);
+ aActForeColor = COL_BLACK;
+ aActBackColor = COL_WHITE;
nActPenSize = Size(1,1);
eActROP = RasterOp::OverPaint;
eActMethod = PictDrawingMethod::UNDEFINED;
diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx
index 357f4a4e2adb..219c48d4aec3 100644
--- a/filter/source/graphicfilter/ipict/shape.cxx
+++ b/filter/source/graphicfilter/ipict/shape.cxx
@@ -99,7 +99,7 @@ namespace PictReaderShape {
// must be changed if other parameter are changed to draw
// a line/fill shape
Color oldFColor = dev->GetFillColor(), oldLColor = dev->GetLineColor();
- dev->SetFillColor(oldLColor); dev->SetLineColor(Color(COL_TRANSPARENT));
+ dev->SetFillColor(oldLColor); dev->SetLineColor(COL_TRANSPARENT);
dev->DrawPolygon(poly);
dev->SetLineColor(oldLColor); dev->SetFillColor(oldFColor);
return true;
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 9039c367fa7e..4c6abe080894 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1368,7 +1368,7 @@ GraphicObject* lclDrawHatch( const drawing::Hatch& rHatch, const Color& rBackCol
aMtf.Clear();
aMtf.Record(pVDev);
pVDev->SetLineColor();
- pVDev->SetFillColor(bFillBackground ? rBackColor : Color(COL_TRANSPARENT));
+ pVDev->SetFillColor(bFillBackground ? rBackColor : COL_TRANSPARENT);
pVDev->DrawRect(rRect);
pVDev->DrawHatch(tools::PolyPolygon(rRect), Hatch(static_cast<HatchStyle>(rHatch.Style), Color(rHatch.Color), rHatch.Distance, static_cast<sal_uInt16>(rHatch.Angle)));
aMtf.Stop();
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index fa05c6a71e58..218a1bb177a6 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3373,11 +3373,11 @@ Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nConte
case DFF_Prop_shadowColor :
case DFF_Prop_fillBackColor :
case DFF_Prop_fillColor :
- aColor = Color( COL_WHITE );
+ aColor = COL_WHITE;
break;
case DFF_Prop_lineColor :
{
- aColor = Color( COL_BLACK );
+ aColor = COL_BLACK;
}
break;
}
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index fff43f3f9693..788888321add 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -297,7 +297,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect
// according to the spec:
// "the iconMask is white in all the areas in which the icon is
// displayed as transparent and is black in all other areas."
- aBitEx = BitmapEx( aBitEx.GetBitmap(), pSpecificInfo->getIconMask()->getBitMap().CreateMask( Color( COL_WHITE ) ) );
+ aBitEx = BitmapEx( aBitEx.GetBitmap(), pSpecificInfo->getIconMask()->getBitMap().CreateMask( COL_WHITE ) );
Graphic aGraphic( aBitEx );
helper.addIcon( aGraphic.GetXGraphic(), sCommand );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 7d018dff716b..09bc2aacdbb7 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2906,7 +2906,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
// one: default to white.
SfxItemSet aNewSet(*pObject->GetMergedItemSet().GetPool());
aNewSet.Put(XFillStyleItem(css::drawing::FillStyle_SOLID));
- aNewSet.Put(XFillColorItem(OUString(), Color(COL_WHITE)));
+ aNewSet.Put(XFillColorItem(OUString(), COL_WHITE));
pObject->SetMergedItemSet(aNewSet);
}
}
@@ -5749,7 +5749,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T
break;
case drawing::FillStyle_HATCH :
case drawing::FillStyle_BITMAP :
- aDefColor = Color( COL_WHITE );
+ aDefColor = COL_WHITE;
break;
default: break;
}
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index b22910df87c1..441ea483898c 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2022,7 +2022,7 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape )
ImplMap( rShape.maShapePolyPoly, aPolyPoly );
- const bool bLineOnly = ( rShape.maShapeFillColor == Color( COL_TRANSPARENT ) ) && ( !rShape.mapShapeGradient.get() );
+ const bool bLineOnly = ( rShape.maShapeFillColor == COL_TRANSPARENT ) && ( !rShape.mapShapeGradient.get() );
tools::Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
maAttributeWriter.AddPaintAttr( rShape.maShapeLineColor, rShape.maShapeFillColor, &aBoundRect, rShape.mapShapeGradient.get() );
@@ -2459,10 +2459,10 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
Color aTextColor( mpVDev->GetTextColor() );
if ( aTextColor.GetColor() == COL_BLACK )
- aTextColor = Color( COL_WHITE );
+ aTextColor = COL_WHITE;
if ( aTextColor.GetColor() == COL_WHITE )
- aReliefColor = Color( COL_BLACK );
+ aReliefColor = COL_BLACK;
Point aPos( rPos );
@@ -2492,7 +2492,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
Color aShadowColor( COL_BLACK );
if ( (aTextColor.GetColor() == COL_BLACK) || (aTextColor.GetLuminance() < 8) )
- aShadowColor = Color( COL_LIGHTGRAY );
+ aShadowColor = COL_LIGHTGRAY;
Point aPos( rPos );
aPos += Point( nOff, nOff );
@@ -2523,7 +2523,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
aPos = rPos + Point( +6, +0);
ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor() );
- ImplWriteText( rPos, rText, pDXArray, nWidth, Color( COL_WHITE ) );
+ ImplWriteText( rPos, rText, pDXArray, nWidth, COL_WHITE );
}
}
}
@@ -2961,7 +2961,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( rPoly.GetSize() )
{
- maAttributeWriter.AddPaintAttr( mpVDev->GetLineColor(), Color( COL_TRANSPARENT ) );
+ maAttributeWriter.AddPaintAttr( mpVDev->GetLineColor(), COL_TRANSPARENT );
ImplAddLineAttr( pA->GetLineInfo() );
ImplWritePolyPolygon( rPoly, true );
}
@@ -3279,7 +3279,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
ImplWriteShape( *mapCurShape );
mapCurShape->maShapeFillColor = mapCurShape->maShapeLineColor;
- mapCurShape->maShapeLineColor = Color(COL_TRANSPARENT);
+ mapCurShape->maShapeLineColor = COL_TRANSPARENT;
mapCurShape->mnStrokeWidth = 0;
mapCurShape->maDashArray.clear();
mapCurShape->maLineJoin = basegfx::B2DLineJoin::Miter;
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index b54e6fffe6dc..6de5495c68b4 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -189,8 +189,8 @@ struct SVGShapeDescriptor
SVGShapeDescriptor() :
- maShapeFillColor( Color( COL_TRANSPARENT ) ),
- maShapeLineColor( Color( COL_TRANSPARENT ) ),
+ maShapeFillColor( COL_TRANSPARENT ),
+ maShapeLineColor( COL_TRANSPARENT ),
mnStrokeWidth( 0 ),
maLineJoin(basegfx::B2DLineJoin::Miter), // miter is Svg 'stroke-linejoin' default
maLineCap(css::drawing::LineCap_BUTT) // butt is Svg 'stroke-linecap' default
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index 40bfe13b78bb..3985351032a1 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -428,7 +428,7 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
if( pBmpAcc->HasPalette() )
{
- const BitmapColor aWhite( pMskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aWhite( pMskAcc->GetBestMatchingColor( Color(COL_WHITE) ) );
if( mnTransIndex < 256 )
{
@@ -479,7 +479,7 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
else
{
css::uno::Sequence<sal_Int32> aData( nPartWidth * nPartHeight );
- const BitmapColor aWhite( pMskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aWhite( pMskAcc->GetBestMatchingColor( Color(COL_WHITE) ) );
sal_Int32* pTmp = aData.getArray();
for( long nY = nStartY; nY <= nEndY; nY++ )
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index f80952e44162..1eea34edd9b4 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -300,7 +300,7 @@ namespace frm
else if ( LID_RECORD_FILLER == pSupportedFeatures->nId )
{
pItemWindow = VclPtr<FixedText>::Create( m_pToolbar, WB_CENTER | WB_VCENTER );
- pItemWindow->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+ pItemWindow->SetBackground(Wallpaper(COL_TRANSPARENT));
}
else
{
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 8bc9a1dee129..a481a56ba4e6 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2484,7 +2484,7 @@ void SvtFileDialog::AddControls_Impl( )
_pPrevWin->Show();
_pPrevBmp = VclPtr<FixedBitmap>::Create( _pPrevWin, WinBits( WB_BORDER ) );
- _pPrevBmp->SetBackground( Wallpaper( Color( COL_WHITE ) ) );
+ _pPrevBmp->SetBackground( Wallpaper( COL_WHITE ) );
_pPrevBmp->SetSizePixel(_pPrevWin->GetSizePixel());
_pPrevBmp->Show();
_pPrevBmp->SetAccessibleName(FpsResId(STR_PREVIEW));
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index 83f5e7d075f8..7ff5fc597876 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -366,7 +366,7 @@ public:
void SetColor( const Color& rColor );
void SetColor()
{
- SetColor(Color(COL_TRANSPARENT));
+ SetColor(COL_TRANSPARENT);
}
bool IsColor() const
{
diff --git a/include/svx/sdr/overlay/overlaymanager.hxx b/include/svx/sdr/overlay/overlaymanager.hxx
index 47ccf96ec19f..0396ec7cdd98 100644
--- a/include/svx/sdr/overlay/overlaymanager.hxx
+++ b/include/svx/sdr/overlay/overlaymanager.hxx
@@ -65,8 +65,8 @@ namespace sdr
// Stripe support. All striped OverlayObjects use these stripe
// values. Changes change all those objects.
- Color maStripeColorA; // defaults to Color(COL_BLACK)
- Color maStripeColorB; // defaults to Color(COL_WHITE)
+ Color maStripeColorA; // defaults to COL_BLACK
+ Color maStripeColorB; // defaults to COL_WHITE
sal_uInt32 mnStripeLengthPixel; // defaults to 4L
// hold an incarnation of Drawinglayer configuration options
diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx
index b0f7b40e5e91..5b108ac2e2fb 100644
--- a/include/svx/svdpagv.hxx
+++ b/include/svx/svdpagv.hxx
@@ -165,7 +165,7 @@ public:
void DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr,
const tools::Rectangle& rRect = tools::Rectangle(),
basegfx::B2IRange const* pPageFrame = nullptr);
- void DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& rRect, Color aColor = Color( COL_BLACK ) );
+ void DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& rRect, Color aColor = COL_BLACK );
tools::Rectangle GetPageRect() const;
SdrPage* GetPage() const { return mpPage; }
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 6f1d211174eb..ff90e3fb40da 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -722,8 +722,8 @@ public:
const Point& rPos,
const Size& rSize,
sal_uInt32 nLen = 8,
- Color aStart = Color(COL_WHITE),
- Color aEnd = Color(COL_BLACK));
+ Color aStart = COL_WHITE,
+ Color aEnd = COL_BLACK);
void DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags );
@@ -1581,7 +1581,7 @@ public:
bool bReduceTransparency,
bool bTransparencyAutoMode,
bool bDownsampleBitmaps,
- const Color& rBackground = Color( COL_TRANSPARENT ) );
+ const Color& rBackground = COL_TRANSPARENT );
SAL_DLLPRIVATE void ImplPrintTransparent (
const Bitmap& rBmp, const Bitmap& rMask,
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 302d98fc85b0..1db80a5b6da1 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -744,10 +744,10 @@ The following structure describes the permissions used in PDF security
void SetDigitLanguage( LanguageType eLang );
void SetLineColor( const Color& rColor );
- void SetLineColor() { SetLineColor( Color( COL_TRANSPARENT ) ); }
+ void SetLineColor() { SetLineColor( COL_TRANSPARENT ); }
void SetFillColor( const Color& rColor );
- void SetFillColor() { SetFillColor( Color( COL_TRANSPARENT ) ); }
+ void SetFillColor() { SetFillColor( COL_TRANSPARENT ); }
void SetFont( const vcl::Font& rNewFont );
void SetTextColor( const Color& rColor );
@@ -782,7 +782,7 @@ The following structure describes the permissions used in PDF security
void DrawPixel( const Point& rPt, const Color& rColor );
void DrawPixel( const Point& rPt )
- { DrawPixel( rPt, Color( COL_TRANSPARENT ) ); }
+ { DrawPixel( rPt, COL_TRANSPARENT ); }
void DrawLine( const Point& rStartPt, const Point& rEndPt );
void DrawLine( const Point& rStartPt, const Point& rEndPt,
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index c1480acf67ad..8899e6861811 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -2827,7 +2827,7 @@ void ScExportTest::testSharedFormulaExportXLSX()
for (SCROW i = 0; i <= 1; ++i)
{
Color aTabBgColor = rDoc.GetTabBgColor(i);
- if (aTabBgColor != Color(COL_AUTO))
+ if (aTabBgColor != COL_AUTO)
{
cerr << "The tab color of Sheet " << (i+1) << " should not be explicitly set." << endl;
return false;
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index df70447d3c4d..4310cc3020fb 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4401,7 +4401,7 @@ void Test::testSetBackgroundColor()
Color aColor;
//test yellow
- aColor=Color(COL_YELLOW);
+ aColor=COL_YELLOW;
getDocShell().GetDocFunc().SetTabBgColor(0,aColor,false, true);
CPPUNIT_ASSERT_EQUAL_MESSAGE("the correct color is not set",
aColor, m_pDoc->GetTabBgColor(0));
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 3387d51dc380..7bcfa8e603d8 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -216,7 +216,7 @@ ScDocumentPool::ScDocumentPool()
rPoolDefaults[ ATTR_FONT_CROSSEDOUT - ATTR_STARTINDEX ] = new SvxCrossedOutItem( STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT );
rPoolDefaults[ ATTR_FONT_CONTOUR - ATTR_STARTINDEX ] = new SvxContourItem( false, ATTR_FONT_CONTOUR );
rPoolDefaults[ ATTR_FONT_SHADOWED - ATTR_STARTINDEX ] = new SvxShadowedItem( false, ATTR_FONT_SHADOWED );
- rPoolDefaults[ ATTR_FONT_COLOR - ATTR_STARTINDEX ] = new SvxColorItem( Color(COL_AUTO), ATTR_FONT_COLOR );
+ rPoolDefaults[ ATTR_FONT_COLOR - ATTR_STARTINDEX ] = new SvxColorItem( COL_AUTO, ATTR_FONT_COLOR );
rPoolDefaults[ ATTR_FONT_LANGUAGE - ATTR_STARTINDEX ] = new SvxLanguageItem( LANGUAGE_DONTKNOW, ATTR_FONT_LANGUAGE );
rPoolDefaults[ ATTR_CJK_FONT - ATTR_STARTINDEX ] = pCjkFont;
rPoolDefaults[ ATTR_CJK_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_CJK_FONT_HEIGHT );
@@ -258,7 +258,7 @@ ScDocumentPool::ScDocumentPool()
rPoolDefaults[ ATTR_MERGE_FLAG - ATTR_STARTINDEX ] = new ScMergeFlagAttr;
rPoolDefaults[ ATTR_VALUE_FORMAT - ATTR_STARTINDEX ] = new SfxUInt32Item( ATTR_VALUE_FORMAT, 0 );
rPoolDefaults[ ATTR_LANGUAGE_FORMAT - ATTR_STARTINDEX ] = new SvxLanguageItem( ScGlobal::eLnge, ATTR_LANGUAGE_FORMAT );
- rPoolDefaults[ ATTR_BACKGROUND - ATTR_STARTINDEX ] = new SvxBrushItem( Color(COL_TRANSPARENT), ATTR_BACKGROUND );
+ rPoolDefaults[ ATTR_BACKGROUND - ATTR_STARTINDEX ] = new SvxBrushItem( COL_TRANSPARENT, ATTR_BACKGROUND );
rPoolDefaults[ ATTR_PROTECTION - ATTR_STARTINDEX ] = new ScProtectionAttr;
rPoolDefaults[ ATTR_BORDER - ATTR_STARTINDEX ] = new SvxBoxItem( ATTR_BORDER );
rPoolDefaults[ ATTR_BORDER_INNER - ATTR_STARTINDEX ] = pGlobalBorderInnerAttr;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 8f37ada3dcbb..b4f300b352b3 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -451,7 +451,7 @@ Color ScDocument::GetTabBgColor( SCTAB nTab ) const
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetTabBgColor();
- return Color(COL_AUTO);
+ return COL_AUTO;
}
void ScDocument::SetTabBgColor( SCTAB nTab, const Color& rColor )
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index d3777cfe7135..b6924ae6e198 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -464,10 +464,10 @@ void ScGlobal::Init()
pRscString = new std::map<const char*, OUString>;
- pEmptyBrushItem = new SvxBrushItem( Color( COL_TRANSPARENT ), ATTR_BACKGROUND );
+ pEmptyBrushItem = new SvxBrushItem( COL_TRANSPARENT, ATTR_BACKGROUND );
pButtonBrushItem = new SvxBrushItem( Color(), ATTR_BACKGROUND );
- pEmbeddedBrushItem = new SvxBrushItem( Color( COL_LIGHTCYAN ), ATTR_BACKGROUND );
- pProtectedBrushItem = new SvxBrushItem( Color( COL_LIGHTGRAY ), ATTR_BACKGROUND );
+ pEmbeddedBrushItem = new SvxBrushItem( COL_LIGHTCYAN, ATTR_BACKGROUND );
+ pProtectedBrushItem = new SvxBrushItem( COL_LIGHTGRAY, ATTR_BACKGROUND );
InitPPT();
//ScCompiler::InitSymbolsNative();
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 4dab73a20805..ba8904885925 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -425,7 +425,7 @@ void XclExpXmlSheetPr::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_outlinePr
- if (maTabColor != Color(COL_AUTO))
+ if (maTabColor != COL_AUTO)
rWorksheet->singleElement(
XML_tabColor, XML_rgb, XclXmlUtils::ToOString(maTabColor).getStr(), FSEND);
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 45553c6b2110..3da3b4d32536 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -498,7 +498,7 @@ XclExpStringRef lclCreateFormattedString(
aFont.SetEscapement( nEsc );
// modify automatic font color for hyperlinks
if( bIsHyperlink && aItemSet.Get( ATTR_FONT_COLOR ).GetValue().GetColor() == COL_AUTO)
- aFont.SetColor( Color( COL_LIGHTBLUE ) );
+ aFont.SetColor( COL_LIGHTBLUE );
// insert font into buffer
sal_uInt16 nFontIdx = rFontBuffer.Insert( aFont, EXC_COLOR_CELLTEXT );
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 466ad9a395bd..2262a448d1ec 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -327,7 +327,7 @@ XclExpPaletteImpl::XclExpPaletteImpl( const XclDefaultPalette& rDefPal ) :
for( sal_uInt16 nIdx = 0; nIdx < nCount; ++nIdx )
maPalette.emplace_back( mrDefPal.GetDefColor( GetXclIndex( nIdx ) ) );
- InsertColor( Color( COL_BLACK ), EXC_COLOR_CELLTEXT );
+ InsertColor( COL_BLACK, EXC_COLOR_CELLTEXT );
}
sal_uInt32 XclExpPaletteImpl::InsertColor( const Color& rColor, XclExpColorType eType, sal_uInt16 nAutoDefault )
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 8b54b6241afd..1187deb0c658 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1070,7 +1070,7 @@ void XclImpCellArea::FillToItemSet( SfxItemSet& rItemSet, const XclImpPalette& r
// do not use IsTransparent() - old Calc filter writes tranparency with different color indexes
if( mnPattern == EXC_PATT_NONE )
{
- aBrushItem.SetColor( Color( COL_TRANSPARENT ) );
+ aBrushItem.SetColor( COL_TRANSPARENT );
}
else
{
diff --git a/sc/source/filter/inc/xlview.hxx b/sc/source/filter/inc/xlview.hxx
index a742bb678427..824f9a783269 100644
--- a/sc/source/filter/inc/xlview.hxx
+++ b/sc/source/filter/inc/xlview.hxx
@@ -141,7 +141,7 @@ struct XclTabViewData
bool mbShowZeros; /// true = Show zero value zells.
bool mbShowOutline; /// true = Show outlines.
Color maTabBgColor; /// Tab Color default = (COL_AUTO )
- bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO); };
+ bool IsDefaultTabBgColor() const { return maTabBgColor == COL_AUTO; };
sal_uInt32 mnTabBgColorId; /// palette color id
explicit XclTabViewData();
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index e303b435abbe..6883178e43eb 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -51,14 +51,14 @@ LotAttrCache::LotAttrCache (LOTUS_ROOT* pLotRoot)
pDocPool = mpLotusRoot->pDoc->GetPool();
pColTab = new Color [ 8 ];
- pColTab[ 0 ] = Color( COL_WHITE );
- pColTab[ 1 ] = Color( COL_LIGHTBLUE );
- pColTab[ 2 ] = Color( COL_LIGHTGREEN );
- pColTab[ 3 ] = Color( COL_LIGHTCYAN );
- pColTab[ 4 ] = Color( COL_LIGHTRED );
- pColTab[ 5 ] = Color( COL_LIGHTMAGENTA );
- pColTab[ 6 ] = Color( COL_YELLOW );
- pColTab[ 7 ] = Color( COL_BLACK );
+ pColTab[ 0 ] = COL_WHITE;
+ pColTab[ 1 ] = COL_LIGHTBLUE;
+ pColTab[ 2 ] = COL_LIGHTGREEN;
+ pColTab[ 3 ] = COL_LIGHTCYAN;
+ pColTab[ 4 ] = COL_LIGHTRED;
+ pColTab[ 5 ] = COL_LIGHTMAGENTA;
+ pColTab[ 6 ] = COL_YELLOW;
+ pColTab[ 7 ] = COL_BLACK;
ppColorItems[ 0 ] = new SvxColorItem( GetColor( 1 ), ATTR_FONT_COLOR ); // 1
ppColorItems[ 1 ] = new SvxColorItem( GetColor( 2 ), ATTR_FONT_COLOR );
@@ -67,7 +67,7 @@ LotAttrCache::LotAttrCache (LOTUS_ROOT* pLotRoot)
ppColorItems[ 4 ] = new SvxColorItem( GetColor( 5 ), ATTR_FONT_COLOR );
ppColorItems[ 5 ] = new SvxColorItem( GetColor( 6 ), ATTR_FONT_COLOR ); // 6
- pWhite = new SvxColorItem( Color( COL_WHITE ), ATTR_FONT_COLOR );
+ pWhite = new SvxColorItem( COL_WHITE, ATTR_FONT_COLOR );
}
LotAttrCache::~LotAttrCache()
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index dc5621c08ca5..04d5c773d650 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1887,7 +1887,7 @@ void Fill::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const
SvxBrushItem aBrushItem( ATTR_BACKGROUND );
if ( maApiData.mbTransparent )
{
- aBrushItem.SetColor( ::Color( COL_TRANSPARENT ) );
+ aBrushItem.SetColor( ::COL_TRANSPARENT );
}
else
{
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 9c09a1ee0eb0..c149fd1b2bad 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4455,7 +4455,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
else
{
OUStringBuffer aBuffer;
- ::sax::Converter::convertColor(aBuffer, Color(COL_LIGHTRED).GetColor());
+ ::sax::Converter::convertColor(aBuffer, COL_LIGHTRED);
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_NEGATIVE_COLOR, aBuffer.makeStringAndClear());
}
}
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index b0e7c6d3d8c0..6b8980ae2905 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -432,11 +432,11 @@ void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext)
pVDev->DrawGradient(aRect, aGradient);
// draw slider
- pVDev->SetLineColor(Color(COL_WHITE));
+ pVDev->SetLineColor(COL_WHITE);
pVDev->DrawRect(aSecondLine);
pVDev->DrawRect(aRight);
- pVDev->SetLineColor(Color(COL_GRAY));
+ pVDev->SetLineColor(COL_GRAY);
pVDev->DrawRect(aFirstLine);
pVDev->DrawRect(aLeft);
@@ -446,7 +446,7 @@ void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext)
aSnappingPointIter != mpImpl->maSnappingPointOffsets.end();
++aSnappingPointIter)
{
- pVDev->SetLineColor(Color(COL_GRAY));
+ pVDev->SetLineColor(COL_GRAY);
tools::Rectangle aSnapping(aRect);
aSnapping.SetBottom( aSlider.Top() );
aSnapping.SetTop( aSnapping.Bottom() - nSnappingHeight );
diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx
index b86d2c3d1bee..290bcbad4d40 100644
--- a/sc/source/ui/condformat/colorformat.cxx
+++ b/sc/source/ui/condformat/colorformat.cxx
@@ -151,9 +151,9 @@ void ScDataBarSettingsDlg::dispose()
void ScDataBarSettingsDlg::Init()
{
- mpLbNeg->SelectEntry(Color(COL_LIGHTRED));
- mpLbAxisCol->SelectEntry(Color(COL_BLACK));
- mpLbPos->SelectEntry(Color(COL_LIGHTBLUE));
+ mpLbNeg->SelectEntry(COL_LIGHTRED);
+ mpLbAxisCol->SelectEntry(COL_BLACK);
+ mpLbPos->SelectEntry(COL_LIGHTBLUE);
mpBtnOk->SetClickHdl( LINK( this, ScDataBarSettingsDlg, OkBtnHdl ) );
mpLbTypeMin->SetSelectHdl( LINK( this, ScDataBarSettingsDlg, TypeSelectHdl ) );
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index ede6a4ead202..cbec1095517c 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -936,8 +936,8 @@ void ScColorScale3FrmtEntry::Init()
maLbEntryTypeMin->SetSelectHdl( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
maLbEntryTypeMax->SetSelectHdl( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
maLbEntryTypeMiddle->SetSelectHdl( LINK( this, ScColorScale3FrmtEntry, EntryTypeHdl ) );
- maLbColMin->SelectEntry(Color(COL_LIGHTRED));
- maLbColMiddle->SelectEntry(Color(COL_YELLOW));
+ maLbColMin->SelectEntry(COL_LIGHTRED);
+ maLbColMiddle->SelectEntry(COL_YELLOW);
maLbColMax->SelectEntry(Color(0x00CC00));
}
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index e79cdad8c076..ab43130cfbcb 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -259,8 +259,8 @@ sal_Int32 ScCsvControl::GetLineFromY( sal_Int32 nY ) const
void ScCsvControl::ImplInvertRect( OutputDevice& rOutDev, const tools::Rectangle& rRect )
{
rOutDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::RASTEROP );
- rOutDev.SetLineColor( Color( COL_BLACK ) );
- rOutDev.SetFillColor( Color( COL_BLACK ) );
+ rOutDev.SetLineColor( COL_BLACK );
+ rOutDev.SetFillColor( COL_BLACK );
rOutDev.SetRasterOp( RasterOp::Invert );
rOutDev.DrawRect( rRect );
rOutDev.Pop();
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index 6233c6795c03..9370a3decc89 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -145,7 +145,7 @@ void ScCsvRuler::InitColors()
maBackColor = rSett.GetFaceColor();
maActiveColor = rSett.GetWindowColor();
maTextColor = rSett.GetLabelTextColor();
- maSplitColor = maBackColor.IsDark() ? maTextColor : Color( COL_LIGHTRED );
+ maSplitColor = maBackColor.IsDark() ? maTextColor : COL_LIGHTRED;
InvalidateGfx();
}
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 77eb9ba6f610..5520213fbbbb 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -73,7 +73,7 @@ ScNewScenarioDlg::ScNewScenarioDlg( vcl::Window* pParent, const OUString& rName,
m_pBtnOk->SetClickHdl( LINK( this, ScNewScenarioDlg, OkHdl ) );
m_pCbShowFrame->SetClickHdl( LINK( this, ScNewScenarioDlg, EnableHdl ) );
- m_pLbColor->SelectEntry( Color( COL_LIGHTGRAY ) );
+ m_pLbColor->SelectEntry( COL_LIGHTGRAY );
m_pCbShowFrame->Check();
m_pCbTwoWay->Check();
m_pCbCopyAll->Check(false);
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index e3abe848a2c6..c5cad42309be 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -69,7 +69,7 @@ ScFunctionWin::ScFunctionWin(vcl::Window* pParent, const css::uno::Reference<css
nArgs=0;
aCatBox->SetDropDownLineCount(9);
vcl::Font aFont=aFiFuncDesc->GetFont();
- aFont.SetColor(Color(COL_BLACK));
+ aFont.SetColor(COL_BLACK);
aFiFuncDesc->SetFont(aFont);
aFiFuncDesc->SetBackground( GetBackground() ); //! never transparent?
aFiFuncDesc->set_height_request(5 * aFiFuncDesc->GetTextHeight());
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index c8b162a493e1..6a6f6f3e2684 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -477,12 +477,12 @@ SvTreeListEntry* ScAcceptChgDlg::AppendChangeAction(
if(!bFlag&& bUseColor&& pParent==nullptr)
{
pEntry = pTheView->InsertEntry(
- aBuf.makeStringAndClear() ,pNewData, Color(COL_LIGHTBLUE), pParent, TREELIST_APPEND);
+ aBuf.makeStringAndClear() ,pNewData, COL_LIGHTBLUE, pParent, TREELIST_APPEND);
}
else if(bFlag&& bUseColor&& pParent!=nullptr)
{
pEntry = pTheView->InsertEntry(
- aBuf.makeStringAndClear(), pNewData, Color(COL_GREEN), pParent, TREELIST_APPEND);
+ aBuf.makeStringAndClear(), pNewData, COL_GREEN, pParent, TREELIST_APPEND);
SvTreeListEntry* pExpEntry=pParent;
while(pExpEntry!=nullptr && !pTheView->IsExpanded(pExpEntry))
@@ -739,7 +739,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC
pEntry=pTheView->InsertEntry(aString,pNewData,pParent);
}
else
- pEntry=pTheView->InsertEntry(aString,pNewData,Color(COL_LIGHTBLUE),pParent);
+ pEntry=pTheView->InsertEntry(aString,pNewData,COL_LIGHTBLUE,pParent);
return pEntry;
}
@@ -1364,7 +1364,7 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvTreeListBox*, pTable, bool )
{
bTheTestFlag=InsertAcceptedORejected(pEntry);
}
- if(bTheTestFlag) pTheView->InsertEntry(aStrNoEntry,nullptr,Color(COL_GRAY),pEntry);
+ if(bTheTestFlag) pTheView->InsertEntry(aStrNoEntry,nullptr,COL_GRAY,pEntry);
}
}
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 54375859b6e6..0e7bc58ff38f 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -144,7 +144,7 @@ void ScMoveTableDlg::CheckNewTabName()
{
// New sheet name is empty. This is not good.
pFtWarn->Show();
- pFtWarn->SetControlBackground(Color(COL_YELLOW));
+ pFtWarn->SetControlBackground(COL_YELLOW);
pFtWarn->SetText(msStrTabNameEmpty);
pBtnOk->Disable();
return;
@@ -154,7 +154,7 @@ void ScMoveTableDlg::CheckNewTabName()
{
// New sheet name contains invalid characters.
pFtWarn->Show();
- pFtWarn->SetControlBackground(Color(COL_YELLOW));
+ pFtWarn->SetControlBackground(COL_YELLOW);
pFtWarn->SetText(msStrTabNameInvalid);
pBtnOk->Disable();
return;
@@ -176,7 +176,7 @@ void ScMoveTableDlg::CheckNewTabName()
if ( bFound )
{
pFtWarn->Show();
- pFtWarn->SetControlBackground(Color(COL_YELLOW));
+ pFtWarn->SetControlBackground(COL_YELLOW);
pFtWarn->SetText(msStrTabNameUsed);
pBtnOk->Disable();
}
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index 78fa4903941c..522596bbe002 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -115,7 +115,7 @@ void ScTabBgColorDlg::FillColorValueSets_Impl()
IMPL_LINK_NOARG(ScTabBgColorDlg, TabBgColorDblClickHdl_Impl, ValueSet*, void)
{
sal_uInt16 nItemId = m_pTabBgColorSet->GetSelectItemId();
- Color aColor = nItemId ? ( m_pTabBgColorSet->GetItemColor( nItemId ) ) : Color( COL_AUTO );
+ Color aColor = nItemId ? ( m_pTabBgColorSet->GetItemColor( nItemId ) ) : COL_AUTO;
m_aTabBgColor = aColor;
EndDialog( RET_OK );
}
@@ -124,7 +124,7 @@ IMPL_LINK_NOARG(ScTabBgColorDlg, TabBgColorDblClickHdl_Impl, ValueSet*, void)
IMPL_LINK_NOARG(ScTabBgColorDlg, TabBgColorOKHdl_Impl, Button*, void)
{
sal_uInt16 nItemId = m_pTabBgColorSet->GetSelectItemId();
- Color aColor = nItemId ? ( m_pTabBgColorSet->GetItemColor( nItemId ) ) : Color( COL_AUTO );
+ Color aColor = nItemId ? ( m_pTabBgColorSet->GetItemColor( nItemId ) ) : COL_AUTO;
m_aTabBgColor = aColor;
EndDialog( RET_OK );
}
@@ -165,7 +165,7 @@ void ScTabBgColorDlg::ScTabBgColorValueSet::KeyInput( const KeyEvent& rKEvt )
case KEY_RETURN:
{
sal_uInt16 nItemId = GetSelectItemId();
- const Color& aColor = nItemId ? ( GetItemColor( nItemId ) ) : Color( COL_AUTO );
+ const Color& aColor = nItemId ? ( GetItemColor( nItemId ) ) : COL_AUTO;
m_pTabBgColorDlg->m_aTabBgColor = aColor;
m_pTabBgColorDlg->EndDialog(RET_OK);
}
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index b0ffd8b125ab..b035b5e35412 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -215,7 +215,7 @@ ScScenarioWindow::ScScenarioWindow( vcl::Window* pParent, const OUString& aQH_Li
aLbScenario->SetQuickHelpText(aQH_List);
aEdComment->SetQuickHelpText(aQH_Comment);
- aEdComment->SetBackground( Color( COL_LIGHTGRAY ) );
+ aEdComment->SetBackground( Color(COL_LIGHTGRAY) );
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if (pViewFrm)
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 1c5c3acb485a..7ab26814d1a4 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -172,7 +172,7 @@ static bool lcl_GetSortParam( const ScViewData* pData, const ScSortParam& rSortP
((rSortParam.nCol1 == rSortParam.nCol2 && aExternalRange.aStart.Col() != aExternalRange.aEnd.Col()) ||
(rSortParam.nRow1 == rSortParam.nRow2 && aExternalRange.aStart.Row() != aExternalRange.aEnd.Row())))
{
- pTabViewShell->AddHighlightRange( aExternalRange,Color( COL_LIGHTBLUE ) );
+ pTabViewShell->AddHighlightRange( aExternalRange,COL_LIGHTBLUE );
ScRange rExtendRange( aExternalRange.aStart.Col(), aExternalRange.aStart.Row(), nTab, aExternalRange.aEnd.Col(), aExternalRange.aEnd.Row(), nTab );
OUString aExtendStr(rExtendRange.Format(ScRefFlags::VALID, pDoc));
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 3322d1701c56..6bb35605525d 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -491,7 +491,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, true, &pItem ) == SfxItemState::SET )
aArgComment = static_cast<const SfxStringItem*>(pItem)->GetValue();
- aColor = Color( COL_LIGHTGRAY ); // Default
+ aColor = COL_LIGHTGRAY; // Default
nFlags = ScScenarioFlags::NONE; // not TwoWay
pTabViewShell->MakeScenario( aArgName, aArgComment, aColor, nFlags );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index fb2ac988fd25..007522ec6324 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6222,7 +6222,7 @@ void ScGridWindow::UpdateDragRectOverlay()
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
sdr::overlay::OverlayType::Invert,
- Color(COL_BLACK),
+ COL_BLACK,
aRanges,
false);
@@ -6268,7 +6268,7 @@ void ScGridWindow::UpdateHeaderOverlay()
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
sdr::overlay::OverlayType::Invert,
- Color(COL_BLACK),
+ COL_BLACK,
aRanges,
false);
@@ -6335,7 +6335,7 @@ void ScGridWindow::UpdateShrinkOverlay()
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
sdr::overlay::OverlayType::Invert,
- Color(COL_BLACK),
+ COL_BLACK,
aRanges,
false);
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index b5b5a1215639..c8190c608992 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1350,7 +1350,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
{
// use single font and call DrawText directly
rDefPattern.GetFont( aFont, SC_AUTOCOL_BLACK );
- aFont.SetColor( Color( COL_LIGHTGRAY ) );
+ aFont.SetColor( COL_LIGHTGRAY );
// font size is set as needed
}
else
@@ -1360,7 +1360,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
pEditEng->SetRefMapMode(rRenderContext.GetMapMode());
SfxItemSet* pEditDefaults = new SfxItemSet( pEditEng->GetEmptyItemSet() );
rDefPattern.FillEditItemSet( pEditDefaults );
- pEditDefaults->Put( SvxColorItem( Color( COL_LIGHTGRAY ), EE_CHAR_COLOR ) );
+ pEditDefaults->Put( SvxColorItem( COL_LIGHTGRAY, EE_CHAR_COLOR ) );
pEditEng->SetDefaults( pEditDefaults );
}
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 9bf0c94d3b88..a5bf884681ad 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -295,9 +295,9 @@ void ScOutputData::SetSyntaxMode( bool bNewMode )
if (bNewMode)
if (!pValueColor)
{
- pValueColor = new Color( COL_LIGHTBLUE );
- pTextColor = new Color( COL_BLACK );
- pFormulaColor = new Color( COL_GREEN );
+ pValueColor = new Color(COL_LIGHTBLUE);
+ pTextColor = new Color(COL_BLACK);
+ pFormulaColor = new Color(COL_GREEN);
}
}
diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx
index 541cd47268b2..59ca3922ce8a 100644
--- a/sc/source/ui/view/tabsplit.cxx
+++ b/sc/source/ui/view/tabsplit.cxx
@@ -70,8 +70,8 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const tools::Rect
rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()));
// Draw handle
- rRenderContext.SetLineColor(Color(COL_BLACK));
- rRenderContext.SetFillColor(Color(COL_BLACK));
+ rRenderContext.SetLineColor(COL_BLACK);
+ rRenderContext.SetFillColor(COL_BLACK);
const long xc = rRect.Right() + rRect.Left();
const long h4 = rRect.GetHeight() / 4;
// First xc fraction is truncated, second one is rounded. This will draw a centered line
@@ -101,8 +101,8 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const tools::Rect
rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()));
// Draw handle
- rRenderContext.SetLineColor(Color(COL_BLACK));
- rRenderContext.SetFillColor(Color(COL_BLACK));
+ rRenderContext.SetLineColor(COL_BLACK);
+ rRenderContext.SetFillColor(COL_BLACK);
const long yc = rRect.Top() + rRect.Bottom();
const long w4 = rRect.GetWidth() / 4;
// First yc fraction is truncated, second one is rounded. This will draw a centered line
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index e0c31b2b0da3..d1d9e24c7ef4 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -279,10 +279,10 @@ void SdExportTest::testTransparentBackground()
const SdrPage *pPage = GetPage( 1, xDocShRef );
const SdrTextObj *pObj1 = dynamic_cast<SdrTextObj *>( pPage->GetObj( 0 ) );
- checkFontAttributes<Color, SvxBackgroundColorItem>( pObj1, Color(COL_TRANSPARENT) );
+ checkFontAttributes<Color, SvxBackgroundColorItem>( pObj1, COL_TRANSPARENT );
const SdrTextObj *pObj2 = dynamic_cast<SdrTextObj *>( pPage->GetObj( 1 ) );
- checkFontAttributes<Color, SvxBackgroundColorItem>( pObj2, Color(COL_YELLOW));
+ checkFontAttributes<Color, SvxBackgroundColorItem>( pObj2, COL_YELLOW);
xDocShRef->DoClose();
}
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index a990a41ef772..7fda9ef61e67 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -214,7 +214,7 @@ void SdDrawDocument::CreateLayoutTemplates()
rISet.Put(SvxCaseMapItem(SvxCaseMap::NotMapped, EE_CHAR_CASEMAP ));
rISet.Put(SvxEmphasisMarkItem(FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK));
rISet.Put(SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF));
- rISet.Put(SvxColorItem(Color(COL_AUTO), EE_CHAR_COLOR ));
+ rISet.Put(SvxColorItem(COL_AUTO, EE_CHAR_COLOR ));
// Paragraph attributes (Edit Engine)
rISet.Put(SvxLRSpaceItem(EE_PARA_LRSPACE));
@@ -573,7 +573,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
rISet.Put( SvxFontHeightItem( 635, 100, EE_CHAR_FONTHEIGHT_CJK ) ); // 18 pt
rISet.Put( SvxFontHeightItem( convertFontHeightToCTL( 635 ), 100, EE_CHAR_FONTHEIGHT_CTL ) ); // 18 pt
- rISet.Put(SvxColorItem(Color(COL_AUTO), EE_CHAR_COLOR ));
+ rISet.Put(SvxColorItem(COL_AUTO, EE_CHAR_COLOR ));
// Paragraph attributes (Edit Engine)
rISet.Put(SvxLRSpaceItem(EE_PARA_LRSPACE));
@@ -1202,7 +1202,7 @@ void SdDrawDocument::SetTextDefaults() const
aNumberFormat.SetBulletFont(&aBulletFont);
aNumberFormat.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34
aNumberFormat.SetBulletRelSize(45);
- aNumberFormat.SetBulletColor(Color(COL_AUTO));
+ aNumberFormat.SetBulletColor(COL_AUTO);
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SvxAdjust::Left);
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 3f92f2250a98..6a25bb423751 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -247,8 +247,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rSet.Put( SvxContourItem(false, EE_CHAR_OUTLINE ) );
rSet.Put( SvxEmphasisMarkItem(FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK ) );
rSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF) );
- rSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR) );
- rSet.Put( SvxBackgroundColorItem( Color (COL_AUTO), EE_CHAR_BKGCOLOR ) );
+ rSet.Put( SvxColorItem( COL_AUTO, EE_CHAR_COLOR) );
+ rSet.Put( SvxBackgroundColorItem( COL_AUTO, EE_CHAR_BKGCOLOR ) );
rSet.Put( XLineStyleItem(css::drawing::LineStyle_NONE) );
rSet.Put( XFillStyleItem(drawing::FillStyle_NONE) );
rSet.Put( SdrTextFitToSizeTypeItem(drawing::TextFitToSizeType_AUTOFIT) );
@@ -362,8 +362,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rTitleSet.Put(SvxContourItem(false, EE_CHAR_OUTLINE ));
rTitleSet.Put( SvxEmphasisMarkItem(FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK ) );
rTitleSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF ) );
- rTitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
- rTitleSet.Put(SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ));
+ rTitleSet.Put(SvxColorItem( COL_AUTO, EE_CHAR_COLOR ));
+ rTitleSet.Put(SvxBackgroundColorItem( COL_AUTO, EE_CHAR_BKGCOLOR ));
rTitleSet.Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST ));
rTitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
// #i16874# enable kerning by default but only for new documents
@@ -408,8 +408,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rSubtitleSet.Put(SvxContourItem(false, EE_CHAR_OUTLINE ));
rSubtitleSet.Put( SvxEmphasisMarkItem(FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK ) );
rSubtitleSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF ) );
- rSubtitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
- rSubtitleSet.Put(SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ));
+ rSubtitleSet.Put(SvxColorItem( COL_AUTO, EE_CHAR_COLOR ));
+ rSubtitleSet.Put(SvxBackgroundColorItem( COL_AUTO, EE_CHAR_BKGCOLOR ));
rSubtitleSet.Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST ));
rSubtitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
// #i16874# enable kerning by default but only for new documents
@@ -457,8 +457,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rNotesSet.Put( SvxContourItem(false, EE_CHAR_OUTLINE ) );
rNotesSet.Put( SvxEmphasisMarkItem(FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK ) );
rNotesSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF) );
- rNotesSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ) );
- rNotesSet.Put( SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ) );
+ rNotesSet.Put( SvxColorItem( COL_AUTO, EE_CHAR_COLOR ) );
+ rNotesSet.Put( SvxBackgroundColorItem( COL_AUTO, EE_CHAR_BKGCOLOR ) );
rNotesSet.Put( SvxLRSpaceItem( 0, 0, 600, -600, EE_PARA_LRSPACE ) );
// #i16874# enable kerning by default but only for new documents
rNotesSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
@@ -481,7 +481,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
pSheet->SetParent( OUString() );
SfxItemSet& rBackgroundObjectsSet = pSheet->GetItemSet();
rBackgroundObjectsSet.Put(makeSdrShadowItem(false));
- rBackgroundObjectsSet.Put(makeSdrShadowColorItem(Color(COL_GRAY)));
+ rBackgroundObjectsSet.Put(makeSdrShadowColorItem(COL_GRAY));
rBackgroundObjectsSet.Put(makeSdrShadowXDistItem(200)); // 3 mm shadow distance
rBackgroundObjectsSet.Put(makeSdrShadowYDistItem(200));
// #i16874# enable kerning by default but only for new documents
@@ -1092,7 +1092,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetBulletFont(&rBulletFont);
aNumberFormat.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34
aNumberFormat.SetBulletRelSize(45);
- aNumberFormat.SetBulletColor(Color(COL_AUTO));
+ aNumberFormat.SetBulletColor(COL_AUTO);
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SvxAdjust::Left);
@@ -1148,7 +1148,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
{
// Outline template
SvxNumberFormat aNumberFormat(SVX_NUM_CHAR_SPECIAL);
- aNumberFormat.SetBulletColor(Color(COL_AUTO));
+ aNumberFormat.SetBulletColor(COL_AUTO);
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SvxAdjust::Left);
@@ -1187,7 +1187,7 @@ vcl::Font SdStyleSheetPool::GetBulletFont()
aBulletFont.SetItalic(ITALIC_NONE);
aBulletFont.SetOutline(false);
aBulletFont.SetShadow(false);
- aBulletFont.SetColor(Color(COL_AUTO));
+ aBulletFont.SetColor(COL_AUTO);
aBulletFont.SetTransparent(true);
return aBulletFont;
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 1e8c666f68bb..6c6792d6c780 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -811,7 +811,7 @@ void HtmlExport::SetDocColors( SdPage* pPage )
maVLinkColor = aConfig.GetColorValue(svtools::LINKSVISITED).nColor;
maALinkColor = aConfig.GetColorValue(svtools::LINKS).nColor;
maLinkColor = aConfig.GetColorValue(svtools::LINKS).nColor;
- maTextColor = Color(COL_BLACK);
+ maTextColor = COL_BLACK;
SfxStyleSheet* pSheet = nullptr;
@@ -1422,7 +1422,7 @@ OUString HtmlExport::ParagraphToHTMLString( SdrOutliner const * pOutliner, sal_I
if(nullptr == pPara)
return OUString();
- HtmlState aState( (mbUserAttr || mbDocColors) ? maTextColor : Color(COL_BLACK) );
+ HtmlState aState( (mbUserAttr || mbDocColors) ? maTextColor : COL_BLACK );
std::vector<sal_Int32> aPortionList;
rEditEngine.GetPortions( nPara, aPortionList );
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 7012cb278b36..0f151eef9775 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1061,7 +1061,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
get(mpLBAfterEffect, "aeffect_list" );
get(mpFTDimColor, "dim_color_label" );
get(mpCLBDimColor, "dim_color_list" );
- mpCLBDimColor->SelectEntry(Color(COL_BLACK));
+ mpCLBDimColor->SelectEntry(COL_BLACK);
get(mpFTTextAnim, "text_animation_label" );
get(mpLBTextAnim, "text_animation_list" );
get(mpMFTextDelay,"text_delay" );
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 688a15873920..17668e4f36c0 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -332,7 +332,7 @@ MotionPathTag::MotionPathTag( CustomAnimationPane& rPane, ::sd::View& rView, con
OUString aEmpty( "?" );
mpPathObj->SetMergedItem( XLineDashItem( aEmpty, aDash ) );
mpPathObj->SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) );
- mpPathObj->SetMergedItem( XLineColorItem(aEmpty, ::Color(COL_GRAY)) );
+ mpPathObj->SetMergedItem( XLineColorItem(aEmpty, ::COL_GRAY) );
mpPathObj->SetMergedItem( XFillStyleItem( drawing::FillStyle_NONE ) );
::basegfx::B2DPolygon aStartArrow;
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 2294115c0394..bdf41e19a65b 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -1226,7 +1226,7 @@ Color AnnotationManagerImpl::GetColor(sal_uInt16 aAuthorIndex)
return aArrayNormal[ aAuthorIndex % SAL_N_ELEMENTS( aArrayNormal ) ];
}
- return Color(COL_WHITE);
+ return COL_WHITE;
}
Color AnnotationManagerImpl::GetColorLight(sal_uInt16 aAuthorIndex)
@@ -1241,7 +1241,7 @@ Color AnnotationManagerImpl::GetColorLight(sal_uInt16 aAuthorIndex)
return aArrayLight[ aAuthorIndex % SAL_N_ELEMENTS( aArrayLight ) ];
}
- return Color(COL_WHITE);
+ return COL_WHITE;
}
Color AnnotationManagerImpl::GetColorDark(sal_uInt16 aAuthorIndex)
@@ -1256,7 +1256,7 @@ Color AnnotationManagerImpl::GetColorDark(sal_uInt16 aAuthorIndex)
return aArrayAnkor[ aAuthorIndex % SAL_N_ELEMENTS( aArrayAnkor ) ];
}
- return Color(COL_WHITE);
+ return COL_WHITE;
}
SdPage* AnnotationManagerImpl::GetNextPage( SdPage const * pPage, bool bForward )
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index c7d0c8243a27..da03348b075f 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -789,7 +789,7 @@ void SdPhotoAlbumDialog::createCaption(const awt::Size& aPageSize )
SfxItemSet aSet(pDoc->GetItemPool() );
aSet.Put( XFillStyleItem(drawing::FillStyle_SOLID) );
- aSet.Put( XFillColorItem( "", Color(COL_BLACK) ) );
+ aSet.Put( XFillColorItem( "", COL_BLACK ) );
aSet.Put( XFillTransparenceItem( 20 ) );
pSdrObj->SetMergedItemSetAndBroadcast(aSet);
}
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
index f5618622d042..5fa5dc69ab50 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
@@ -328,7 +328,7 @@ void ClientBox::DrawRow(vcl::RenderContext& rRenderContext, const ::tools::Recta
DrawText(m_sPinTextRect, sPinText);
}
- rRenderContext.SetLineColor(Color(COL_LIGHTGRAY));
+ rRenderContext.SetLineColor(COL_LIGHTGRAY);
rRenderContext.DrawLine(rRect.BottomLeft(), rRect.BottomRight());
}
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index a654fbe6417e..1c69894cf011 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -149,7 +149,7 @@ void SdDocPreviewWin::updateViewSettings()
bool bUseWhiteColor = !aAccOptions.GetIsForPagePreviews() && GetSettings().GetStyleSettings().GetHighContrastMode();
if( bUseWhiteColor )
{
- maDocumentColor = Color( COL_WHITE );
+ maDocumentColor = COL_WHITE;
}
else
{
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index f706d61b0a3d..da9f2f6679d1 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -791,7 +791,7 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools:
maOutRect = aDecoView.DrawFrame(maOutRect, DrawFrameStyle::In);
// draw page background
- rRenderContext.SetFillColor(Color(COL_WHITE));
+ rRenderContext.SetFillColor(COL_WHITE);
rRenderContext.DrawRect(maOutRect);
// paint presentation objects from masterpage
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index b70234500935..8553cbea1ba4 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -70,7 +70,7 @@ ShowWindow::ShowWindow( const ::rtl::Reference< SlideshowImpl >& xController, vc
maMouseTimer.SetInvokeHandler( LINK( this, ShowWindow, MouseTimeoutHdl ) );
maMouseTimer.SetTimeout( HIDE_MOUSE_TIMEOUT );
- maShowBackground = Wallpaper( Color( COL_BLACK ) );
+ maShowBackground = Wallpaper( COL_BLACK );
SetBackground(); // avoids that VCL paints any background!
GetParent()->Show();
AddEventListener( LINK( this, ShowWindow, EventHdl ) );
@@ -294,7 +294,7 @@ void ShowWindow::SetEndMode()
{
DeleteWindowFromPaintView();
meShowWindowMode = SHOWWINDOWMODE_END;
- maShowBackground = Wallpaper( Color( COL_BLACK ) );
+ maShowBackground = Wallpaper( COL_BLACK );
// hide navigator if it is visible
if( mpViewShell->GetViewFrame()->GetChildWindow( SID_NAVIGATOR ) )
@@ -324,7 +324,7 @@ bool ShowWindow::SetPauseMode( sal_Int32 nTimeout, Graphic const * pLogo )
mnPauseTimeout = nTimeout;
mnRestartPageIndex = 0;
meShowWindowMode = SHOWWINDOWMODE_PAUSE;
- maShowBackground = Wallpaper( Color( COL_BLACK ) );
+ maShowBackground = Wallpaper( COL_BLACK );
// hide navigator if it is visible
if( mpViewShell->GetViewFrame()->GetChildWindow( SID_NAVIGATOR ) )
@@ -378,7 +378,7 @@ void ShowWindow::TerminateShow()
maPauseTimer.Stop();
maMouseTimer.Stop();
Erase();
- maShowBackground = Wallpaper( Color( COL_BLACK ) );
+ maShowBackground = Wallpaper( COL_BLACK );
meShowWindowMode = SHOWWINDOWMODE_NORMAL;
mnPauseTimeout = SLIDE_NO_TIMEOUT;
@@ -411,7 +411,7 @@ void ShowWindow::RestartShow( sal_Int32 nPageIndexToRestart )
maLogo.Clear();
maPauseTimer.Stop();
Erase();
- maShowBackground = Wallpaper( Color( COL_BLACK ) );
+ maShowBackground = Wallpaper( COL_BLACK );
meShowWindowMode = SHOWWINDOWMODE_NORMAL;
mnPauseTimeout = SLIDE_NO_TIMEOUT;
@@ -489,7 +489,7 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
aVMap.SetOrigin( Point() );
pVDev->SetMapMode( aVMap );
- pVDev->SetBackground( Wallpaper( Color( COL_BLACK ) ) );
+ pVDev->SetBackground( Wallpaper( COL_BLACK ) );
// set font first, to determine real output height
pVDev->SetFont( aFont );
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index d55b9adb66a1..4ad0e1042cd6 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1100,7 +1100,7 @@ void SlideshowImpl::onFirstPaint()
if( mpShowWindow )
{
/*
- mpShowWindow->SetBackground( Wallpaper( Color( COL_BLACK ) ) );
+ mpShowWindow->SetBackground( Wallpaper( COL_BLACK ) );
mpShowWindow->Erase();
mpShowWindow->SetBackground();
*/
@@ -1995,7 +1995,7 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl, void*, void)
PopupMenu* pBlankMenu = pMenu->GetPopupMenu(pMenu->GetItemId("screen"));
if( pBlankMenu )
{
- pBlankMenu->CheckItem((mpShowWindow->GetBlankColor() == Color(COL_WHITE)) ? pBlankMenu->GetItemId("white") : pBlankMenu->GetItemId("black"));
+ pBlankMenu->CheckItem((mpShowWindow->GetBlankColor() == COL_WHITE) ? pBlankMenu->GetItemId("white") : pBlankMenu->GetItemId("black"));
}
}
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 0d54c61b3182..4b6203418f5c 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -103,8 +103,8 @@ TableDesignWidget::TableDesignWidget( VclBuilderContainer* pParent, ViewShellBas
}
else
{
- m_pValueSet->SetColor( Color( COL_WHITE ) );
- m_pValueSet->SetBackground( Color( COL_WHITE ) );
+ m_pValueSet->SetColor( COL_WHITE );
+ m_pValueSet->SetBackground( Color(COL_WHITE) );
}
m_pValueSet->SetSelectHdl (LINK(this, TableDesignWidget, implValueSetHdl));
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 2e55d56edfe0..f70554442f34 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1549,7 +1549,7 @@ private:
SdrPathObj* pPathObj = new SdrPathObj(OBJ_PATHLINE, aPathPoly );
pPathObj->SetMergedItem(XLineStyleItem(drawing::LineStyle_SOLID));
- pPathObj->SetMergedItem(XLineColorItem(OUString(), Color(COL_BLACK)));
+ pPathObj->SetMergedItem(XLineColorItem(OUString(), COL_BLACK));
pHandout->NbcInsertObject( pPathObj );
}
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index d7703f62a73e..a30de99a727b 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1239,7 +1239,7 @@ CustomPropertiesYesNoButton::CustomPropertiesYesNoButton(vcl::Window* pParent)
SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) );
SetBorderStyle( WindowBorderStyle::MONO );
CheckNo();
- Wallpaper aWall( Color( COL_TRANSPARENT ) );
+ Wallpaper aWall( COL_TRANSPARENT );
m_aYesButton->SetBackground( aWall );
m_aNoButton->SetBackground( aWall );
}
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index 4f3255591a88..48e0d426bb44 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -451,7 +451,7 @@ namespace slideshow
mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ),
Size( aAWTRect.Width, aAWTRect.Height ) );
}
- mpMediaWindow->SetBackground( Color( COL_BLACK ) );
+ mpMediaWindow->SetBackground( Color(COL_BLACK) );
mpMediaWindow->SetParentClipMode( ParentClipMode::NoClip );
mpMediaWindow->EnableEraseBackground( false );
mpMediaWindow->EnablePaint( false );
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 5353c344eec9..bccb590094c6 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -727,8 +727,8 @@ SmElementsDockingWindow::SmElementsDockingWindow(SfxBindings* pInputBindings, Sf
mpElementListBox->SetSelectHdl(LINK(this, SmElementsDockingWindow, ElementSelectedHandle));
mpElementListBox->SelectEntry(SmResId(RID_CATEGORY_UNARY_BINARY_OPERATORS));
- mpElementsControl->SetBackground( Color( COL_WHITE ) );
- mpElementsControl->SetTextColor( Color( COL_BLACK ) );
+ mpElementsControl->SetBackground( Color(COL_WHITE) );
+ mpElementsControl->SetTextColor( COL_BLACK );
mpElementsControl->setElementSetId(RID_CATEGORY_UNARY_BINARY_OPERATORS);
mpElementsControl->SetSelectHdl(LINK(this, SmElementsDockingWindow, SelectClickHandler));
}
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index d7dd6e4cd276..abfacfff8c22 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1877,24 +1877,24 @@ void SmFontNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
case TNBOLD : ClearAttribut(FontAttribute::Bold); break;
case TNITALIC : ClearAttribut(FontAttribute::Italic); break;
- case TBLACK : SetColor(Color(COL_BLACK)); break;
- case TWHITE : SetColor(Color(COL_WHITE)); break;
- case TRED : SetColor(Color(COL_LIGHTRED)); break;
- case TGREEN : SetColor(Color(COL_GREEN)); break;
- case TBLUE : SetColor(Color(COL_LIGHTBLUE)); break;
- case TCYAN : SetColor(Color(COL_LIGHTCYAN)); break; // as in Calc
- case TMAGENTA : SetColor(Color(COL_LIGHTMAGENTA)); break; // as in Calc
- case TYELLOW : SetColor(Color(COL_YELLOW)); break;
- case TTEAL : SetColor(Color(COL_CYAN)); break;
- case TSILVER : SetColor(Color(COL_LIGHTGRAY)); break;
- case TGRAY : SetColor(Color(COL_GRAY)); break;
- case TMAROON : SetColor(Color(COL_RED)); break;
- case TPURPLE : SetColor(Color(COL_MAGENTA)); break;
- case TLIME : SetColor(Color(COL_LIGHTGREEN)); break;
- case TOLIVE : SetColor(Color(COL_BROWN)); break;
- case TNAVY : SetColor(Color(COL_BLUE)); break;
- case TAQUA : SetColor(Color(COL_LIGHTCYAN)); break;
- case TFUCHSIA : SetColor(Color(COL_LIGHTMAGENTA)); break;
+ case TBLACK : SetColor(COL_BLACK); break;
+ case TWHITE : SetColor(COL_WHITE); break;
+ case TRED : SetColor(COL_LIGHTRED); break;
+ case TGREEN : SetColor(COL_GREEN); break;
+ case TBLUE : SetColor(COL_LIGHTBLUE); break;
+ case TCYAN : SetColor(COL_LIGHTCYAN); break; // as in Calc
+ case TMAGENTA : SetColor(COL_LIGHTMAGENTA); break; // as in Calc
+ case TYELLOW : SetColor(COL_YELLOW); break;
+ case TTEAL : SetColor(COL_CYAN); break;
+ case TSILVER : SetColor(COL_LIGHTGRAY); break;
+ case TGRAY : SetColor(COL_GRAY); break;
+ case TMAROON : SetColor(COL_RED); break;
+ case TPURPLE : SetColor(COL_MAGENTA); break;
+ case TLIME : SetColor(COL_LIGHTGREEN); break;
+ case TOLIVE : SetColor(COL_BROWN); break;
+ case TNAVY : SetColor(COL_BLUE); break;
+ case TAQUA : SetColor(COL_LIGHTCYAN); break;
+ case TFUCHSIA : SetColor(COL_LIGHTMAGENTA); break;
default:
SAL_WARN("starmath", "unknown case");
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 353d3658d90d..4dc0db132ec5 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1096,7 +1096,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri
const sal_uInt16 nZoomFactor = static_cast< sal_uInt16 >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
rOutDev.Push();
- rOutDev.SetLineColor( Color(COL_BLACK) );
+ rOutDev.SetLineColor( COL_BLACK );
// output text on top
if (bIsPrintTitle)
@@ -1108,7 +1108,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri
aFont.SetAlignment(ALIGN_TOP);
aFont.SetWeight(WEIGHT_BOLD);
aFont.SetFontSize(aSize650);
- aFont.SetColor( Color(COL_BLACK) );
+ aFont.SetColor( COL_BLACK );
rOutDev.SetFont(aFont);
Size aTitleSize (GetTextSize(rOutDev, GetDoc()->GetTitle(), aOutRect.GetWidth() - 200));
@@ -1150,7 +1150,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri
{
vcl::Font aFont(FAMILY_DONTKNOW, Size(0, 600));
aFont.SetAlignment(ALIGN_TOP);
- aFont.SetColor( Color(COL_BLACK) );
+ aFont.SetColor( COL_BLACK );
// get size
rOutDev.SetFont(aFont);
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 84cde6331f24..fdb1e2103de8 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -191,7 +191,7 @@ void SmCaretDrawingVisitor::Visit( SmTextNode* pNode )
long right_line = pLine->GetRight( ) + maOffset.X( );
//Set color
- mrDev.SetLineColor( Color( COL_BLACK ) );
+ mrDev.SetLineColor( COL_BLACK );
if ( mbCaretVisible ) {
//Draw vertical line
@@ -219,7 +219,7 @@ void SmCaretDrawingVisitor::DefaultVisit( SmNode* pNode )
long right_line = pLine->GetRight( ) + maOffset.X( );
//Set color
- mrDev.SetLineColor( Color( COL_BLACK ) );
+ mrDev.SetLineColor( COL_BLACK );
if ( mbCaretVisible ) {
//Draw vertical line
@@ -1859,7 +1859,7 @@ SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, SmN
mrDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
//Change colors
mrDev.SetLineColor( );
- mrDev.SetFillColor( Color( COL_LIGHTGRAY ) );
+ mrDev.SetFillColor( COL_LIGHTGRAY );
//Draw rectangle
mrDev.DrawRect( maSelectionArea );
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 2c70900be729..3f1cf19a0b20 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -129,16 +129,16 @@ ImpSvNumberformatScan::ImpSvNumberformatScan( SvNumberFormatter* pFormatterP )
if ( bStandardColorNeedInitialization )
{
bStandardColorNeedInitialization = false;
- StandardColor.push_back( Color(COL_BLACK) );
- StandardColor.push_back( Color(COL_LIGHTBLUE) );
- StandardColor.push_back( Color(COL_LIGHTGREEN) );
- StandardColor.push_back( Color(COL_LIGHTCYAN) );
- StandardColor.push_back( Color(COL_LIGHTRED) );
- StandardColor.push_back( Color(COL_LIGHTMAGENTA) );
- StandardColor.push_back( Color(COL_BROWN) );
- StandardColor.push_back( Color(COL_GRAY) );
- StandardColor.push_back( Color(COL_YELLOW) );
- StandardColor.push_back( Color(COL_WHITE) );
+ StandardColor.push_back( COL_BLACK );
+ StandardColor.push_back( COL_LIGHTBLUE );
+ StandardColor.push_back( COL_LIGHTGREEN );
+ StandardColor.push_back( COL_LIGHTCYAN );
+ StandardColor.push_back( COL_LIGHTRED );
+ StandardColor.push_back( COL_LIGHTMAGENTA );
+ StandardColor.push_back( COL_BROWN );
+ StandardColor.push_back( COL_GRAY );
+ StandardColor.push_back( COL_YELLOW );
+ StandardColor.push_back( COL_WHITE );
static_assert( NF_KEY_BLACK - NF_KEY_COLOR == 1, "bad FARBE(COLOR), SCHWARZ(BLACK) sequence");
static_assert( NF_KEY_FIRSTCOLOR - NF_KEY_COLOR == 1, "bad color sequence");
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 027549077fcb..ee4326154038 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -65,7 +65,7 @@ void BrowseBox::ConstructImpl( BrowserMode nMode )
pDataWin = VclPtr<BrowserDataWin>::Create( this ).get();
m_pImpl.reset( new ::svt::BrowseBoxImpl() );
- aGridLineColor = Color( COL_LIGHTGRAY );
+ aGridLineColor = COL_LIGHTGRAY;
InitSettings_Impl( this );
InitSettings_Impl( pDataWin );
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 7432a57edf49..89c3babea3c7 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -606,7 +606,7 @@ void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
else
{
rRenderContext.Push(PushFlags::FILLCOLOR);
- rRenderContext.SetFillColor(Color(COL_BLACK));
+ rRenderContext.SetFillColor(COL_BLACK);
rRenderContext.DrawRect(tools::Rectangle(Point(nX, 0), Size(pCol->Width(), GetTitleHeight() - 1)));
rRenderContext.Pop();
}
@@ -725,7 +725,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
aButtonFrame.Draw( *pDev );
pDev->Push( PushFlags::LINECOLOR );
- pDev->SetLineColor( Color( COL_BLACK ) );
+ pDev->SetLineColor( COL_BLACK );
pDev->DrawLine( Point( aRealPos.X(), aRealPos.Y() + nTitleHeight-1 ),
Point( aRealPos.X() + pFirstCol->Width() - 1, aRealPos.Y() + nTitleHeight-1 ) );
@@ -791,7 +791,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const tools::Rectangle& _rRec
// cache frequently used values
Point aPos( aOverallAreaPos.X(), nRelTopRow * nDataRowHeigt + aOverallAreaPos.Y() );
- _rOut.SetLineColor( Color( COL_WHITE ) );
+ _rOut.SetLineColor( COL_WHITE );
const AllSettings& rAllSets = _rOut.GetSettings();
const StyleSettings &rSettings = rAllSets.GetStyleSettings();
const Color &rHighlightTextColor = rSettings.GetHighlightTextColor();
@@ -961,7 +961,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const tools::Rectangle& _rRec
{
// fill rectangle gray below handle column
// DG: fill it only until the end of the drawing rect and not to the end, as this may overpaint handle columns
- _rOut.SetLineColor( Color( COL_BLACK ) );
+ _rOut.SetLineColor( COL_BLACK );
_rOut.DrawRect( tools::Rectangle(
Point( aOverallAreaPos.X() - 1, aPos.Y() - 1 ),
Point( aOverallAreaPos.X() + pCols[ 0 ]->Width() - 1,
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 2385b7d8b907..881396dfa853 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -134,7 +134,7 @@ void BrowserColumn::Draw( BrowseBox const & rBox, OutputDevice& rDev, const Poin
ButtonFrame( rPos, Size( Width()-1, rBox.GetDataRowHeight()-1 ),
"", false ).Draw( rDev );
Color aOldLineColor = rDev.GetLineColor();
- rDev.SetLineColor( Color( COL_BLACK ) );
+ rDev.SetLineColor( COL_BLACK );
rDev.DrawLine(
Point( rPos.X(), rPos.Y()+rBox.GetDataRowHeight()-1 ),
Point( rPos.X() + Width() - 1, rPos.Y()+rBox.GetDataRowHeight()-1 ) );
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 05094cc40c30..2928cbb61f76 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -112,7 +112,7 @@ namespace svt
m_aImpl.reset(new EditBrowseBoxImpl);
SetCompoundControl(true);
- SetGridLineColor( Color( COL_LIGHTGRAY ) );
+ SetGridLineColor( COL_LIGHTGRAY );
ImplInitSettings(true, true, true);
diff --git a/svtools/source/contnr/iconview.cxx b/svtools/source/contnr/iconview.cxx
index c7f7d9181d59..9af84362f45f 100644
--- a/svtools/source/contnr/iconview.cxx
+++ b/svtools/source/contnr/iconview.cxx
@@ -182,7 +182,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, long nX, long nY,
aRect.SetSize(aRectSize);
Color aBackgroundColor = aWallpaper.GetColor();
- if (aBackgroundColor != Color(COL_TRANSPARENT))
+ if (aBackgroundColor != COL_TRANSPARENT)
{
rRenderContext.SetFillColor(aBackgroundColor);
// this case may occur for smaller horizontal resizes
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index e97d67952430..d04cd408dae4 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -1538,7 +1538,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const tools::Rectangle& rTextRect, bo
if (bCursored)
{
aOldLineColor = rRenderContext.GetLineColor();
- rRenderContext.SetLineColor(Color(COL_GRAY));
+ rRenderContext.SetLineColor(COL_GRAY);
}
rRenderContext.DrawRect(rTextRect);
if (bCursored)
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 0a229ca5e6f3..f11071fe9790 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2889,7 +2889,7 @@ void SvImpLBox::PaintDDCursor( SvTreeListEntry* pInsertionPos )
RasterOp eOldOp = pView->GetRasterOp();
pView->SetRasterOp( RasterOp::Invert );
Color aOldLineColor = pView->GetLineColor();
- pView->SetLineColor( Color( COL_BLACK ) );
+ pView->SetLineColor( COL_BLACK );
pView->DrawLine( Point( 0, nY ), Point( aOutputSize.Width(), nY ) );
pView->SetLineColor( aOldLineColor );
pView->SetRasterOp( eOldOp );
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index aa070ff36a88..8bfda5c3d37f 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -2822,7 +2822,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
if (!(nCurTab == 0 && (nTreeFlags & SvTreeFlags::USESEL) && nFirstSelTab))
{
Color aBackgroundColor = aWallpaper.GetColor();
- if (aBackgroundColor != Color(COL_TRANSPARENT))
+ if (aBackgroundColor != COL_TRANSPARENT)
{
rRenderContext.SetFillColor(aBackgroundColor);
// this case may occur for smaller horizontal resizes
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index e89605313e54..3771de6a8f7d 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -313,7 +313,7 @@ void Calendar::ImplFormat()
mnDayCount += 42-nDaysInMonth-nWeekDay;
// determine colours
- maOtherColor = Color( COL_LIGHTGRAY );
+ maOtherColor = COL_LIGHTGRAY;
if ( maOtherColor.IsRGBEqual( GetBackground().GetColor() ) )
maOtherColor = COL_GRAY;
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index d2777c670e7e..5c1f32d1cd95 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -444,7 +444,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
// display text
if (!pItem->maOutText.isEmpty())
{
- if (aSelectionTextColor != Color(COL_TRANSPARENT))
+ if (aSelectionTextColor != COL_TRANSPARENT)
{
rRenderContext.Push(PushFlags::TEXTCOLOR);
rRenderContext.SetTextColor(aSelectionTextColor);
@@ -453,7 +453,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
rRenderContext.DrawText(Point(nTxtPos, nTxtPosY), pItem->maOutText);
else
rRenderContext.DrawCtrlText(Point(nTxtPos, nTxtPosY), pItem->maOutText, 0, pItem->maOutText.getLength(), DrawTextFlags::Disable);
- if (aSelectionTextColor != Color(COL_TRANSPARENT))
+ if (aSelectionTextColor != COL_TRANSPARENT)
rRenderContext.Pop();
}
@@ -924,7 +924,7 @@ void HeaderBar::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/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 2cd5bd234484..1c623f210b97 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -219,14 +219,14 @@ struct ImplTabBarItem
, mbShort(false)
, mbSelect(false)
, mbProtect(false)
- , maTabBgColor(Color(COL_AUTO))
- , maTabTextColor(Color(COL_AUTO))
+ , maTabBgColor(COL_AUTO)
+ , maTabTextColor(COL_AUTO)
{
}
bool IsDefaultTabBgColor() const
{
- return maTabBgColor == Color(COL_AUTO);
+ return maTabBgColor == COL_AUTO;
}
bool IsSelected(ImplTabBarItem const * pCurItem) const
@@ -1208,7 +1208,7 @@ void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& r
if (pItem->mnBits & TabBarPageBits::Blue)
{
- rRenderContext.SetTextColor(Color(COL_LIGHTBLUE));
+ rRenderContext.SetTextColor(COL_LIGHTBLUE);
}
if (pItem->mnBits & TabBarPageBits::Italic)
{
@@ -1653,7 +1653,7 @@ Color TabBar::GetTabBgColor(sal_uInt16 nPageId) const
if (nPos != PAGE_NOT_FOUND)
return mpImpl->mpItemList[nPos]->maTabBgColor;
else
- return Color(COL_AUTO);
+ return COL_AUTO;
}
void TabBar::SetTabBgColor(sal_uInt16 nPageId, const Color& aTabBgColor)
@@ -1663,18 +1663,18 @@ void TabBar::SetTabBgColor(sal_uInt16 nPageId, const Color& aTabBgColor)
return;
auto& pItem = mpImpl->mpItemList[nPos];
- if (aTabBgColor != Color(COL_AUTO))
+ if (aTabBgColor != COL_AUTO)
{
pItem->maTabBgColor = aTabBgColor;
if (aTabBgColor.GetLuminance() <= 128) //Do not use aTabBgColor.IsDark(), because that threshold is way too low...
- pItem->maTabTextColor = Color(COL_WHITE);
+ pItem->maTabTextColor = COL_WHITE;
else
- pItem->maTabTextColor = Color(COL_BLACK);
+ pItem->maTabTextColor = COL_BLACK;
}
else
{
- pItem->maTabBgColor = Color(COL_AUTO);
- pItem->maTabTextColor = Color(COL_AUTO);
+ pItem->maTabBgColor = COL_AUTO;
+ pItem->maTabTextColor = COL_AUTO;
}
}
@@ -2112,7 +2112,7 @@ bool TabBar::StartEditMode(sal_uInt16 nPageId)
}
if (GetPageBits( mnEditId ) & TabBarPageBits::Blue)
{
- aForegroundColor = Color(COL_LIGHTBLUE);
+ aForegroundColor = COL_LIGHTBLUE;
}
mpImpl->mpEdit->SetControlFont(aFont);
mpImpl->mpEdit->SetControlForeground(aForegroundColor);
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 4d4e0a8d89bc..54d7e3bbbf02 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -772,13 +772,13 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt
const Color& rBack = rWall.GetColor();
if (rBack.IsDark() && ! aDoubleColor.IsBright())
{
- aDoubleColor = Color(COL_WHITE);
- aSingleColor = Color(COL_BLACK);
+ aDoubleColor = COL_WHITE;
+ aSingleColor = COL_BLACK;
}
else if (rBack.IsBright() && ! aDoubleColor.IsDark())
{
- aDoubleColor = Color(COL_BLACK);
- aSingleColor = Color(COL_WHITE);
+ aDoubleColor = COL_BLACK;
+ aSingleColor = COL_WHITE;
}
}
}
@@ -792,7 +792,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt
if (bDrawSel)
{
- rRenderContext.SetLineColor(mbBlackSel ? Color(COL_BLACK) : aDoubleColor);
+ rRenderContext.SetLineColor(mbBlackSel ? COL_BLACK : aDoubleColor);
rRenderContext.DrawRect(aRect);
}
}
@@ -800,7 +800,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt
{
if (bDrawSel)
{
- rRenderContext.SetLineColor(mbBlackSel ? Color(COL_BLACK) : aDoubleColor);
+ rRenderContext.SetLineColor(mbBlackSel ? COL_BLACK : aDoubleColor);
rRenderContext.DrawRect(aRect);
}
if (mbDoubleSel)
@@ -835,11 +835,11 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt
if (bDrawSel)
{
- rRenderContext.SetLineColor(mbBlackSel ? Color(COL_WHITE) : aSingleColor);
+ rRenderContext.SetLineColor(mbBlackSel ? COL_WHITE : aSingleColor);
}
else
{
- rRenderContext.SetLineColor(Color(COL_LIGHTGRAY));
+ rRenderContext.SetLineColor(COL_LIGHTGRAY);
}
rRenderContext.DrawRect(aRect2);
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index 8d48bca87706..fd3ce0c39be8 100644
--- a/svtools/source/filter/DocumentToGraphicRenderer.cxx
+++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx
@@ -206,7 +206,7 @@ Graphic DocumentToGraphicRenderer::renderToGraphic(
aMtf.Record( pOutputDev );
- if (aPageColor != Color(COL_TRANSPARENT))
+ if (aPageColor != COL_TRANSPARENT)
{
pOutputDev->SetBackground(Wallpaper(aPageColor));
pOutputDev->Erase();
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 2c9429f01be6..61d587ea089a 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -685,7 +685,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
}
else // scaleByAveraging
{
- const BitmapColor aTrans( pWriteAccess->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aTrans( pWriteAccess->GetBestMatchingColor( Color(COL_WHITE) ) );
BitmapColor aResultColor( 0 );
double aSum, aCount;
@@ -746,7 +746,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
}
else
{
- const BitmapColor aTrans( pWriteAccess->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aTrans( pWriteAccess->GetBestMatchingColor( Color(COL_WHITE) ) );
BitmapColor aAlphaVal( 0 );
for( long nY = 0; nY < aTargetHeight; nY++ )
@@ -802,8 +802,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
if( pWriteAccess )
{
Bitmap aMsk( rBmpEx.GetMask() );
- const BitmapColor aB( pWriteAccess->GetBestMatchingColor( Color( COL_BLACK ) ) );
- const BitmapColor aW( pWriteAccess->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aB( pWriteAccess->GetBestMatchingColor( Color(COL_BLACK) ) );
+ const BitmapColor aW( pWriteAccess->GetBestMatchingColor( Color(COL_WHITE) ) );
BitmapReadAccess* pMAcc = nullptr;
if( !aMsk || ( ( pMAcc = aMsk.AcquireReadAccess() ) != nullptr ) )
@@ -813,7 +813,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
BitmapColor aTestB;
if( pMAcc )
- aTestB = pMAcc->GetBestMatchingColor( Color( COL_BLACK ) );
+ aTestB = pMAcc->GetBestMatchingColor( Color(COL_BLACK) );
// create new horizontal mapping table
for( long nX = 0; nX < aUnrotatedWidth; nX++ )
@@ -1448,7 +1448,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, Gra
if( ( nAdjustmentFlags & GraphicAdjustmentFlags::ROTATE ) && aAttr.IsRotated() )
{
- rBmpEx.Rotate( aAttr.GetRotation(), Color( COL_TRANSPARENT ) );
+ rBmpEx.Rotate( aAttr.GetRotation(), COL_TRANSPARENT );
}
if( ( nAdjustmentFlags & GraphicAdjustmentFlags::TRANSPARENCY ) && aAttr.IsTransparent() )
@@ -1881,7 +1881,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& r
AlphaMask( aVDev->GetBitmap( Point(0,0), aVDev->GetOutputSize() ) ) );
else
aTileBitmap = BitmapEx( aTileBitmap.GetBitmap(),
- aVDev->GetBitmap( Point(0,0), aVDev->GetOutputSize() ).CreateMask( Color(COL_WHITE) ) );
+ aVDev->GetBitmap( Point(0,0), aVDev->GetOutputSize() ).CreateMask( COL_WHITE ) );
}
}
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index c6890a2c6f29..c7d0e4d82c01 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -624,7 +624,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const tools::Rectangle &rRect, con
Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, nullptr );
vcl::Font aFnt( "Helvetica", aAppFontSz );
aFnt.SetTransparent( true );
- aFnt.SetColor( Color( COL_LIGHTRED ) );
+ aFnt.SetColor( COL_LIGHTRED );
aFnt.SetWeight( WEIGHT_BOLD );
aFnt.SetFamily( FAMILY_SWISS );
@@ -707,7 +707,7 @@ void EmbeddedObjectRef::DrawShading( const tools::Rectangle &rRect, OutputDevice
return;
pOut->Push();
- pOut->SetLineColor( Color( COL_BLACK ) );
+ pOut->SetLineColor( COL_BLACK );
Size aPixSize = pOut->LogicToPixel( rRect.GetSize() );
aPixSize.AdjustWidth( -1 );
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 4784c54a6fa2..33fd03046fc9 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -402,11 +402,11 @@ SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window*
get(m_pCbxTrans, "cbx5");
get(m_pLbColorTrans, "color5");
- m_pLbColorTrans->SelectEntry(Color(COL_BLACK));
- m_pLbColor1->SelectEntry(Color(COL_TRANSPARENT));
- m_pLbColor2->SelectEntry(Color(COL_TRANSPARENT));
- m_pLbColor3->SelectEntry(Color(COL_TRANSPARENT));
- m_pLbColor4->SelectEntry(Color(COL_TRANSPARENT));
+ m_pLbColorTrans->SelectEntry(COL_BLACK);
+ m_pLbColor1->SelectEntry(COL_TRANSPARENT);
+ m_pLbColor2->SelectEntry(COL_TRANSPARENT);
+ m_pLbColor3->SelectEntry(COL_TRANSPARENT);
+ m_pLbColor4->SelectEntry(COL_TRANSPARENT);
m_pTbxPipette->SetSelectHdl( LINK( pData, MaskData, PipetteHdl ) );
m_pBtnExec->SetClickHdl( LINK( pData, MaskData, ExecHdl ) );
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 322d06dfb970..7e4180b8f986 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -119,8 +119,8 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
if ( pVDev->SetOutputSizePixel( rSizePix ) )
{
- pVDev->SetLineColor( Color( COL_BLACK ) );
- pVDev->SetFillColor( Color( COL_BLACK ) );
+ pVDev->SetLineColor( COL_BLACK );
+ pVDev->SetFillColor( COL_BLACK );
for( sal_uInt16 i = 0; i < nCount; i++ )
{
@@ -149,7 +149,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
}
else if( rGraphic.GetType() != GraphicType::NONE )
{
- const Graphic aTmpGrf( rGraphic.GetGDIMetaFile().GetMonochromeMtf( Color( COL_BLACK ) ) );
+ const Graphic aTmpGrf( rGraphic.GetGDIMetaFile().GetMonochromeMtf( COL_BLACK ) );
ScopedVclPtrInstance< VirtualDevice > pVDev;
Size aSizePix( pVDev->LogicToPixel( aTmpGrf.GetPrefSize(), aTmpGrf.GetPrefMapMode() ) );
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index b25c123f27b6..e404154ed46d 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -31,7 +31,7 @@
using namespace css;
-#define TRANSCOL Color(COL_WHITE)
+#define TRANSCOL COL_WHITE
ContourWindow::ContourWindow(vcl::Window* pParent, WinBits nBits)
: GraphCtrl (pParent, nBits)
@@ -224,8 +224,8 @@ void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
const Graphic& rGraphic = GetGraphic();
rTarget.Push(PushFlags::LINECOLOR |PushFlags::FILLCOLOR);
- rTarget.SetLineColor(Color(COL_BLACK));
- rTarget.SetFillColor(Color(COL_WHITE));
+ rTarget.SetLineColor(COL_BLACK);
+ rTarget.SetFillColor(COL_WHITE);
rTarget.DrawRect( tools::Rectangle( Point(), GetGraphicSize() ) );
rTarget.Pop();
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 96b1cd5b347d..8e2e68baafc4 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -297,7 +297,7 @@ bool SvxRedlinTable::IsValidComment(const OUString &rCommentStr)
SvTreeListEntry* SvxRedlinTable::InsertEntry(const OUString& rStr,
RedlinData *pUserData, SvTreeListEntry* pParent, sal_uLong nPos)
{
- const Color aColor = (pUserData && pUserData->bDisabled) ? Color(COL_GRAY) : GetTextColor();
+ const Color aColor = (pUserData && pUserData->bDisabled) ? COL_GRAY : GetTextColor();
return InsertEntry(rStr, pUserData, aColor, pParent, nPos);
}
@@ -318,7 +318,7 @@ SvTreeListEntry* SvxRedlinTable::InsertEntry(const OUString& rStr,
SvTreeListEntry* SvxRedlinTable::InsertEntry(const Image &rRedlineType, const OUString& rStr,
RedlinData *pUserData, SvTreeListEntry* pParent, sal_uLong nPos)
{
- maEntryColor = (pUserData && pUserData->bDisabled) ? Color(COL_GRAY) : GetTextColor();
+ maEntryColor = (pUserData && pUserData->bDisabled) ? COL_GRAY : GetTextColor();
maEntryImage = rRedlineType;
maEntryString = rStr;
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index 33a2d601e7b3..0eee4586f225 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -135,7 +135,7 @@ void Svx3DPreviewControl::Construct()
XATTR_FILL_FIRST, XATTR_FILLBITMAP>{} );
aSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
- aSet.Put( XFillColorItem( "", Color( COL_WHITE ) ) );
+ aSet.Put( XFillColorItem( "", COL_WHITE ) );
mpScene->SetMergedItemSet(aSet);
@@ -907,7 +907,7 @@ Color Svx3DLightControl::GetLightColor(sal_uInt32 nNum) const
}
}
- return Color(COL_BLACK);
+ return COL_BLACK;
}
basegfx::B3DVector Svx3DLightControl::GetLightDirection(sal_uInt32 nNum) const
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 92f2d147379c..d89b71b3e2a1 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -727,9 +727,9 @@ SvxPixelCtl::SvxPixelCtl(vcl::Window* pParent)
, bPaintable(true)
, aFocusPosition(0,0)
{
- SetPixelColor( Color( COL_BLACK ) );
- SetBackgroundColor( Color( COL_WHITE ) );
- SetLineColor( Color( COL_LIGHTGRAY ) );
+ SetPixelColor( COL_BLACK );
+ SetBackgroundColor( COL_WHITE );
+ SetLineColor( COL_LIGHTGRAY );
maPixelData.fill(0);
}
@@ -837,8 +837,8 @@ void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectan
}
else
{
- rRenderContext.SetBackground(Wallpaper(Color(COL_LIGHTGRAY)));
- rRenderContext.SetLineColor(Color(COL_LIGHTRED));
+ rRenderContext.SetBackground(Wallpaper(COL_LIGHTGRAY));
+ rRenderContext.SetLineColor(COL_LIGHTRED);
rRenderContext.DrawLine(Point(0, 0), Point(aRectSize.Width(), aRectSize.Height()));
rRenderContext.DrawLine(Point(0, aRectSize.Height()), Point(aRectSize.Width(), 0));
}
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx
index 269ac3e52e49..fd5681a634d9 100644
--- a/svx/source/dialog/framelink.cxx
+++ b/svx/source/dialog/framelink.cxx
@@ -642,7 +642,7 @@ StyleVectorCombination::StyleVectorCombination(
rStyle.Dist() * 0.5,
rStyle.UseGapColor()
? (nullptr != pForceColor ? *pForceColor : rStyle.GetColorGap())
- : Color(COL_TRANSPARENT)));
+ : COL_TRANSPARENT));
maOffsets.push_back(
OffsetAndHalfWidthAndColor(
diff --git a/svx/source/dialog/hexcolorcontrol.cxx b/svx/source/dialog/hexcolorcontrol.cxx
index 115dbe7997cd..884340980708 100644
--- a/svx/source/dialog/hexcolorcontrol.cxx
+++ b/svx/source/dialog/hexcolorcontrol.cxx
@@ -51,7 +51,7 @@ sal_Int32 HexColorControl::GetColor()
sax::Converter::convertColor(nColor, aStr);
if (nColor == -1)
- SetControlBackground(Color(COL_RED));
+ SetControlBackground(COL_RED);
else
SetControlBackground();
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index c577bd8fb1e9..8c2ae5c64807 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -52,7 +52,7 @@ using namespace com::sun::star;
using ::com::sun::star::frame::XFrame;
using ::com::sun::star::uno::Reference;
-#define TRANSCOL Color( COL_WHITE )
+#define TRANSCOL COL_WHITE
IMapWindow::IMapWindow( vcl::Window* pParent, WinBits nBits, const Reference< XFrame >& rxDocumentFrame ) :
GraphCtrl( pParent, nBits ),
@@ -261,12 +261,12 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj )
if ( !pIMapObj->IsActive() )
{
aSet.Put( XFillTransparenceItem( 100 ) );
- aSet.Put( XLineColorItem( "", Color( COL_RED ) ) );
+ aSet.Put( XLineColorItem( "", COL_RED ) );
}
else
{
aSet.Put( XFillTransparenceItem( 50 ) );
- aSet.Put( XLineColorItem( "", Color( COL_BLACK ) ) );
+ aSet.Put( XLineColorItem( "", COL_BLACK ) );
}
pSdrObj->SetMergedItemSetAndBroadcast(aSet);
@@ -583,12 +583,12 @@ void IMapWindow::SetCurrentObjState( bool bActive )
if ( !bActive )
{
aSet.Put( XFillTransparenceItem( 100 ) );
- aSet.Put( XLineColorItem( "", Color( COL_RED ) ) );
+ aSet.Put( XLineColorItem( "", COL_RED ) );
}
else
{
aSet.Put( XFillTransparenceItem( 50 ) );
- aSet.Put( XLineColorItem( "", Color( COL_BLACK ) ) );
+ aSet.Put( XLineColorItem( "", COL_BLACK ) );
}
pView->SetAttributes( aSet );
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 18e93e62e45d..dd80e3848e3d 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -785,7 +785,7 @@ IMPL_LINK_NOARG( SvxLanguageComboBox, EditModifyHdl, Edit&, void )
#if 0
//! Gives white on white!?! instead of white on reddish.
SetControlBackground( ::Color( Color( 0xff, 0x65, 0x63)));
- SetControlForeground( ::Color( COL_WHITE));
+ SetControlForeground( ::COL_WHITE);
#else
SetControlForeground( ::Color( 0xf0, 0, 0) );
#endif
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index a4ae5bb1f47c..eb2fc6ef92fd 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -152,7 +152,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
// background
if (!bSecond || bResetBackground)
{
- rRenderContext.SetLineColor(Color(COL_TRANSPARENT));
+ rRenderContext.SetLineColor(COL_TRANSPARENT);
rRenderContext.SetFillColor(rDlgColor);
Size winSize(rRenderContext.GetOutputSize());
rRenderContext.DrawRect(tools::Rectangle(Point(0,0), winSize));
@@ -307,7 +307,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
if (bTable)
{
// Paint Table, if necessary center it
- rRenderContext.SetLineColor(Color(COL_LIGHTGRAY));
+ rRenderContext.SetLineColor(COL_LIGHTGRAY);
long nW = aRect.GetWidth();
long nH = aRect.GetHeight();
diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx
index 3eee8771b4e5..9f203542cae5 100644
--- a/svx/source/dialog/paraprev.cxx
+++ b/svx/source/dialog/paraprev.cxx
@@ -84,7 +84,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext)
{
if (i == 3)
{
- rRenderContext.SetFillColor(Color(COL_GRAY));
+ rRenderContext.SetFillColor(COL_GRAY);
long nTop = nUpper * aLineSiz.Height() / aSize.Height();
aPnt.AdjustY(nTop * 2 );
}
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 616f6eec9b34..ebfbefd4139a 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -3364,7 +3364,7 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent )
ScopedVclPtrInstance< VirtualDevice > pDev;
const Size aSz(ruler_tab_svx.width + 2, ruler_tab_svx.height + 2);
pDev->SetOutputSize(aSz);
- pDev->SetBackground(Wallpaper(Color(COL_WHITE)));
+ pDev->SetBackground(Wallpaper(COL_WHITE));
Color aFillColor(pDev->GetSettings().GetStyleSettings().GetShadowColor());
const Point aPt(aSz.Width() / 2, aSz.Height() / 2);
@@ -3375,7 +3375,7 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent )
DrawTab(*pDev, aFillColor, aPt, nStyle);
aMenu->InsertItem(i + 1,
SvxResId(RID_SVXSTR_RULER_TAB[i]),
- Image(BitmapEx(pDev->GetBitmap(Point(), aSz), Color(COL_WHITE))));
+ Image(BitmapEx(pDev->GetBitmap(Point(), aSz), COL_WHITE)));
aMenu->CheckItem(i + 1, i == mpTabs[mxRulerImpl->nIdx + TAB_GAP].nStyle);
pDev->SetOutputSize(aSz); // delete device
}
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index 245864645af8..ceacc555d0e6 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -75,17 +75,17 @@ void SvxSwFrameExample::InitColors_Impl()
bool bHC = rSettings.GetHighContrastMode();
- m_aFrameColor = Color( COL_LIGHTGREEN );
- m_aAlignColor = Color( COL_LIGHTRED );
- m_aTransColor = Color( COL_TRANSPARENT );
+ m_aFrameColor = COL_LIGHTGREEN;
+ m_aAlignColor = COL_LIGHTRED;
+ m_aTransColor = COL_TRANSPARENT;
m_aTxtCol = bHC?
svtools::ColorConfig().GetColorValue(svtools::FONTCOLOR).nColor :
- Color( COL_GRAY );
- m_aPrintAreaCol = bHC? m_aTxtCol : Color( COL_GRAY );
+ COL_GRAY;
+ m_aPrintAreaCol = bHC? m_aTxtCol : COL_GRAY;
m_aBorderCol = m_aTxtCol;
- m_aBlankCol = bHC? m_aTxtCol : Color( COL_LIGHTGRAY );
- m_aBlankFrameCol = bHC? m_aTxtCol : Color( COL_GRAY );
+ m_aBlankCol = bHC? m_aTxtCol : COL_LIGHTGRAY;
+ m_aBlankFrameCol = bHC? m_aTxtCol : COL_GRAY;
}
void SvxSwFrameExample::DataChanged(const DataChangedEvent& rDCEvt)
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 1fe81614807b..98f9fb485df3 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -1613,7 +1613,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
// set FillColor hard to WHITE when it's SfxItemState::DONTCARE so that
// the default (Blue7) is not used for 3d preview
if(SfxItemState::DONTCARE == aSet.GetItemState(XATTR_FILLCOLOR, false))
- aSet.Put(XFillColorItem(OUString(), Color(COL_WHITE)));
+ aSet.Put(XFillColorItem(OUString(), COL_WHITE));
m_pCtlPreview->Set3DAttributes(aSet);
m_pCtlLightPreview->GetSvx3DLightControl().Set3DAttributes(aSet);
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index f1b1cac55dd8..908576260c0b 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -157,7 +157,7 @@ VclPtr<vcl::Window> SvxFmTbxCtlRecText::CreateItemWindow( vcl::Window* pParent )
pFixedText->SetText( aText );
aSize.AdjustWidth(6 );
pFixedText->SetSizePixel( aSize );
- pFixedText->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+ pFixedText->SetBackground(Wallpaper(COL_TRANSPARENT));
return pFixedText;
}
@@ -183,7 +183,7 @@ VclPtr<vcl::Window> SvxFmTbxCtlRecFromText::CreateItemWindow( vcl::Window* pPare
aSize.AdjustWidth(12 );
pFixedText->SetText( aText );
pFixedText->SetSizePixel( aSize );
- pFixedText->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+ pFixedText->SetBackground(Wallpaper(COL_TRANSPARENT));
return pFixedText.get();
}
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 488b69beb941..b7c3086fe735 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -256,7 +256,7 @@ namespace sdr
SdrRectObj aRectObj(OBJ_TEXT);
aRectObj.SetModel(GetGrafObject().GetModel());
aRectObj.NbcSetText(aDraftText);
- aRectObj.SetMergedItem(SvxColorItem(Color(COL_LIGHTRED), EE_CHAR_COLOR));
+ aRectObj.SetMergedItem(SvxColorItem(COL_LIGHTRED, EE_CHAR_COLOR));
// get SdrText and OPO
SdrText* pSdrText = aRectObj.getText(0);
diff --git a/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx b/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx
index 46ff77d897ce..ca3cf053c4fb 100644
--- a/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx
+++ b/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx
@@ -69,7 +69,7 @@ namespace sdr
sal_uInt16 nCenY2,
double fShearX,
double fRotation)
- : OverlayObjectWithBasePosition(rBasePos, Color(COL_WHITE)),
+ : OverlayObjectWithBasePosition(rBasePos, COL_WHITE),
maBitmapEx1(rBitmapEx1),
maBitmapEx2(rBitmapEx2),
mnCenterX1(nCenX1), mnCenterY1(nCenY1),
diff --git a/svx/source/sdr/overlay/overlaybitmapex.cxx b/svx/source/sdr/overlay/overlaybitmapex.cxx
index 4a563a95b5f1..0d7995b1c3a6 100644
--- a/svx/source/sdr/overlay/overlaybitmapex.cxx
+++ b/svx/source/sdr/overlay/overlaybitmapex.cxx
@@ -57,7 +57,7 @@ namespace sdr
double fAlpha,
double fShearX,
double fRotation)
- : OverlayObjectWithBasePosition(rBasePos, Color(COL_WHITE)),
+ : OverlayObjectWithBasePosition(rBasePos, COL_WHITE),
maBitmapEx(rBitmapEx),
mnCenterX(nCenX),
mnCenterY(nCenY),
diff --git a/svx/source/sdr/overlay/overlaycrosshair.cxx b/svx/source/sdr/overlay/overlaycrosshair.cxx
index a581a7f92930..edeb97c67ec2 100644
--- a/svx/source/sdr/overlay/overlaycrosshair.cxx
+++ b/svx/source/sdr/overlay/overlaycrosshair.cxx
@@ -57,7 +57,7 @@ namespace sdr
}
OverlayCrosshairStriped::OverlayCrosshairStriped(const basegfx::B2DPoint& rBasePos)
- : OverlayObjectWithBasePosition(rBasePos, Color(COL_BLACK))
+ : OverlayObjectWithBasePosition(rBasePos, COL_BLACK)
{
}
diff --git a/svx/source/sdr/overlay/overlayhelpline.cxx b/svx/source/sdr/overlay/overlayhelpline.cxx
index b1adaf9ea7c9..a6f644ba6220 100644
--- a/svx/source/sdr/overlay/overlayhelpline.cxx
+++ b/svx/source/sdr/overlay/overlayhelpline.cxx
@@ -65,7 +65,7 @@ namespace sdr
OverlayHelplineStriped::OverlayHelplineStriped(
const basegfx::B2DPoint& rBasePos,
SdrHelpLineKind eNewKind)
- : OverlayObjectWithBasePosition(rBasePos, Color(COL_BLACK)),
+ : OverlayObjectWithBasePosition(rBasePos, COL_BLACK),
meKind(eNewKind)
{
}
diff --git a/svx/source/sdr/overlay/overlayline.cxx b/svx/source/sdr/overlay/overlayline.cxx
index af1a866c892d..de5cf042ba1e 100644
--- a/svx/source/sdr/overlay/overlayline.cxx
+++ b/svx/source/sdr/overlay/overlayline.cxx
@@ -67,7 +67,7 @@ namespace sdr
OverlayLineStriped::OverlayLineStriped(
const basegfx::B2DPoint& rBasePos,
const basegfx::B2DPoint& rSecondPos)
- : OverlayObjectWithBasePosition(rBasePos, Color(COL_BLACK)),
+ : OverlayObjectWithBasePosition(rBasePos, COL_BLACK),
maSecondPosition(rSecondPos)
{
}
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index bde49aff6ed2..621521ebf9cb 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -119,8 +119,8 @@ namespace sdr
: Scheduler(),
mrOutputDevice(rOutputDevice),
maOverlayObjects(),
- maStripeColorA(Color(COL_BLACK)),
- maStripeColorB(Color(COL_WHITE)),
+ maStripeColorA(COL_BLACK),
+ maStripeColorB(COL_WHITE),
mnStripeLengthPixel(5),
maDrawinglayerOpt(),
maViewTransformation(),
diff --git a/svx/source/sdr/overlay/overlaypolypolygon.cxx b/svx/source/sdr/overlay/overlaypolypolygon.cxx
index 1c281cafe732..dda687298a31 100644
--- a/svx/source/sdr/overlay/overlaypolypolygon.cxx
+++ b/svx/source/sdr/overlay/overlaypolypolygon.cxx
@@ -73,7 +73,7 @@ namespace sdr
OverlayPolyPolygonStripedAndFilled::OverlayPolyPolygonStripedAndFilled(
const basegfx::B2DPolyPolygon& rLinePolyPolygon)
- : OverlayObject(Color(COL_BLACK)),
+ : OverlayObject(COL_BLACK),
maLinePolyPolygon(rLinePolyPolygon)
{
}
diff --git a/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx b/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx
index 5ca6da5b8628..16a3429fb003 100644
--- a/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx
+++ b/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx
@@ -33,7 +33,7 @@ namespace sdr
}
OverlayPrimitive2DSequenceObject::OverlayPrimitive2DSequenceObject(const drawinglayer::primitive2d::Primitive2DContainer& rSequence)
- : OverlayObjectWithBasePosition(basegfx::B2DPoint(), Color(COL_BLACK)),
+ : OverlayObjectWithBasePosition(basegfx::B2DPoint(), COL_BLACK),
maSequence(rSequence)
{
}
diff --git a/svx/source/sdr/overlay/overlayrollingrectangle.cxx b/svx/source/sdr/overlay/overlayrollingrectangle.cxx
index 9b903fa4658e..a0022b08fed0 100644
--- a/svx/source/sdr/overlay/overlayrollingrectangle.cxx
+++ b/svx/source/sdr/overlay/overlayrollingrectangle.cxx
@@ -94,7 +94,7 @@ namespace sdr
const basegfx::B2DPoint& rSecondPos,
bool bExtendedLines,
bool bShowBounds)
- : OverlayObjectWithBasePosition(rBasePos, Color(COL_BLACK)),
+ : OverlayObjectWithBasePosition(rBasePos, COL_BLACK),
maSecondPosition(rSecondPos),
mbExtendedLines(bExtendedLines),
mbShowBounds(bShowBounds)
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index 9356f1a0cf15..0d57e931cd23 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -373,7 +373,7 @@ namespace sdr
if(bTextFrame)
{
mpItemSet->Put(XLineStyleItem(drawing::LineStyle_NONE));
- mpItemSet->Put(XFillColorItem(OUString(), Color(COL_WHITE)));
+ mpItemSet->Put(XFillColorItem(OUString(), COL_WHITE));
mpItemSet->Put(XFillStyleItem(drawing::FillStyle_NONE));
}
else
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index b27b92964517..aa7a82473bdd 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -439,7 +439,7 @@ bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, cons
if (mpModel && dynamic_cast<const SdrCaptionObj *>(pAktCreate) != nullptr)
{
SfxItemSet aSet(mpModel->GetItemPool());
- aSet.Put(XFillColorItem(OUString(),Color(COL_WHITE))); // in case someone turns on Solid
+ aSet.Put(XFillColorItem(OUString(),COL_WHITE)); // in case someone turns on Solid
aSet.Put(XFillStyleItem(drawing::FillStyle_NONE));
pAktCreate->SetMergedItemSet(aSet);
@@ -449,9 +449,9 @@ bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, cons
{
// default for all text frames: no background, no border
SfxItemSet aSet(mpModel->GetItemPool());
- aSet.Put(XFillColorItem(OUString(),Color(COL_WHITE))); // in case someone turns on Solid
+ aSet.Put(XFillColorItem(OUString(),COL_WHITE)); // in case someone turns on Solid
aSet.Put(XFillStyleItem(drawing::FillStyle_NONE));
- aSet.Put(XLineColorItem(OUString(),Color(COL_BLACK))); // in case someone turns on Solid
+ aSet.Put(XLineColorItem(OUString(),COL_BLACK)); // in case someone turns on Solid
aSet.Put(XLineStyleItem(drawing::LineStyle_NONE));
pAktCreate->SetMergedItemSet(aSet);
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index f01dd86a3d2c..51ef80fb46b6 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -985,7 +985,7 @@ IMPL_LINK(SdrObjEditView,ImpOutlinerCalcFieldValueHdl,EditFieldInfo*,pFI,void)
pFI->SetFieldColor(*pFldCol);
delete pFldCol;
} else {
- pFI->SetFieldColor(Color(COL_LIGHTGRAY)); // TODO: remove this later on (357)
+ pFI->SetFieldColor(COL_LIGHTGRAY); // TODO: remove this later on (357)
}
}
}
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 823dc300f3e9..4b29e2c53efe 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -682,7 +682,7 @@ namespace
}
- aSpotColor[i] = Color( COL_WHITE );
+ aSpotColor[i] = COL_WHITE;
impGetSdrPageFillColor(rPage, aSpotPos[i], rTextEditPV, rTextEditPV.GetVisibleLayers(), aSpotColor[i], false);
}
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 63b42083fe4b..711a96e1dfff 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -589,19 +589,19 @@ void SdrHdl::CreateB2dIAObject()
switch (eColIndex)
{
case BitmapColorIndex::Cyan:
- aHandleFillColor = Color(COL_CYAN);
+ aHandleFillColor = COL_CYAN;
break;
case BitmapColorIndex::LightCyan:
- aHandleFillColor = Color(COL_LIGHTCYAN);
+ aHandleFillColor = COL_LIGHTCYAN;
break;
case BitmapColorIndex::Red:
- aHandleFillColor = Color(COL_RED);
+ aHandleFillColor = COL_RED;
break;
case BitmapColorIndex::LightRed:
- aHandleFillColor = Color(COL_LIGHTRED);
+ aHandleFillColor = COL_LIGHTRED;
break;
case BitmapColorIndex::Yellow:
- aHandleFillColor = Color(COL_YELLOW);
+ aHandleFillColor = COL_YELLOW;
break;
default:
break;
@@ -1146,10 +1146,10 @@ BitmapEx SdrHdlColor::CreateColorDropper(Color aCol)
sal_Int32 nWidth = aMarkerSize.Width();
sal_Int32 nHeight = aMarkerSize.Height();
- pWrite->SetLineColor(Color(COL_LIGHTGRAY));
+ pWrite->SetLineColor(COL_LIGHTGRAY);
pWrite->DrawLine(Point(0, 0), Point(0, nHeight - 1));
pWrite->DrawLine(Point(1, 0), Point(nWidth - 1, 0));
- pWrite->SetLineColor(Color(COL_GRAY));
+ pWrite->SetLineColor(COL_GRAY);
pWrite->DrawLine(Point(1, nHeight - 1), Point(nWidth - 1, nHeight - 1));
pWrite->DrawLine(Point(nWidth - 1, 1), Point(nWidth - 1, nHeight - 2));
@@ -1283,7 +1283,7 @@ void SdrHdlGradient::CreateB2dIAObject()
);
DBG_ASSERT(pNewOverlayObject, "Got NO new IAO!");
- pNewOverlayObject->setBaseColor(IsGradient() ? Color(COL_BLACK) : Color(COL_BLUE));
+ pNewOverlayObject->setBaseColor(IsGradient() ? COL_BLACK : COL_BLUE);
xManager->add(*pNewOverlayObject);
maOverlayGroup.append(pNewOverlayObject);
@@ -1302,7 +1302,7 @@ void SdrHdlGradient::CreateB2dIAObject()
aPositionLeft,
aPosition2,
aPositionRight,
- IsGradient() ? Color(COL_BLACK) : Color(COL_BLUE)
+ IsGradient() ? COL_BLACK : COL_BLUE
);
DBG_ASSERT(pNewOverlayObject, "Got NO new IAO!");
@@ -1432,7 +1432,7 @@ void SdrHdlLine::CreateB2dIAObject()
// OVERLAYMANAGER
// color(?)
- pNewOverlayObject->setBaseColor(Color(COL_LIGHTRED));
+ pNewOverlayObject->setBaseColor(COL_LIGHTRED);
xManager->add(*pNewOverlayObject);
maOverlayGroup.append(pNewOverlayObject);
@@ -1492,7 +1492,7 @@ void SdrHdlBezWgt::CreateB2dIAObject()
pNewOverlayObject->setHittable(false);
// color(?)
- pNewOverlayObject->setBaseColor(Color(COL_LIGHTBLUE));
+ pNewOverlayObject->setBaseColor(COL_LIGHTBLUE);
xManager->add(*pNewOverlayObject);
maOverlayGroup.append(pNewOverlayObject);
@@ -1538,7 +1538,7 @@ void E3dVolumeMarker::CreateB2dIAObject()
aWireframePoly);
// OVERLAYMANAGER
- pNewOverlayObject->setBaseColor(Color(COL_BLACK));
+ pNewOverlayObject->setBaseColor(COL_BLACK);
xManager->add(*pNewOverlayObject);
maOverlayGroup.append(pNewOverlayObject);
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index c36516c65a2b..e96176ed7071 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -340,7 +340,7 @@ void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const tools::Rectangl
if (nColumnId==ITEMBROWSER_NAMECOL_ID)
{
rDev.SetLineColor();
- rDev.SetFillColor( Color( COL_LIGHTGRAY ) );
+ rDev.SetFillColor( COL_LIGHTGRAY );
aR.SetLeft(0 );
aR.SetRight(rDev.GetOutputSize().Width() );
rDev.DrawRect(aR);
@@ -481,9 +481,9 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t nPos)
aRect.AdjustRight( -1 );
pEditControl->SetPosSizePixel(aRect.TopLeft(),aRect.GetSize());
pEditControl->SetText(pEntry->aValue);
- pEditControl->SetBackground( Wallpaper(Color(COL_LIGHTGRAY)));
+ pEditControl->SetBackground( Wallpaper(COL_LIGHTGRAY));
vcl::Font aFont(pEditControl->GetFont());
- aFont.SetFillColor(Color(COL_LIGHTGRAY));
+ aFont.SetFillColor(COL_LIGHTGRAY);
pEditControl->SetFont(aFont);
pEditControl->Show();
pEditControl->GrabFocus();
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 64d3b886987f..7980458914df 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1093,7 +1093,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const
// solid black lines and no fill
aNewSet.Put(XLineStyleItem(drawing::LineStyle_SOLID));
- aNewSet.Put(XLineColorItem(OUString(), Color(COL_BLACK)));
+ aNewSet.Put(XLineColorItem(OUString(), COL_BLACK));
aNewSet.Put(XFillStyleItem(drawing::FillStyle_NONE));
pClone->SetMergedItemSet(aNewSet);
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index d5f9ab4aa988..d10a49689d2a 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -178,7 +178,7 @@ void SdrPaintView::ImpClearVars()
if (mpModel)
SetDefaultStyleSheet(mpModel->GetDefaultStyleSheet(), true);
- maGridColor = Color( COL_BLACK );
+ maGridColor = COL_BLACK;
}
SdrPaintView::SdrPaintView(SdrModel* pModel, OutputDevice* pOut)
diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx
index aeaa85232925..5acff4be8417 100644
--- a/svx/source/table/tablehandles.cxx
+++ b/svx/source/table/tablehandles.cxx
@@ -198,7 +198,7 @@ void TableEdgeHdl::CreateB2dIAObject()
OverlayTableEdge::OverlayTableEdge( const basegfx::B2DPolyPolygon& rPolyPolygon, bool bVisible )
-: OverlayObject(Color(COL_GRAY))
+: OverlayObject(COL_GRAY)
, maPolyPolygon( rPolyPolygon )
, mbVisible(bVisible)
{
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index dab0b66302e7..20af198b7c8d 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -272,8 +272,8 @@ void SvxColorDockingWindow::FillValueSet()
ScopedVclPtrInstance< VirtualDevice > pVD;
pVD->SetOutputSizePixel( aColorSize );
- pVD->SetLineColor( Color( COL_BLACK ) );
- pVD->SetBackground( Wallpaper( Color( COL_WHITE ) ) );
+ pVD->SetLineColor( COL_BLACK );
+ pVD->SetBackground( Wallpaper( COL_WHITE ) );
pVD->DrawLine( Point(), Point( nPtX, nPtY ) );
pVD->DrawLine( Point( 0, nPtY ), Point( nPtX, 0 ) );
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 00efa3cdab35..ef002fee8652 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -79,7 +79,7 @@ namespace svx
// !!! #109290# Workaround for SetFillColor with COL_AUTO
if (aColor.GetColor() == COL_AUTO)
- aColor = Color(COL_TRANSPARENT);
+ aColor = COL_TRANSPARENT;
if ((maCurColor == aColor) && !bSizeChanged && !bDisplayModeChanged && !bForceUpdate)
return;
@@ -96,9 +96,9 @@ namespace svx
if ((COL_TRANSPARENT != aColor.GetColor()) && (maBmpSize.Width() == maBmpSize.Height()))
pVirDev->SetLineColor(aColor);
else if( mpTbx->GetBackground().GetColor().IsDark() )
- pVirDev->SetLineColor(Color(COL_WHITE));
+ pVirDev->SetLineColor(COL_WHITE);
else
- pVirDev->SetLineColor(Color(COL_BLACK));
+ pVirDev->SetLineColor(COL_BLACK);
// use not only COL_TRANSPARENT for detection of transparence,
// but the method/way which is designed to do that
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 3700b3618f7d..9f83fcb319c1 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -287,7 +287,7 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
const Wallpaper aWallpaper( pVDev->GetBackground() );
const Point aPt;
- pVDev->SetBackground( Wallpaper( Color( COL_BLACK ) ) );
+ pVDev->SetBackground( Wallpaper( COL_BLACK ) );
pVDev->Erase();
rGraphic.Draw( pVDev.get(), aPt, aSize );
@@ -469,7 +469,7 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold )
long lGray;
// initialize border with white pixels
- pVirDev->SetLineColor( Color( COL_WHITE) );
+ pVirDev->SetLineColor( COL_WHITE );
pVirDev->DrawLine( Point(), Point( nWidth - 1, 0L ) );
pVirDev->DrawLine( Point( nWidth - 1, 0L ), Point( nWidth - 1, nHeight - 1 ) );
pVirDev->DrawLine( Point( nWidth - 1, nHeight - 1 ), Point( 0L, nHeight - 1 ) );
@@ -499,9 +499,9 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold )
nSum2 -= lGray;
if( ( nSum1 * nSum1 + nSum2 * nSum2 ) < lThres2 )
- pVirDev->DrawPixel( Point(nXDst, nY), Color(COL_WHITE) );
+ pVirDev->DrawPixel( Point(nXDst, nY), COL_WHITE );
else
- pVirDev->DrawPixel( Point(nXDst, nY), Color(COL_BLACK) );
+ pVirDev->DrawPixel( Point(nXDst, nY), COL_BLACK );
}
}
@@ -567,7 +567,7 @@ tools::Polygon XOutBitmap::GetContour( const Bitmap& rBmp, const XOutFlags nFlag
std::unique_ptr<Point[]> pPoints2;
long nX, nY;
sal_uInt16 nPolyPos = 0;
- const BitmapColor aBlack = pAcc->GetBestMatchingColor( Color( COL_BLACK ) );
+ const BitmapColor aBlack = pAcc->GetBestMatchingColor( Color(COL_BLACK) );
if( nFlags & XOutFlags::ContourVert )
{
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 8ec5a260e289..45cffa92bfae 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -1920,8 +1920,8 @@ bool XSecondaryFillColorItem::GetPresentation
XGradient::XGradient() :
eStyle( css::awt::GradientStyle_LINEAR ),
- aStartColor( Color( COL_BLACK ) ),
- aEndColor( Color( COL_WHITE ) ),
+ aStartColor( COL_BLACK ),
+ aEndColor( COL_WHITE ),
nAngle( 0 ),
nBorder( 0 ),
nOfsX( 50 ),
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 0a16a201ad1a..923ac193bb0b 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -4079,7 +4079,7 @@ void SwUiWriterTest::testTdf87922()
// If no color background color is found, assume white.
Color* pColor = sw::GetActiveRetoucheColor();
- *pColor = Color(COL_WHITE);
+ *pColor = COL_WHITE;
// Make sure that automatic color on black background is white, not black.
vcl::Font aFont;
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 92b630350d09..b43ec2dfe50d 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -600,7 +600,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
if( Color(COL_TRANSPARENT) != GetOut()->GetLineColor() )
{
OSL_FAIL( "Hey, Joe: Where's my Null Pen?" );
- GetOut()->SetLineColor( Color(COL_TRANSPARENT) );
+ GetOut()->SetLineColor( COL_TRANSPARENT );
}
#endif
}
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index fc44c6db8ead..3bca9d8d6fa0 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -145,7 +145,7 @@ private:
}
else if (WRONGLIST_GRAMMAR == listType)
{
- return Color( COL_LIGHTBLUE );
+ return COL_LIGHTBLUE;
}
else if (WRONGLIST_SMARTTAG == listType)
{
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index bc9b35e7be7b..a4b10585e6b3 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6170,10 +6170,10 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
)
)
{
- pTmpBackBrush = new SvxBrushItem( Color( COL_WHITE ), RES_BACKGROUND );
+ pTmpBackBrush = new SvxBrushItem( COL_WHITE, RES_BACKGROUND );
//UUU
- aFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(Color( COL_WHITE )));
+ aFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(COL_WHITE));
}
else
{
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 20c183064492..47769b372ef8 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -72,7 +72,7 @@ bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt )
const Color GetUnderColor( const SwFont *pFont )
{
- return pFont->GetUnderColor() == Color( COL_AUTO ) ?
+ return pFont->GetUnderColor() == COL_AUTO ?
pFont->GetColor() : pFont->GetUnderColor();
}
@@ -504,7 +504,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
// Bug 120769:Color of underline display wrongly
if ( GetInfo().GetUnderFnt() &&
GetInfo().GetUnderFnt()->GetFont().GetUnderline() == GetFnt()->GetUnderline() &&
- GetInfo().GetFont() && GetInfo().GetFont()->GetUnderColor() != Color(COL_AUTO) )
+ GetInfo().GetFont() && GetInfo().GetFont()->GetUnderColor() != COL_AUTO )
return;
//Bug 120769(End)
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index e16d7b3b1e34..08c8fcd2e0cc 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -403,7 +403,7 @@ void SwExtend::ActualizeFont( SwFont &rFnt, ExtTextInputAttr nAttr )
rFnt.SetUnderline( LINESTYLE_DOTTED );
if ( nAttr & ExtTextInputAttr::RedText )
- rFnt.SetColor( Color( COL_RED ) );
+ rFnt.SetColor( COL_RED );
if ( nAttr & ExtTextInputAttr::Highlight )
{
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 0f7cdc0ce42c..1650b2ea1473 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -269,7 +269,7 @@ void SwDropPortion::PaintText( const SwTextPaintInfo &rInf ) const
if ( rInf.OnWin() &&
!rInf.GetOpt().IsPagePreview() && !rInf.GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() &&
- (!pCurrPart->GetFont().GetBackColor() || *pCurrPart->GetFont().GetBackColor() == Color(COL_TRANSPARENT)) )
+ (!pCurrPart->GetFont().GetBackColor() || *pCurrPart->GetFont().GetBackColor() == COL_TRANSPARENT) )
{
rInf.DrawBackground( *this );
}
diff --git a/sw/source/core/text/txtinit.cxx b/sw/source/core/text/txtinit.cxx
index 7770b1d3d5c0..dc952771899c 100644
--- a/sw/source/core/text/txtinit.cxx
+++ b/sw/source/core/text/txtinit.cxx
@@ -63,7 +63,7 @@ void TextInit_()
#endif
);
SwTextFrame::SetTextCache( pTextCache );
- pWaveCol = new Color( COL_GRAY );
+ pWaveCol = new Color(COL_GRAY);
PROTOCOL_INIT
}
diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx
index 44ae26ff49bf..eba46093f9c2 100644
--- a/sw/source/core/text/txtpaint.hxx
+++ b/sw/source/core/text/txtpaint.hxx
@@ -85,7 +85,7 @@ inline DbgBackColor::DbgBackColor( OutputDevice* pOutDev, const bool bOn )
if( pOut )
{
aOldFillColor = pOut->GetFillColor();
- pOut->SetFillColor( Color(COL_RED) );
+ pOut->SetFillColor( COL_RED );
}
}
@@ -108,7 +108,7 @@ inline DbgRect::DbgRect( OutputDevice* pOutDev, const tools::Rectangle &rRect,
Color aLineColor = pOut->GetLineColor();
pOut->SetLineColor( aColor );
Color aFillColor = pOut->GetFillColor();
- pOut->SetFillColor( Color(COL_TRANSPARENT) );
+ pOut->SetFillColor( COL_TRANSPARENT );
pOut->DrawRect( rRect );
pOut->SetLineColor( aLineColor );
pOut->SetFillColor( aFillColor );
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index d6d4be4380b1..2f2e1805b8dc 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -2077,7 +2077,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_size, sWidth);
const Color& rBorderColor = pBorderLine->GetColor();
- if( !rBorderColor.IsRGBEqual( Color(COL_GRAY) ) )
+ if( !rBorderColor.IsRGBEqual( COL_GRAY ) )
{
HtmlWriterHelper::applyColor(aHtml, OOO_STRING_SVTOOLS_HTML_O_color, rBorderColor);
}
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index e89eab2f6424..78ec9ef1342c 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -1544,7 +1544,7 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
SvxBrushItem aBrushItem( aItemIds.nBrush );
if( bTransparent )
- aBrushItem.SetColor( Color(COL_TRANSPARENT));
+ aBrushItem.SetColor( COL_TRANSPARENT);
else if( bColor )
aBrushItem.SetColor( aColor );
@@ -1596,7 +1596,7 @@ static void ParseCSS1_background_color( const CSS1Expression *pExpr,
SvxBrushItem aBrushItem( aItemIds.nBrush );
if( bTransparent )
- aBrushItem.SetColor( Color(COL_TRANSPARENT) );
+ aBrushItem.SetColor( COL_TRANSPARENT );
else if( bColor )
aBrushItem.SetColor( aColor);
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 3005b5dcc16a..72297baeb175 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3708,7 +3708,7 @@ void WW8RStyle::Set1StyleDefaults()
{
// Style has no text color set, winword default is auto
if ( !bTextColChanged )
- pIo->m_pCurrentColl->SetFormatAttr(SvxColorItem(Color(COL_AUTO), RES_CHRATR_COLOR));
+ pIo->m_pCurrentColl->SetFormatAttr(SvxColorItem(COL_AUTO, RES_CHRATR_COLOR));
// Style has no FontSize ? WinWord Default is 10pt for western and asian
if( !bFSizeChanged )
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 085e2ea6d75b..a9a9ee0cdbfe 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -342,7 +342,7 @@ bool wwSectionManager::SetCols(SwFrameFormat &rFormat, const wwSection &rSection
{
aCol.SetLineAdj(COLADJ_TOP); // Line
aCol.SetLineHeight(100);
- aCol.SetLineColor(Color(COL_BLACK));
+ aCol.SetLineColor(COL_BLACK);
aCol.SetLineWidth(1);
}
@@ -1479,7 +1479,7 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray,
bool bRet = aRightBrc.fShadow() && pSizeArray && pSizeArray[WW8_RIGHT];
if (bRet)
{
- rShadow.SetColor(Color(COL_BLACK));
+ rShadow.SetColor(COL_BLACK);
//i120718
short nVal = aRightBrc.DetermineBorderProperties();
//End
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index fb9a75947c11..23bc335fd122 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -264,7 +264,7 @@ void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, vcl::Font& _
void SwDropCapsPict::UpdatePaintSettings()
{
maBackColor = GetSettings().GetStyleSettings().GetWindowColor();
- maTextLineColor = Color( COL_LIGHTGRAY );
+ maTextLineColor = COL_LIGHTGRAY;
// gray lines
mnTotLineH = (GetOutputSizePixel().Height() - 2 * BORDER) / LINES;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 5634f8153bc5..bd8baa174c58 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1593,9 +1593,9 @@ void SwMarkPreview::InitColors()
m_aBgCol = rSettings.GetWindowColor();
bool bHC = rSettings.GetHighContrastMode();
- m_aLineCol = bHC? SwViewOption::GetFontColor() : Color( COL_BLACK );
+ m_aLineCol = bHC? SwViewOption::GetFontColor() : COL_BLACK;
m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor();
- m_aTextCol = bHC? SwViewOption::GetFontColor() : Color( COL_GRAY );
+ m_aTextCol = bHC? SwViewOption::GetFontColor() : COL_GRAY;
m_aPrintAreaCol = m_aTextCol;
}
@@ -1998,13 +1998,13 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox&, rLB, void )
if (aColor == COL_NONE_COLOR)
{
- rFont.SetColor( Color( COL_BLACK ) );
- rCJKFont.SetColor( Color( COL_BLACK ) );
+ rFont.SetColor( COL_BLACK );
+ rCJKFont.SetColor( COL_BLACK );
}
else if (aColor == COL_TRANSPARENT)
{
- rFont.SetColor( Color( COL_RED ) );
- rCJKFont.SetColor( Color( COL_RED ) );
+ rFont.SetColor( COL_RED );
+ rCJKFont.SetColor( COL_RED );
}
else
{
@@ -2052,9 +2052,9 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox&, rLB, void )
if (aBgColor != COL_NONE_COLOR)
pPrev->SetColor(aBgColor);
else
- pPrev->SetColor(Color(COL_LIGHTGRAY));
- rFont.SetColor( Color( COL_BLACK ) );
- rCJKFont.SetColor( Color( COL_BLACK ) );
+ pPrev->SetColor(COL_LIGHTGRAY);
+ rFont.SetColor( COL_BLACK );
+ rCJKFont.SetColor( COL_BLACK );
}
break;
}
@@ -2094,14 +2094,14 @@ IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, SvxColorListBox&, rListBox, void )
if( pAttr->nItemId == SID_ATTR_BRUSH )
{
- rFont.SetColor( Color( COL_BLACK ) );
- rCJKFont.SetColor( Color( COL_BLACK ) );
+ rFont.SetColor( COL_BLACK );
+ rCJKFont.SetColor( COL_BLACK );
Color aBgColor = pColorLB->GetSelectEntryColor();
if (aBgColor != COL_NONE_COLOR)
pPrev->SetColor(aBgColor);
else
- pPrev->SetColor(Color(COL_LIGHTGRAY));
+ pPrev->SetColor(COL_LIGHTGRAY);
}
else
{
@@ -2109,13 +2109,13 @@ IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, SvxColorListBox&, rListBox, void )
if (aColor == COL_NONE_COLOR)
{
- rFont.SetColor( Color( COL_BLACK ) );
- rCJKFont.SetColor( Color( COL_BLACK ) );
+ rFont.SetColor( COL_BLACK );
+ rCJKFont.SetColor( COL_BLACK );
}
else if (aColor == COL_TRANSPARENT)
{
- rFont.SetColor( Color( COL_RED ) );
- rCJKFont.SetColor( Color( COL_RED ) );
+ rFont.SetColor( COL_RED );
+ rCJKFont.SetColor( COL_RED );
}
else
{
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index d3b6ba795ef1..5d65297f293e 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -97,7 +97,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(vcl::Window* pParent,
get(m_pPreviewWIN, "preview");
SetExchangeSupport();
- m_pPreviewWIN->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+ m_pPreviewWIN->SetBackground(Wallpaper(COL_TRANSPARENT));
m_pRelativeCB->Check();
m_pAlignLB->SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index afe7076fe9d0..fe967dd98a71 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -1046,7 +1046,7 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re
}
tools::Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2));
- pVDev->SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); // Color( COL_BLACK ) );
+ pVDev->SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); // COL_BLACK );
pVDev->DrawRect(aRect1);
tools::Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2), Size(aSize.Width() / 2, 2));
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index e9bbeb63a2b6..1435276ff9cd 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -683,7 +683,7 @@ void SwDocShell::SubInitNew()
aDfltSet.Put( SvxTabStopItem( 1, nNewPos,
SvxTabAdjust::Default, RES_PARATR_TABSTOP ) );
}
- aDfltSet.Put( SvxColorItem( Color( COL_AUTO ), RES_CHRATR_COLOR ) );
+ aDfltSet.Put( SvxColorItem( COL_AUTO, RES_CHRATR_COLOR ) );
m_xDoc->SetDefault( aDfltSet );
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index 90eb12c95c95..e8b436894ed9 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -120,8 +120,8 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut,
{
Color aOldColor(pOut->GetLineColor());
Color aOldFillColor( pOut->GetFillColor() );
- pOut->SetLineColor( Color(COL_BLACK) );
- pOut->SetFillColor( Color(COL_TRANSPARENT ));
+ pOut->SetLineColor( COL_BLACK );
+ pOut->SetFillColor( COL_TRANSPARENT);
pOut->DrawRect( rRect.SVRect() );
pOut->SetFillColor( aOldFillColor );
pOut->SetLineColor( aOldColor );
@@ -138,7 +138,7 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, bool b
if( pOut && bIsScript )
{
Color aOldLineColor( pOut->GetLineColor() );
- pOut->SetLineColor( Color(COL_GRAY ) );
+ pOut->SetLineColor( COL_GRAY );
// to make it look nice, we subtract two pixels everywhere
sal_uInt16 nPix = m_nPixelTwips * 2;
if( rRect.Width() <= 2 * nPix || rRect.Height() <= 2 * nPix )
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index e544ff05b333..70e156639498 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -305,7 +305,7 @@ void SwAddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re
{
const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings();
rRenderContext.SetFillColor(rSettings.GetWindowColor());
- rRenderContext.SetLineColor(Color(COL_TRANSPARENT));
+ rRenderContext.SetLineColor(COL_TRANSPARENT);
rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), GetOutputSizePixel()));
Color aPaintColor(IsEnabled() ? rSettings.GetWindowTextColor() : rSettings.GetDisableColor());
rRenderContext.SetLineColor(aPaintColor);
@@ -433,7 +433,7 @@ void SwAddressPreview::DrawText_Impl(vcl::RenderContext& rRenderContext, const O
if (bIsSelected)
{
//selection rectangle
- rRenderContext.SetFillColor(Color(COL_TRANSPARENT));
+ rRenderContext.SetFillColor(COL_TRANSPARENT);
rRenderContext.DrawRect(tools::Rectangle(rTopLeft, rSize));
}
sal_Int32 nHeight = GetTextHeight();
diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
index b8da589d4ad2..5e10465cb92a 100644
--- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
@@ -177,7 +177,7 @@ void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const tools
const long nBorderDistanceBottom = ((aSymbolRect.GetHeight() * 150) + 500) / 1000;
aSymbolRect.AdjustBottom( -nBorderDistanceBottom );
DecorationView aDecoView(&rRenderContext);
- aDecoView.DrawSymbol(aSymbolRect, SymbolType::SPIN_DOWN, (bHighContrast ? Color(COL_WHITE) : Color(COL_BLACK)));
+ aDecoView.DrawSymbol(aSymbolRect, SymbolType::SPIN_DOWN, (bHighContrast ? COL_WHITE : COL_BLACK));
}
void AnnotationMenuButton::KeyInput(const KeyEvent& rKeyEvt)
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 0eb0cbb2d9e0..f0f76560218e 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1109,7 +1109,7 @@ Color SwPostItMgr::GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) cons
if (ArrowEnabled(aDirection,aPage))
{
if (Application::GetSettings().GetStyleSettings().GetHighContrastMode())
- return Color(COL_WHITE);
+ return COL_WHITE;
else
return COL_NOTES_SIDEPANE_ARROW_ENABLED;
}
@@ -2047,7 +2047,7 @@ Color SwPostItMgr::GetColorDark(std::size_t aAuthorIndex)
return aArrayNormal[ aAuthorIndex % SAL_N_ELEMENTS( aArrayNormal )];
}
else
- return Color(COL_WHITE);
+ return COL_WHITE;
}
Color SwPostItMgr::GetColorLight(std::size_t aAuthorIndex)
@@ -2062,7 +2062,7 @@ Color SwPostItMgr::GetColorLight(std::size_t aAuthorIndex)
return aArrayLight[ aAuthorIndex % SAL_N_ELEMENTS( aArrayLight )];
}
else
- return Color(COL_WHITE);
+ return COL_WHITE;
}
Color SwPostItMgr::GetColorAnchor(std::size_t aAuthorIndex)
@@ -2077,7 +2077,7 @@ Color SwPostItMgr::GetColorAnchor(std::size_t aAuthorIndex)
return aArrayAnchor[ aAuthorIndex % SAL_N_ELEMENTS( aArrayAnchor )];
}
else
- return Color(COL_WHITE);
+ return COL_WHITE;
}
void SwPostItMgr::SetActiveSidebarWin( SwAnnotationWin* p)
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 11568bd934a9..5a4a67bb9c11 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -213,7 +213,7 @@ void SwColExample::DrawPage(vcl::RenderContext& rRenderContext, const Point& rOr
nR = GetLeft();
}
- rRenderContext.SetFillColor(Color(COL_LIGHTGRAY));
+ rRenderContext.SetFillColor(COL_LIGHTGRAY);
tools::Rectangle aRect;
aRect.SetRight( rOrg.X() + GetSize().Width() - nR );
aRect.SetLeft( rOrg.X() + nL );
@@ -379,7 +379,7 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const tools:
tools::Rectangle aRect(aTL, m_aFrameSize);
//draw a shadow rectangle
- rRenderContext.SetFillColor(Color(COL_GRAY));
+ rRenderContext.SetFillColor(COL_GRAY);
tools::Rectangle aShadowRect(aRect);
aShadowRect.Move(aTL.Y(), aTL.Y());
rRenderContext.DrawRect(aShadowRect);
@@ -580,7 +580,7 @@ void SwPageGridExample::DrawPage(vcl::RenderContext& rRenderContext, const Point
//vertical lines
bool bBothLines = pGridItem->GetGridType() == GRID_LINES_CHARS;
- rRenderContext.SetFillColor(Color(COL_TRANSPARENT));
+ rRenderContext.SetFillColor(COL_TRANSPARENT);
sal_Int32 nXMove = m_bVertical ? nLineHeight : 0;
sal_Int32 nYMove = m_bVertical ? 0 : nLineHeight;
for (sal_Int32 nLine = 0; nLine < nLines; nLine++)
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index 5bb3e164352b..6ae103bcb830 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -76,7 +76,7 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
pOutlView->GetOutliner()->SetRefDevice(pView->GetWrtShell().getIDocumentDeviceAccess().getPrinter( false ));
// Hack: all SdrTextObj attributes should be transferred to EditEngine
- pOutlView->SetBackgroundColor( Color( COL_WHITE ) );
+ pOutlView->SetBackgroundColor( COL_WHITE );
InsertView( pOutlView );
Point aPoint( 0, 0 );
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index 51d65e760f44..e681cc1e3d71 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -182,7 +182,7 @@ void SwCommentRuler::DrawCommentControl(vcl::RenderContext& rRenderContext)
// Draw arrow
// FIXME consistence of button colors. http://opengrok.libreoffice.org/xref/core/vcl/source/control/button.cxx#785
- Color aArrowColor = GetFadedColor(Color(COL_BLACK), rStyleSettings.GetShadowColor());
+ Color aArrowColor = GetFadedColor(COL_BLACK, rStyleSettings.GetShadowColor());
ImplDrawArrow(*maVirDev.get(), aArrowPos.X(), aArrowPos.Y(), aArrowColor, bArrowToRight);
// Blit comment control
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 2a4acb63a607..05ff06eda599 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2306,7 +2306,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
else
{
aBrushItem.SetColor(COL_TRANSPARENT);
- rReq.AppendItem(SvxColorItem(Color(COL_TRANSPARENT),nSlot));
+ rReq.AppendItem(SvxColorItem(COL_TRANSPARENT,nSlot));
}
break;
}
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index fa3fe1ee1dae..f61582c26ecc 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -130,7 +130,7 @@ static void lcl_PrintHeader( vcl::RenderContext &rOutDev, sal_Int32 nPages, sal_
Color aOldFillColor( rOutDev.GetFillColor() );
vcl::Font aOldFont( rOutDev.GetFont() );
- rOutDev.SetFillColor( Color(COL_TRANSPARENT) );
+ rOutDev.SetFillColor( COL_TRANSPARENT );
vcl::Font aFont( aOldFont );
aFont.SetWeight( WEIGHT_BOLD );
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index a2dd7d4873a6..5cec8af4fef3 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -128,7 +128,7 @@ namespace toolkit
aStyleSettings.SetCheckedColor( aBackground );
sal_Int32 nBackgroundLuminance = Color( nBackgroundColor ).GetLuminance();
- sal_Int32 nWhiteLuminance = Color( COL_WHITE ).GetLuminance();
+ sal_Int32 nWhiteLuminance = Color(COL_WHITE).GetLuminance();
Color aLightShadow( nBackgroundColor );
aLightShadow.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) );
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index a2e18dad1d5f..567f0a0d91e2 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -318,7 +318,7 @@ namespace toolkitform
if ( xModelProps->getPropertyValue( sBorderColorPropertyName ) >>= nBorderColor )
Descriptor->BorderColor = Color( nBorderColor );
else
- Descriptor->BorderColor = Color( COL_BLACK );
+ Descriptor->BorderColor = COL_BLACK;
}
}
}
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);
}
};