summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-01 15:48:15 +0200
committerNoel Grandin <noel@peralex.com>2016-09-05 08:21:46 +0200
commita881fd7e66294ada222e1d618a7d47a0549a2342 (patch)
treecb928eb75f73e36ec3c93a44f2901617476e7fc8
parent8c5d90adaf1813c8f3a65487044b8fbe80f8bc85 (diff)
convert RasterOp to scoped enum
Change-Id: I136423c105316c9b5b18e64d04a248fd7ac5590b
-rw-r--r--cui/source/tabpages/grfpage.cxx4
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx12
-rw-r--r--drawinglayer/source/processor2d/vclhelperbufferdevice.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx2
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--extensions/source/scanner/sanedlg.cxx2
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx48
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx34
-rw-r--r--include/vcl/vclenum.hxx2
-rw-r--r--sc/source/ui/dbgui/csvcontrol.cxx2
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx2
-rw-r--r--svtools/source/contnr/svimpbox.cxx2
-rw-r--r--svtools/source/control/headbar.cxx4
-rw-r--r--svtools/source/graphic/grfcache.cxx2
-rw-r--r--svtools/source/graphic/grfmgr2.cxx2
-rw-r--r--svx/source/svdraw/svdobj.cxx2
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx2
-rw-r--r--sw/source/uibase/utlui/shdwcrsr.cxx2
-rw-r--r--test/source/mtfxmldump.cxx12
-rw-r--r--toolkit/source/awt/vclxgraphics.cxx4
-rw-r--r--vcl/backendtest/outputdevice/outputdevice.cxx6
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx10
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx16
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx18
-rw-r--r--vcl/source/gdi/metaact.cxx4
-rw-r--r--vcl/source/gdi/print.cxx2
-rw-r--r--vcl/source/gdi/svmconverter.cxx22
-rw-r--r--vcl/source/gdi/virdev.cxx2
-rw-r--r--vcl/source/outdev/bitmap.cxx6
-rw-r--r--vcl/source/outdev/gradient.cxx6
-rw-r--r--vcl/source/outdev/line.cxx4
-rw-r--r--vcl/source/outdev/mask.cxx2
-rw-r--r--vcl/source/outdev/outdev.cxx8
-rw-r--r--vcl/source/outdev/outdevstate.cxx16
-rw-r--r--vcl/source/outdev/polygon.cxx6
-rw-r--r--vcl/source/outdev/polyline.cxx4
-rw-r--r--vcl/source/outdev/transparent.cxx2
-rw-r--r--vcl/source/outdev/wallpaper.cxx6
-rw-r--r--vcl/source/window/paint.cxx6
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/workben/outdevgrind.cxx12
-rw-r--r--vcl/workben/vcldemo.cxx10
42 files changed, 160 insertions, 160 deletions
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index f6a1a8716af1..e1b4a94cd43d 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -791,7 +791,7 @@ void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
Size aWinSize(rRenderContext.PixelToLogic(GetOutputSizePixel()));
rRenderContext.SetLineColor();
rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
- rRenderContext.SetRasterOp(ROP_OVERPAINT);
+ rRenderContext.SetRasterOp(RasterOp::OverPaint);
rRenderContext.DrawRect(Rectangle(Point(), aWinSize));
rRenderContext.SetLineColor(Color(COL_WHITE));
@@ -803,7 +803,7 @@ void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
Size aSz(2, 0);
aSz = rRenderContext.PixelToLogic(aSz);
rRenderContext.SetFillColor(Color(COL_TRANSPARENT));
- rRenderContext.SetRasterOp(ROP_INVERT);
+ rRenderContext.SetRasterOp(RasterOp::Invert);
aRect.Left() += aTopLeft.Y();
aRect.Top() += aTopLeft.X();
aRect.Right() -= aBottomRight.Y();
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index a691c8dee92a..cf4182cbbd44 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -114,7 +114,7 @@ namespace
maOverlineColor(),
maClipPolyPoygon(),
maFont(),
- maRasterOp(ROP_OVERPAINT),
+ maRasterOp(RasterOp::OverPaint),
mnLayoutMode(ComplexTextLayoutFlags::Default),
maLanguageType(0),
mnPushFlags(PushFlags::NONE),
@@ -179,8 +179,8 @@ namespace
const RasterOp& getRasterOp() const { return maRasterOp; }
void setRasterOp(const RasterOp& rRasterOp) { if(rRasterOp != maRasterOp) maRasterOp = rRasterOp; }
- bool isRasterOpInvert() const { return (ROP_XOR == maRasterOp || ROP_INVERT == maRasterOp); }
- bool isRasterOpForceBlack() const { return ROP_0 == maRasterOp; }
+ bool isRasterOpInvert() const { return (RasterOp::Xor == maRasterOp || RasterOp::Invert == maRasterOp); }
+ bool isRasterOpForceBlack() const { return RasterOp::N0 == maRasterOp; }
bool isRasterOpActive() const { return isRasterOpInvert() || isRasterOpForceBlack(); }
ComplexTextLayoutFlags getLayoutMode() const { return mnLayoutMode; }
@@ -1015,8 +1015,8 @@ namespace
/** helper to handle the change of RasterOp. It takes care of encapsulating all current
geometry to the current RasterOp (if changed) and needs to be called on any RasterOp
change. It will also start a new geometry target to embrace to the new RasterOp if
- a changing RasterOp is used. Currently, ROP_XOR and ROP_INVERT are supported using
- InvertPrimitive2D, and ROP_0 by using a ModifiedColorPrimitive2D to force to black paint
+ a changing RasterOp is used. Currently, RasterOp::Xor and RasterOp::Invert are supported using
+ InvertPrimitive2D, and RasterOp::N0 by using a ModifiedColorPrimitive2D to force to black paint
*/
void HandleNewRasterOp(
RasterOp aRasterOp,
@@ -2794,7 +2794,7 @@ namespace
if(bRasterOpMayChange && rPropertyHolders.Current().isRasterOpActive())
{
// end evtl. RasterOp
- HandleNewRasterOp(ROP_OVERPAINT, rTargetHolders, rPropertyHolders);
+ HandleNewRasterOp(RasterOp::OverPaint, rTargetHolders, rPropertyHolders);
}
rPropertyHolders.Pop();
diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
index dacc58b953ac..bf735d7be1bd 100644
--- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
@@ -294,7 +294,7 @@ namespace drawinglayer
// copy AA flag for new target
mpContent->SetAntialiasing(mrOutDev.GetAntialiasing());
- // copy RasterOp (e.g. may be ROP_XOR on destination)
+ // copy RasterOp (e.g. may be RasterOp::Xor on destination)
mpContent->SetRasterOp(mrOutDev.GetRasterOp());
}
}
@@ -346,9 +346,9 @@ namespace drawinglayer
}
#endif
- // during painting the buffer, disable evtl. set RasterOp (may be ROP_XOR)
+ // during painting the buffer, disable evtl. set RasterOp (may be RasterOp::Xor)
const RasterOp aOrigRasterOp(mrOutDev.GetRasterOp());
- mrOutDev.SetRasterOp(ROP_OVERPAINT);
+ mrOutDev.SetRasterOp(RasterOp::OverPaint);
if(mpAlpha)
{
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 1424d8a1f182..365563811e30 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -1197,7 +1197,7 @@ namespace drawinglayer
// (Not true, also used at least for the drawing of dragged column and row boundaries in SC.)
// Set OutDev to XOR and switch AA off (XOR does not work with AA)
mpOutputDevice->Push();
- mpOutputDevice->SetRasterOp( ROP_XOR );
+ mpOutputDevice->SetRasterOp( RasterOp::Xor );
const AntialiasingFlags nAntiAliasing(mpOutputDevice->GetAntialiasing());
mpOutputDevice->SetAntialiasing(nAntiAliasing & ~AntialiasingFlags::EnableB2dDraw);
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 701e66b60965..36b08ebea2fb 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -484,7 +484,7 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rD
_pTarget->Push(PushFlags::LINECOLOR|PushFlags::FILLCOLOR|PushFlags::RASTEROP);
_pTarget->SetLineColor();
_pTarget->SetFillColor(COL_BLACK);
- _pTarget->SetRasterOp(ROP_INVERT);
+ _pTarget->SetRasterOp(RasterOp::Invert);
_pTarget->DrawRect(aRect);
_pTarget->Pop();
}
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 6181f31a9cf0..e2b8c68586ff 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -1243,7 +1243,7 @@ void ScanPreview::DrawDrag(vcl::RenderContext& rRenderContext)
return;
RasterOp eROP = rRenderContext.GetRasterOp();
- rRenderContext.SetRasterOp(ROP_INVERT);
+ rRenderContext.SetRasterOp(RasterOp::Invert);
rRenderContext.SetMapMode(MapMode(MAP_PIXEL));
if (mbDragDrawn)
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 6dbdff195fc4..7a3efb97469b 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -311,16 +311,16 @@ struct OSAttr
, nPushOrder(0)
, nIvAttrA(0)
, nIvAttrP(0)
- , eLinMix(ROP_OVERPAINT)
- , eLinBgMix(ROP_OVERPAINT)
- , eChrMix(ROP_OVERPAINT)
- , eChrBgMix(ROP_OVERPAINT)
- , eMrkMix(ROP_OVERPAINT)
- , eMrkBgMix(ROP_OVERPAINT)
- , ePatMix(ROP_OVERPAINT)
- , ePatBgMix(ROP_OVERPAINT)
- , eImgMix(ROP_OVERPAINT)
- , eImgBgMix(ROP_OVERPAINT)
+ , eLinMix(RasterOp::OverPaint)
+ , eLinBgMix(RasterOp::OverPaint)
+ , eChrMix(RasterOp::OverPaint)
+ , eChrBgMix(RasterOp::OverPaint)
+ , eMrkMix(RasterOp::OverPaint)
+ , eMrkBgMix(RasterOp::OverPaint)
+ , ePatMix(RasterOp::OverPaint)
+ , ePatBgMix(RasterOp::OverPaint)
+ , eImgMix(RasterOp::OverPaint)
+ , eImgBgMix(RasterOp::OverPaint)
, nArcP(0)
, nArcQ(0)
, nArcR(0)
@@ -814,10 +814,10 @@ Point OS2METReader::ReadPoint( const bool bAdjustBoundRect )
RasterOp OS2METReader::OS2MixToRasterOp(sal_uInt8 nMix)
{
switch (nMix) {
- case 0x0c: return ROP_INVERT;
- case 0x04: return ROP_XOR;
- case 0x0b: return ROP_XOR;
- default: return ROP_OVERPAINT;
+ case 0x0c: return RasterOp::Invert;
+ case 0x04: return RasterOp::Xor;
+ case 0x0b: return RasterOp::Xor;
+ default: return RasterOp::OverPaint;
}
}
@@ -2622,24 +2622,24 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
aDefAttr.aLinCol =Color(COL_BLACK);
aDefAttr.aLinBgCol =Color(COL_WHITE);
- aDefAttr.eLinMix =ROP_OVERPAINT;
- aDefAttr.eLinBgMix =ROP_OVERPAINT;
+ aDefAttr.eLinMix =RasterOp::OverPaint;
+ aDefAttr.eLinBgMix =RasterOp::OverPaint;
aDefAttr.aChrCol =Color(COL_BLACK);
aDefAttr.aChrBgCol =Color(COL_WHITE);
- aDefAttr.eChrMix =ROP_OVERPAINT;
- aDefAttr.eChrBgMix =ROP_OVERPAINT;
+ aDefAttr.eChrMix =RasterOp::OverPaint;
+ aDefAttr.eChrBgMix =RasterOp::OverPaint;
aDefAttr.aMrkCol =Color(COL_BLACK);
aDefAttr.aMrkBgCol =Color(COL_WHITE);
- aDefAttr.eMrkMix =ROP_OVERPAINT;
- aDefAttr.eMrkBgMix =ROP_OVERPAINT;
+ aDefAttr.eMrkMix =RasterOp::OverPaint;
+ aDefAttr.eMrkBgMix =RasterOp::OverPaint;
aDefAttr.aPatCol =Color(COL_BLACK);
aDefAttr.aPatBgCol =Color(COL_WHITE);
- aDefAttr.ePatMix =ROP_OVERPAINT;
- aDefAttr.ePatBgMix =ROP_OVERPAINT;
+ aDefAttr.ePatMix =RasterOp::OverPaint;
+ aDefAttr.ePatBgMix =RasterOp::OverPaint;
aDefAttr.aImgCol =Color(COL_BLACK);
aDefAttr.aImgBgCol =Color(COL_WHITE);
- aDefAttr.eImgMix =ROP_OVERPAINT;
- aDefAttr.eImgBgMix =ROP_OVERPAINT;
+ aDefAttr.eImgMix =RasterOp::OverPaint;
+ aDefAttr.eImgBgMix =RasterOp::OverPaint;
aDefAttr.nArcP =1;
aDefAttr.nArcQ =1;
aDefAttr.nArcR =0;
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index ad451f72166e..2c4a7e9b8ca1 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -161,7 +161,7 @@ private:
Pattern eActFillPattern;
Pattern eActBackPattern;
Size nActPenSize;
- // Note: Postscript mode is stored by setting eActRop to ROP_1
+ // Note: Postscript mode is stored by setting eActRop to RasterOp::N1
RasterOp eActROP;
PictDrawingMethod eActMethod;
Size aActOvalSize;
@@ -215,7 +215,7 @@ private:
// returns true, if we do not need to print the shape/text/frame
bool IsInvisible(PictDrawingMethod eMethod) const {
- if (eActROP == ROP_1) return true;
+ if (eActROP == RasterOp::N1) return true;
if (eMethod==PDM_FRAME && (nActPenSize.Width() == 0 || nActPenSize.Height() == 0)) return true;
return false;
}
@@ -247,7 +247,7 @@ public:
, pVirDev(nullptr)
, nOrigPos(0)
, IsVersion2(false)
- , eActROP(ROP_OVERPAINT)
+ , eActROP(RasterOp::OverPaint)
, eActMethod(PDM_UNDEFINED)
{
aActFont.SetCharSet(GetTextEncoding());
@@ -648,12 +648,12 @@ void PictReader::DrawingMethod(PictDrawingMethod eMethod)
SetFillColor( aActBackColor );// Osnola: previously aActForeColor
else // checkMe
SetFillColor(eActBackPattern.getColor(COL_BLACK, aActBackColor));
- pVirDev->SetRasterOp(ROP_OVERPAINT);
+ pVirDev->SetRasterOp(RasterOp::OverPaint);
break;
case PDM_INVERT: // checkme
SetLineColor( Color(COL_TRANSPARENT));
SetFillColor( Color( COL_BLACK ) );
- pVirDev->SetRasterOp(ROP_INVERT);
+ pVirDev->SetRasterOp(RasterOp::Invert);
break;
case PDM_FILL:
SetLineColor( Color(COL_TRANSPARENT) );
@@ -661,14 +661,14 @@ void PictReader::DrawingMethod(PictDrawingMethod eMethod)
SetFillColor( aActForeColor );
else
SetFillColor(eActFillPattern.getColor(aActBackColor, aActForeColor));
- pVirDev->SetRasterOp(ROP_OVERPAINT);
+ pVirDev->SetRasterOp(RasterOp::OverPaint);
break;
case PDM_TEXT:
aActFont.SetColor(aActForeColor);
aActFont.SetFillColor(aActBackColor);
aActFont.SetTransparent(true);
pVirDev->SetFont(aActFont);
- pVirDev->SetRasterOp(ROP_OVERPAINT);
+ pVirDev->SetRasterOp(RasterOp::OverPaint);
break;
default:
break; // -Wall undefined not handled...
@@ -1385,17 +1385,17 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x0008: // PnMode
pPict->ReadUInt16( nUSHORT );
// internal code for postscript command (Quickdraw Reference Drawing B-30,B-34)
- if (nUSHORT==23) eActROP = ROP_1;
+ if (nUSHORT==23) eActROP = RasterOp::N1;
else {
switch (nUSHORT & 0x0007) {
- case 0: eActROP=ROP_OVERPAINT; break; // Copy
- case 1: eActROP=ROP_OVERPAINT; break; // Or
- case 2: eActROP=ROP_XOR; break; // Xor
- case 3: eActROP=ROP_OVERPAINT; break; // Bic
- case 4: eActROP=ROP_INVERT; break; // notCopy
- case 5: eActROP=ROP_OVERPAINT; break; // notOr
- case 6: eActROP=ROP_XOR; break; // notXor
- case 7: eActROP=ROP_OVERPAINT; break; // notBic
+ case 0: eActROP=RasterOp::OverPaint; break; // Copy
+ case 1: eActROP=RasterOp::OverPaint; break; // Or
+ case 2: eActROP=RasterOp::Xor; break; // Xor
+ case 3: eActROP=RasterOp::OverPaint; break; // Bic
+ case 4: eActROP=RasterOp::Invert; break; // notCopy
+ case 5: eActROP=RasterOp::OverPaint; break; // notOr
+ case 6: eActROP=RasterOp::Xor; break; // notXor
+ case 7: eActROP=RasterOp::OverPaint; break; // notBic
}
}
eActMethod=PDM_UNDEFINED;
@@ -1888,7 +1888,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
aActForeColor = Color(COL_BLACK);
aActBackColor = Color(COL_WHITE);
nActPenSize = Size(1,1);
- eActROP = ROP_OVERPAINT;
+ eActROP = RasterOp::OverPaint;
eActMethod = PDM_UNDEFINED;
aActOvalSize = Size(1,1);
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index b80fd4109851..0934db7d539e 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -71,7 +71,7 @@ enum LineStyle
LineStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
};
-enum RasterOp { ROP_OVERPAINT, ROP_XOR, ROP_0, ROP_1, ROP_INVERT };
+enum class RasterOp { OverPaint, Xor, N0, N1, Invert };
enum class FontAutoHint { DontKnow, No, Yes };
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index c7be42b01b88..b868b580425f 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -260,7 +260,7 @@ void ScCsvControl::ImplInvertRect( OutputDevice& rOutDev, const Rectangle& rRect
rOutDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::RASTEROP );
rOutDev.SetLineColor( Color( COL_BLACK ) );
rOutDev.SetFillColor( Color( COL_BLACK ) );
- rOutDev.SetRasterOp( ROP_INVERT );
+ rOutDev.SetRasterOp( RasterOp::Invert );
rOutDev.DrawRect( rRect );
rOutDev.Pop();
}
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index e47d1bdf2818..6cd569e37aa1 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -81,7 +81,7 @@ bool hasUnsupportedActions( const GDIMetaFile& rMtf )
{
case MetaActionType::RASTEROP:
// overpaint is okay - that's the default, anyway
- if( ROP_OVERPAINT ==
+ if( RasterOp::OverPaint ==
static_cast<MetaRasterOpAction*>(pCurrAct)->GetRasterOp() )
{
break;
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index fcaf870d0fc8..d364a3b0b635 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2904,7 +2904,7 @@ void SvImpLBox::PaintDDCursor( SvTreeListEntry* pInsertionPos )
else
nY = 1;
RasterOp eOldOp = pView->GetRasterOp();
- pView->SetRasterOp( ROP_INVERT );
+ pView->SetRasterOp( RasterOp::Invert );
Color aOldLineColor = pView->GetLineColor();
pView->SetLineColor( Color( COL_BLACK ) );
pView->DrawLine( Point( 0, nY ), Point( aOutputSize.Width(), nY ) );
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 2efc557a66ca..c3de48a856d4 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -251,7 +251,7 @@ void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos )
aEndPos.X() = aRect2.Left()+6;
}
- SetRasterOp( ROP_INVERT );
+ SetRasterOp( RasterOp::Invert );
DrawRect( aStartRect );
DrawLine( aStartPos, aEndPos );
if ( nEndPos > nStartPos )
@@ -274,7 +274,7 @@ void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos )
Point( aEndPos.X()-3, aEndPos.Y()+1 ) );
DrawPixel( Point( aEndPos.X()-4, aEndPos.Y() ) );
}
- SetRasterOp( ROP_OVERPAINT );
+ SetRasterOp( RasterOp::OverPaint );
}
void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh,
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 43f4d07b28c3..5d2bf627811c 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -676,7 +676,7 @@ bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf,
// these actions actually output something (that's
// different from a bitmap)
case MetaActionType::RASTEROP:
- if( static_cast<MetaRasterOpAction*>(pAct)->GetRasterOp() == ROP_OVERPAINT )
+ if( static_cast<MetaRasterOpAction*>(pAct)->GetRasterOp() == RasterOp::OverPaint )
break;
SAL_FALLTHROUGH;
case MetaActionType::PIXEL:
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 457d71f056ff..03ca1a5a5285 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -1287,7 +1287,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
// these actions actually output something (that's
// different from a bitmap)
case MetaActionType::RASTEROP:
- if( static_cast<MetaRasterOpAction*>(pAct)->GetRasterOp() == ROP_OVERPAINT )
+ if( static_cast<MetaRasterOpAction*>(pAct)->GetRasterOp() == RasterOp::OverPaint )
break;
SAL_FALLTHROUGH;
case MetaActionType::PIXEL:
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index f534933ca456..669689451666 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1827,7 +1827,7 @@ void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& , const SdrObjMa
rOut.SetLineColor(COL_BLACK);
rOut.SetFillColor();
- rOut.SetRasterOp(ROP_INVERT);
+ rOut.SetRasterOp(RasterOp::Invert);
for(sal_uInt32 a(0); a < nCount; a++)
{
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 592434b40154..af5d94e83abe 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -289,7 +289,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
pVDev->Erase();
rGraphic.Draw( pVDev.get(), aPt, aSize );
- pVDev->SetRasterOp( ROP_XOR );
+ pVDev->SetRasterOp( RasterOp::Xor );
pVDev->DrawBitmap( aPt, aSize, aBitmap );
aGraphic = BitmapEx( aBitmap, pVDev->GetBitmap( aPt, aSize ) );
}
diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx b/sw/source/uibase/utlui/shdwcrsr.cxx
index 5be560b490c5..40543dc88abc 100644
--- a/sw/source/uibase/utlui/shdwcrsr.cxx
+++ b/sw/source/uibase/utlui/shdwcrsr.cxx
@@ -74,7 +74,7 @@ void SwShadowCursor::DrawCursor( const Point& rPt, long nHeight, sal_uInt16 nMod
pWin->Push();
pWin->SetMapMode( MAP_PIXEL );
- pWin->SetRasterOp( ROP_XOR );
+ pWin->SetRasterOp( RasterOp::Xor );
pWin->SetLineColor( Color( aCol.GetColor() ^ COL_WHITE ) );
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index 4e926df2d9fe..f1e2dd059fc1 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -85,11 +85,11 @@ OUString convertRopToString(RasterOp eRop)
{
switch (eRop)
{
- case ROP_OVERPAINT: return OUString("overpaint");
- case ROP_XOR: return OUString("xor");
- case ROP_0: return OUString("0");
- case ROP_1: return OUString("1");
- case ROP_INVERT: return OUString("invert");
+ case RasterOp::OverPaint: return OUString("overpaint");
+ case RasterOp::Xor: return OUString("xor");
+ case RasterOp::N0: return OUString("0");
+ case RasterOp::N1: return OUString("1");
+ case RasterOp::Invert: return OUString("invert");
}
return OUString();
}
@@ -335,7 +335,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter)
MetaRasterOpAction* pMetaRasterOpAction = static_cast<MetaRasterOpAction*>(pAction);
rWriter.startElement(sCurrentElementTag);
- if (pMetaRasterOpAction->GetRasterOp() != ROP_OVERPAINT)
+ if (pMetaRasterOpAction->GetRasterOp() != RasterOp::OverPaint)
{
rWriter.attribute("operation", convertRopToString(pMetaRasterOpAction->GetRasterOp()));
}
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 64115931fe51..c956b2a688cd 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -59,7 +59,7 @@ IMPL_XTYPEPROVIDER_END
VCLXGraphics::VCLXGraphics()
: mpOutputDevice(nullptr)
- , meRasterOp(ROP_OVERPAINT)
+ , meRasterOp(RasterOp::OverPaint)
, mpClipRegion(nullptr)
{
}
@@ -116,7 +116,7 @@ void VCLXGraphics::initAttrs()
maTextFillColor = mpOutputDevice->GetTextFillColor(); /* COL_TRANSPARENT */
maLineColor = mpOutputDevice->GetLineColor(); /* COL_BLACK */
maFillColor = mpOutputDevice->GetFillColor(); /* COL_WHITE */
- meRasterOp = mpOutputDevice->GetRasterOp(); /* ROP_OVERPAINT */
+ meRasterOp = mpOutputDevice->GetRasterOp(); /* RasterOp::OverPaint */
}
void VCLXGraphics::InitOutputDevice( InitOutDevFlags nFlags )
diff --git a/vcl/backendtest/outputdevice/outputdevice.cxx b/vcl/backendtest/outputdevice/outputdevice.cxx
index 6bc4278b8f65..6f7ed16df824 100644
--- a/vcl/backendtest/outputdevice/outputdevice.cxx
+++ b/vcl/backendtest/outputdevice/outputdevice.cxx
@@ -38,15 +38,15 @@ Bitmap OutputDeviceTestAnotherOutDev::setupXOR()
Rectangle aScissorRectangle(maVDRectangle);
aScissorRectangle.shrink(4);
- mpVirtualDevice->SetRasterOp(ROP_XOR);
+ mpVirtualDevice->SetRasterOp(RasterOp::Xor);
mpVirtualDevice->SetFillColor(constFillColor);
mpVirtualDevice->DrawRect(aDrawRectangle);
- mpVirtualDevice->SetRasterOp(ROP_0);
+ mpVirtualDevice->SetRasterOp(RasterOp::N0);
mpVirtualDevice->SetFillColor(COL_BLACK);
mpVirtualDevice->DrawRect(aScissorRectangle);
- mpVirtualDevice->SetRasterOp(ROP_XOR);
+ mpVirtualDevice->SetRasterOp(RasterOp::Xor);
mpVirtualDevice->SetFillColor(constFillColor);
mpVirtualDevice->DrawRect(aDrawRectangle);
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index eeacabe06f65..5d65c6c10f4f 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -333,7 +333,7 @@ bool EMFWriter::WriteEMF(const GDIMetaFile& rMtf)
m_rStm.WriteInt32( 0 ).WriteInt32( 0 );
ImplEndRecord();
- ImplWriteRasterOp( ROP_OVERPAINT );
+ ImplWriteRasterOp( RasterOp::OverPaint );
ImplBeginRecord( WIN_EMR_SETBKMODE );
m_rStm.WriteUInt32( 1 ); // TRANSPARENT
@@ -625,9 +625,9 @@ void EMFWriter::ImplWriteRasterOp( RasterOp eRop )
switch( eRop )
{
- case ROP_INVERT: nROP2 = 6; break;
- case ROP_XOR: nROP2 = 7; break;
- default: nROP2 = 13;break;
+ case RasterOp::Invert: nROP2 = 6; break;
+ case RasterOp::Xor: nROP2 = 7; break;
+ default: nROP2 = 13;break;
}
ImplBeginRecord( WIN_EMR_SETROP2 );
@@ -839,7 +839,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
const sal_uLong nOffPos = m_rStm.Tell();
m_rStm.SeekRel( 16 );
- m_rStm.WriteUInt32( 0 ).WriteInt32( ( ROP_XOR == maVDev->GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP );
+ m_rStm.WriteUInt32( 0 ).WriteInt32( ( RasterOp::Xor == maVDev->GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP );
ImplWriteSize( rSz );
WriteDIB(rBmp, aMemStm, true, false);
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 62bf50f874ca..de2a01294102 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -827,8 +827,8 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
mnTextLayoutMode ( ComplexTextLayoutFlags::Default ),
mnLatestBkMode ( BkMode::NONE ),
mnBkMode ( BkMode::OPAQUE ),
- meLatestRasterOp ( ROP_INVERT ),
- meRasterOp ( ROP_OVERPAINT ),
+ meLatestRasterOp ( RasterOp::Invert ),
+ meRasterOp ( RasterOp::OverPaint ),
maActPos ( Point() ),
mbNopMode ( false ),
mbFillStyleSelected ( false ),
@@ -865,8 +865,8 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
maLatestFillStyle.aFillColor = Color( 0x12, 0x34, 0x56 );
mnRop = WMFRasterOp::Black;
- meRasterOp = ROP_OVERPAINT;
- mpGDIMetaFile->AddAction( new MetaRasterOpAction( ROP_OVERPAINT ) );
+ meRasterOp = RasterOp::OverPaint;
+ mpGDIMetaFile->AddAction( new MetaRasterOpAction( RasterOp::OverPaint ) );
}
WinMtfOutput::~WinMtfOutput()
@@ -952,16 +952,16 @@ WMFRasterOp WinMtfOutput::SetRasterOp( WMFRasterOp nRasterOp )
switch( nRasterOp )
{
case WMFRasterOp::Not:
- meRasterOp = ROP_INVERT;
+ meRasterOp = RasterOp::Invert;
break;
case WMFRasterOp::XorPen:
- meRasterOp = ROP_XOR;
+ meRasterOp = RasterOp::Xor;
break;
case WMFRasterOp::Nop:
{
- meRasterOp = ROP_OVERPAINT;
+ meRasterOp = RasterOp::OverPaint;
if( !mbNopMode )
{
m_NopFillStyle = maFillStyle;
@@ -974,7 +974,7 @@ WMFRasterOp WinMtfOutput::SetRasterOp( WMFRasterOp nRasterOp )
break;
default:
- meRasterOp = ROP_OVERPAINT;
+ meRasterOp = RasterOp::OverPaint;
break;
}
}
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 68e7c9f1ca74..9bf1431e83b1 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -142,12 +142,12 @@ WMFWriter::WMFWriter()
, nMetafileHeaderPos(0)
, nMaxRecordSize(0)
, nActRecordPos(0)
- , eSrcRasterOp(ROP_OVERPAINT)
+ , eSrcRasterOp(RasterOp::OverPaint)
, eSrcTextAlign(ALIGN_BASELINE)
, bSrcIsClipping(false)
, pAttrStack(nullptr)
, eSrcHorTextAlign(W_TA_LEFT)
- , eDstROP2(ROP_OVERPAINT)
+ , eDstROP2(RasterOp::OverPaint)
, eDstTextAlign(ALIGN_BASELINE)
, eDstHorTextAlign(W_TA_LEFT)
, bDstIsClipping(false)
@@ -723,9 +723,9 @@ void WMFWriter::WMFRecord_SetROP2(RasterOp eROP)
sal_uInt16 nROP2;
switch (eROP) {
- case ROP_INVERT: nROP2=W_R2_NOT; break;
- case ROP_XOR: nROP2=W_R2_XORPEN; break;
- default: nROP2=W_R2_COPYPEN;
+ case RasterOp::Invert: nROP2=W_R2_NOT; break;
+ case RasterOp::Xor: nROP2=W_R2_XORPEN; break;
+ default: nROP2=W_R2_COPYPEN;
}
WriteRecordHeader(0x00000004,W_META_SETROP2);
pWMF->WriteUInt16( nROP2 );
@@ -797,9 +797,9 @@ void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize,
{
switch( eSrcRasterOp )
{
- case ROP_INVERT: nROP = W_DSTINVERT; break;
- case ROP_XOR: nROP = W_SRCINVERT; break;
- default: nROP = W_SRCCOPY;
+ case RasterOp::Invert: nROP = W_DSTINVERT; break;
+ case RasterOp::Xor: nROP = W_SRCINVERT; break;
+ default: nROP = W_SRCCOPY;
}
}
@@ -1757,7 +1757,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
WMFRecord_SetWindowExt(rMTF.GetPrefSize());
WMFRecord_SetBkMode( true );
- eDstROP2 = eSrcRasterOp = ROP_OVERPAINT;
+ eDstROP2 = eSrcRasterOp = RasterOp::OverPaint;
WMFRecord_SetROP2(eDstROP2);
aDstLineInfo = LineInfo();
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 059b62e91788..047a207381d8 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -2894,7 +2894,7 @@ void MetaPopAction::Read( SvStream& rIStm, ImplMetaReadData* )
MetaRasterOpAction::MetaRasterOpAction() :
MetaAction ( MetaActionType::RASTEROP ),
- meRasterOp ( ROP_OVERPAINT )
+ meRasterOp ( RasterOp::OverPaint )
{}
MetaRasterOpAction::~MetaRasterOpAction()
@@ -2922,7 +2922,7 @@ void MetaRasterOpAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
MetaAction::Write(rOStm, pData);
VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
- rOStm.WriteUInt16( meRasterOp );
+ rOStm.WriteUInt16( (sal_uInt16)meRasterOp );
}
void MetaRasterOpAction::Read( SvStream& rIStm, ImplMetaReadData* )
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 43bc44b3e244..d2c0f87c3834 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -586,7 +586,7 @@ bool Printer::AcquireGraphics() const
if ( mpGraphics )
{
- mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp) );
+ mpGraphics->SetXORMode( (RasterOp::Invert == meRasterOp) || (RasterOp::Xor == meRasterOp) );
mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw));
}
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index f9b4486c0b48..7086c21d8d30 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -744,7 +744,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
ImplReadRect( rIStm, aRect );
rMtf.AddAction( new MetaPushAction( PushFlags::RASTEROP ) );
- rMtf.AddAction( new MetaRasterOpAction( ROP_INVERT ) );
+ rMtf.AddAction( new MetaRasterOpAction( RasterOp::Invert ) );
rMtf.AddAction( new MetaRectAction( aRect ) );
rMtf.AddAction( new MetaPopAction() );
}
@@ -1110,16 +1110,16 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
switch( nRasterOp )
{
case 1:
- eRasterOp = ROP_INVERT;
+ eRasterOp = RasterOp::Invert;
break;
case 4:
case 5:
- eRasterOp = ROP_XOR;
+ eRasterOp = RasterOp::Xor;
break;
default:
- eRasterOp = ROP_OVERPAINT;
+ eRasterOp = RasterOp::OverPaint;
break;
}
@@ -2117,11 +2117,11 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
const MetaRasterOpAction* pAct = static_cast<const MetaRasterOpAction*>(pAction);
- if( ( pAct->GetRasterOp() != ROP_0 ) && ( pAct->GetRasterOp() != ROP_1 ) )
+ if( ( pAct->GetRasterOp() != RasterOp::N0 ) && ( pAct->GetRasterOp() != RasterOp::N1 ) )
{
sal_Int16 nRasterOp;
- // If ROP_0/1 was set earlier, restore old state
+ // If RasterOp::N0/1 was set earlier, restore old state
// via a Pop first
if( rRop_0_1 )
{
@@ -2133,10 +2133,10 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
switch( pAct->GetRasterOp() )
{
- case ROP_OVERPAINT : nRasterOp = 0; break;
- case ROP_XOR : nRasterOp = 4; break;
- case ROP_INVERT: nRasterOp = 1; break;
- default: nRasterOp = 0; break;
+ case RasterOp::OverPaint : nRasterOp = 0; break;
+ case RasterOp::Xor : nRasterOp = 4; break;
+ case RasterOp::Invert: nRasterOp = 1; break;
+ default: nRasterOp = 0; break;
}
ImplWriteRasterOpAction( rOStm, nRasterOp );
@@ -2147,7 +2147,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
ImplWritePushAction( rOStm );
rSaveVDev.Push();
- if( pAct->GetRasterOp() == ROP_0 )
+ if( pAct->GetRasterOp() == RasterOp::N0 )
{
ImplWriteLineColor( rOStm, COL_BLACK, 1 );
ImplWriteFillColor( rOStm, COL_BLACK, 1 );
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index af95978c0a6a..dfc2f1ef2427 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -77,7 +77,7 @@ bool VirtualDevice::AcquireGraphics() const
if ( mpGraphics )
{
- mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp) );
+ mpGraphics->SetXORMode( (RasterOp::Invert == meRasterOp) || (RasterOp::Xor == meRasterOp) );
mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw));
}
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 31b25a2d199a..387bf0d97f98 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -69,7 +69,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
{
return;
}
- if ( ROP_INVERT == meRasterOp )
+ if ( RasterOp::Invert == meRasterOp )
{
DrawRect( Rectangle( rDestPt, rDestSize ) );
return;
@@ -295,7 +295,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
if ( mnDrawMode & DrawModeFlags::NoBitmap )
return;
- if ( ROP_INVERT == meRasterOp )
+ if ( RasterOp::Invert == meRasterOp )
{
DrawRect( Rectangle( rDestPt, rDestSize ) );
return;
@@ -1216,7 +1216,7 @@ void OutputDevice::DrawTransformedBitmapEx(
// we have rotation,shear or mirror, check if some crazy mode needs the
// created transformed bitmap
- const bool bInvert(ROP_INVERT == meRasterOp);
+ const bool bInvert(RasterOp::Invert == meRasterOp);
const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap | DrawModeFlags::GhostedBitmap));
const bool bMetafile(mpMetaFile);
bool bDone(false);
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index fdf6d33ba53c..696cc6ac90ac 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -160,12 +160,12 @@ void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient &rGradient, cons
EnableOutput( false );
Push( PushFlags::RASTEROP );
- SetRasterOp( ROP_XOR );
+ SetRasterOp( RasterOp::Xor );
DrawGradient( aBoundRect, rGradient );
SetFillColor( COL_BLACK );
- SetRasterOp( ROP_0 );
+ SetRasterOp( RasterOp::N0 );
DrawPolyPolygon( rPolyPoly );
- SetRasterOp( ROP_XOR );
+ SetRasterOp( RasterOp::Xor );
DrawGradient( aBoundRect, rGradient );
Pop();
EnableOutput( bOldOutput );
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index c12e1e6e98f3..990efb555e34 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -116,7 +116,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt )
// #i101598# support AA and snap for lines, too
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw)
&& mpGraphics->supportsOperation(OutDevSupportType::B2DDraw)
- && ROP_OVERPAINT == GetRasterOp()
+ && RasterOp::OverPaint == GetRasterOp()
&& IsLineColor())
{
// at least transform with double precision to device coordinates; this will
@@ -160,7 +160,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
{
const bool bTryAA((mnAntialiasing & AntialiasingFlags::EnableB2dDraw)
&& mpGraphics->supportsOperation(OutDevSupportType::B2DDraw)
- && ROP_OVERPAINT == GetRasterOp()
+ && RasterOp::OverPaint == GetRasterOp()
&& IsLineColor());
basegfx::B2DPolyPolygon aFillPolyPolygon;
const bool bDashUsed(LINE_DASH == rInfo.GetStyle());
diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx
index eaa9ac060fa5..73af2869fff0 100644
--- a/vcl/source/outdev/mask.cxx
+++ b/vcl/source/outdev/mask.cxx
@@ -54,7 +54,7 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
if( ImplIsRecordLayout() )
return;
- if( ROP_INVERT == meRasterOp )
+ if( RasterOp::Invert == meRasterOp )
{
DrawRect( Rectangle( rDestPt, rDestSize ) );
return;
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 2ea9988406c3..8555f5cd12d4 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -94,7 +94,7 @@ OutputDevice::OutputDevice() :
maTextColor = Color( COL_BLACK );
maOverlineColor = Color( COL_TRANSPARENT );
meTextAlign = maFont.GetAlignment();
- meRasterOp = ROP_OVERPAINT;
+ meRasterOp = RasterOp::OverPaint;
mnAntialiasing = AntialiasingFlags::NONE;
meTextLanguage = 0; // TODO: get default from configuration?
mbLineColor = true;
@@ -418,7 +418,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
if( ImplIsRecordLayout() )
return;
- if ( ROP_INVERT == meRasterOp )
+ if ( RasterOp::Invert == meRasterOp )
{
DrawRect( Rectangle( rDestPt, rDestSize ) );
return;
@@ -475,7 +475,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
if ( ImplIsRecordLayout() )
return;
- if ( ROP_INVERT == meRasterOp )
+ if ( RasterOp::Invert == meRasterOp )
{
DrawRect( Rectangle( rDestPt, rDestSize ) );
return;
@@ -547,7 +547,7 @@ void OutputDevice::CopyArea( const Point& rDestPt,
return;
RasterOp eOldRop = GetRasterOp();
- SetRasterOp( ROP_OVERPAINT );
+ SetRasterOp( RasterOp::OverPaint );
if ( !IsDeviceOutputNecessary() )
return;
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 698c3a4c9581..cf2ef0d59159 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -39,7 +39,7 @@ OutDevState::OutDevState()
, mpOverlineColor(nullptr)
, mpRefPoint(nullptr)
, meTextAlign(ALIGN_TOP)
- , meRasterOp(ROP_OVERPAINT)
+ , meRasterOp(RasterOp::OverPaint)
, mnTextLayoutMode(ComplexTextLayoutFlags::Default)
, meTextLanguage(0)
, mnFlags(PushFlags::NONE)
@@ -297,7 +297,7 @@ void OutputDevice::SetRasterOp( RasterOp eRasterOp )
mbInitLineColor = mbInitFillColor = true;
if( mpGraphics || AcquireGraphics() )
- mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp) );
+ mpGraphics->SetXORMode( (RasterOp::Invert == meRasterOp) || (RasterOp::Xor == meRasterOp) );
}
if( mpAlphaVDev )
@@ -576,11 +576,11 @@ void OutputDevice::InitLineColor()
if( mbLineColor )
{
- if( ROP_0 == meRasterOp )
+ if( RasterOp::N0 == meRasterOp )
mpGraphics->SetROPLineColor( SalROPColor::N0 );
- else if( ROP_1 == meRasterOp )
+ else if( RasterOp::N1 == meRasterOp )
mpGraphics->SetROPLineColor( SalROPColor::N1 );
- else if( ROP_INVERT == meRasterOp )
+ else if( RasterOp::Invert == meRasterOp )
mpGraphics->SetROPLineColor( SalROPColor::Invert );
else
mpGraphics->SetLineColor( ImplColorToSal( maLineColor ) );
@@ -598,11 +598,11 @@ void OutputDevice::InitFillColor()
if( mbFillColor )
{
- if( ROP_0 == meRasterOp )
+ if( RasterOp::N0 == meRasterOp )
mpGraphics->SetROPFillColor( SalROPColor::N0 );
- else if( ROP_1 == meRasterOp )
+ else if( RasterOp::N1 == meRasterOp )
mpGraphics->SetROPFillColor( SalROPColor::N1 );
- else if( ROP_INVERT == meRasterOp )
+ else if( RasterOp::Invert == meRasterOp )
mpGraphics->SetROPFillColor( SalROPColor::Invert );
else
mpGraphics->SetFillColor( ImplColorToSal( maFillColor ) );
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index 8c7a58339b60..76d9ec6e6963 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -65,7 +65,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
// use b2dpolygon drawing if possible
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
- ROP_OVERPAINT == GetRasterOp() &&
+ RasterOp::OverPaint == GetRasterOp() &&
(IsLineColor() || IsFillColor()))
{
const basegfx::B2DHomMatrix aTransform = ImplGetDeviceTransformation();
@@ -178,7 +178,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly )
// use b2dpolygon drawing if possible
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
- ROP_OVERPAINT == GetRasterOp() &&
+ RasterOp::OverPaint == GetRasterOp() &&
(IsLineColor() || IsFillColor()))
{
const basegfx::B2DHomMatrix aTransform = ImplGetDeviceTransformation();
@@ -281,7 +281,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
- ROP_OVERPAINT == GetRasterOp() &&
+ RasterOp::OverPaint == GetRasterOp() &&
(IsLineColor() || IsFillColor()))
{
const basegfx::B2DHomMatrix aTransform(ImplGetDeviceTransformation());
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index 77971000dbfc..289d7926acff 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -214,7 +214,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
const bool bTryAA((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
- ROP_OVERPAINT == GetRasterOp() &&
+ RasterOp::OverPaint == GetRasterOp() &&
IsLineColor());
// when AA it is necessary to also paint the filled polygon's outline
@@ -314,7 +314,7 @@ bool OutputDevice::DrawPolyLineDirect( const basegfx::B2DPolygon& rB2DPolygon,
const bool bTryAA( bBypassAACheck ||
((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
- ROP_OVERPAINT == GetRasterOp() &&
+ RasterOp::OverPaint == GetRasterOp() &&
IsLineColor()));
if(bTryAA)
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index c8cfebd522c7..ace38d6f944d 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -234,7 +234,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
- (ROP_OVERPAINT == GetRasterOp()) )
+ (RasterOp::OverPaint == GetRasterOp()) )
{
// b2dpolygon support not implemented yet on non-UNX platforms
const basegfx::B2DHomMatrix aTransform = ImplGetDeviceTransformation();
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 057089bbc20c..e4d89716f28d 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -94,10 +94,10 @@ void OutputDevice::Erase()
if ( mbBackground )
{
RasterOp eRasterOp = GetRasterOp();
- if ( eRasterOp != ROP_OVERPAINT )
- SetRasterOp( ROP_OVERPAINT );
+ if ( eRasterOp != RasterOp::OverPaint )
+ SetRasterOp( RasterOp::OverPaint );
DrawWallpaper( 0, 0, mnOutWidth, mnOutHeight, maBackground );
- if ( eRasterOp != ROP_OVERPAINT )
+ if ( eRasterOp != RasterOp::OverPaint )
SetRasterOp( eRasterOp );
}
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index f85582acd7b2..d441f076172c 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1516,10 +1516,10 @@ void Window::Erase(vcl::RenderContext& rRenderContext)
if (mbBackground && !bNativeOK)
{
RasterOp eRasterOp = GetRasterOp();
- if (eRasterOp != ROP_OVERPAINT)
- SetRasterOp(ROP_OVERPAINT);
+ if (eRasterOp != RasterOp::OverPaint)
+ SetRasterOp(RasterOp::OverPaint);
rRenderContext.DrawWallpaper(0, 0, mnOutWidth, mnOutHeight, maBackground);
- if (eRasterOp != ROP_OVERPAINT)
+ if (eRasterOp != RasterOp::OverPaint)
rRenderContext.SetRasterOp(eRasterOp);
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 1df5038d7406..ac14dd2c4f09 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -835,7 +835,7 @@ bool Window::AcquireGraphics() const
if ( mpGraphics )
{
- mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp) );
+ mpGraphics->SetXORMode( (RasterOp::Invert == meRasterOp) || (RasterOp::Xor == meRasterOp) );
mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw));
}
@@ -3654,7 +3654,7 @@ Selection Window::GetSurroundingTextSelection() const
bool Window::UsePolyPolygonForComplexGradient()
{
- if ( meRasterOp != ROP_OVERPAINT )
+ if ( meRasterOp != RasterOp::OverPaint )
return true;
return false;
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 1b983bcd2f3a..ced001f178a2 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -625,37 +625,37 @@ void outDevGrind(vcl::RenderContext& rTarget)
{
rTarget.SetLineColor( Color(COL_BLACK) );
rTarget.SetFillColor( Color(COL_GREEN) );
- rTarget.SetRasterOp( ROP_OVERPAINT );
+ 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.SetRasterOp( ROP_OVERPAINT );
+ 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.SetRasterOp( ROP_OVERPAINT );
+ 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.SetRasterOp( ROP_XOR );
+ 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.SetRasterOp( ROP_XOR );
+ 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.SetRasterOp( ROP_XOR );
+ 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 81df47ab87f3..c301bd75b71f 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -625,9 +625,9 @@ public:
aTextRect.Left()+1, aTextRect.Top()+1,
aTextRect.Right()-1, aTextRect.Bottom()-1);
rDev.SetLineColor(COL_WHITE);
- rDev.SetRasterOp(ROP_XOR);
+ rDev.SetRasterOp(RasterOp::Xor);
rDev.DrawRect(aInnerRect);
- rDev.SetRasterOp(ROP_OVERPAINT);
+ rDev.SetRasterOp(RasterOp::OverPaint);
}
// DX array rendering
@@ -640,9 +640,9 @@ public:
aTop.Move(pItems[j], 0);
aBottom.Move(pItems[j], aTextRect.GetHeight());
rDev.SetLineColor(COL_RED);
- rDev.SetRasterOp(ROP_XOR);
+ rDev.SetRasterOp(RasterOp::Xor);
rDev.DrawLine(aTop,aBottom);
- rDev.SetRasterOp(ROP_OVERPAINT);
+ rDev.SetRasterOp(RasterOp::OverPaint);
}
delete[] pItems;
@@ -1154,7 +1154,7 @@ public:
AntialiasingFlags nFlags = rDev.GetAntialiasing();
rDev.SetAntialiasing(nFlags & ~AntialiasingFlags::EnableB2dDraw);
- rDev.SetRasterOp( ROP_XOR );
+ rDev.SetRasterOp( RasterOp::Xor );
rCtx.mpDemoRenderer->drawThumbs(rDev, r, true);