summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-06 09:00:50 +0200
committerNoel Grandin <noel@peralex.com>2015-05-06 09:01:31 +0200
commit662fc8eaa94d766104bced33c18b4718722c6692 (patch)
treebdf3c702a3e1991e6e20cfd2d10615bf844930df
parentb13fbd19b7282a1210a2e14bb5ede9ecdf944c1c (diff)
convert BMP_MIRROR constants to scoped enum
and fix bug in svx/source/xoutdev/_xoutbmp.cxx,XOutBitmap::MirrorGraphic where it was not correctly translating between different flags types. Change-Id: I78b4965544da2aa54b67ec18307fa54c8ffc3aee
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx4
-rw-r--r--cui/source/dialogs/colorpicker.cxx2
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitive2d.cxx6
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx8
-rw-r--r--filter/source/msfilter/escherex.cxx4
-rw-r--r--filter/source/msfilter/msdffimp.cxx8
-rw-r--r--include/svtools/grfmgr.hxx8
-rw-r--r--include/svx/xoutbmp.hxx2
-rw-r--r--include/vcl/animate.hxx2
-rw-r--r--include/vcl/bitmap.hxx16
-rw-r--r--include/vcl/bitmapex.hxx2
-rw-r--r--include/vcl/gdimtf.hxx5
-rw-r--r--include/vcl/outdev.hxx2
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx2
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx2
-rw-r--r--svtools/source/graphic/grfattr.cxx11
-rw-r--r--svtools/source/graphic/grfmgr.cxx8
-rw-r--r--svtools/source/graphic/grfmgr2.cxx8
-rw-r--r--svtools/source/toolpanel/paneltabbar.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx2
-rw-r--r--svx/source/svdraw/svdograf.cxx2
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx23
-rw-r--r--sw/source/core/graphic/ndgrf.cxx16
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx6
-rw-r--r--vcl/source/gdi/animate.cxx8
-rw-r--r--vcl/source/gdi/bitmap.cxx8
-rw-r--r--vcl/source/gdi/bitmap3.cxx6
-rw-r--r--vcl/source/gdi/bitmapex.cxx2
-rw-r--r--vcl/source/gdi/gdimtf.cxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx8
-rw-r--r--vcl/source/gdi/print.cxx8
-rw-r--r--vcl/source/outdev/bitmap.cxx8
-rw-r--r--vcl/source/outdev/mask.cxx4
-rw-r--r--vcl/source/outdev/rect.cxx8
-rw-r--r--vcl/source/outdev/transparent.cxx8
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/toolbox2.cxx2
37 files changed, 122 insertions, 109 deletions
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 77b085319efd..cf628c750376 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -852,8 +852,8 @@ namespace vclcanvas
// setup GraphicAttr
aGrfAttr.SetMirrorFlags(
- ( aScale.getX() < 0.0 ? BMP_MIRROR_HORZ : 0 ) |
- ( aScale.getY() < 0.0 ? BMP_MIRROR_VERT : 0 ) );
+ ( aScale.getX() < 0.0 ? BmpMirrorFlags::Horizontal : BmpMirrorFlags::NONE ) |
+ ( aScale.getY() < 0.0 ? BmpMirrorFlags::Vertical : BmpMirrorFlags::NONE ) );
aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround( nRotate*10.0 )) );
pGrfObj.reset( new GraphicObject( aBmpEx ) );
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 5d61f213e8c7..96bfff0c56d5 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1092,7 +1092,7 @@ ColorPickerDialog::ColorPickerDialog( vcl::Window* pParent, sal_Int32 nColor, sa
mpFISliderLeft->Show(true);
BitmapEx aTmpBmp( maSliderImage.GetBitmapEx() );
- aTmpBmp.Mirror( BMP_MIRROR_HORZ );
+ aTmpBmp.Mirror( BmpMirrorFlags::Horizontal );
mpFISliderRight->SetImage( Image( aTmpBmp ) );
Size aSize( maSliderImage.GetSizePixel() );
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index 7374873c06ee..4a0607a0e6e2 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -53,8 +53,8 @@ namespace drawinglayer
if(getGraphicAttr().IsMirrored())
{
// content needs mirroring
- const bool bHMirr(getGraphicAttr().GetMirrorFlags() & BMP_MIRROR_HORZ);
- const bool bVMirr(getGraphicAttr().GetMirrorFlags() & BMP_MIRROR_VERT);
+ const bool bHMirr(getGraphicAttr().GetMirrorFlags() & BmpMirrorFlags::Horizontal);
+ const bool bVMirr(getGraphicAttr().GetMirrorFlags() & BmpMirrorFlags::Vertical);
// mirror by applying negative scale to the unit primitive and
// applying the object transformation on it.
@@ -76,7 +76,7 @@ namespace drawinglayer
aSuppressGraphicAttr.SetCrop(0, 0, 0, 0);
aSuppressGraphicAttr.SetRotation(0);
- aSuppressGraphicAttr.SetMirrorFlags(0);
+ aSuppressGraphicAttr.SetMirrorFlags(BmpMirrorFlags::NONE);
aSuppressGraphicAttr.SetTransparency(0);
const GraphicObject& rGraphicObject = getGraphicObject();
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index 7d1dd7c0705b..1e73c13c5538 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -562,12 +562,12 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc )
double fdx = pBmpDesc->mndx;
double fdy = pBmpDesc->mndy;
- sal_uInt32 nMirr = BMP_MIRROR_NONE;
+ BmpMirrorFlags nMirr = BmpMirrorFlags::NONE;
if ( pBmpDesc->mbVMirror )
- nMirr |= BMP_MIRROR_VERT;
+ nMirr |= BmpMirrorFlags::Vertical;
if ( pBmpDesc->mbHMirror )
- nMirr |= BMP_MIRROR_HORZ;
- if ( nMirr != BMP_MIRROR_NONE )
+ nMirr |= BmpMirrorFlags::Horizontal;
+ if ( nMirr != BmpMirrorFlags::NONE )
pBmpDesc->mpBitmap->Mirror( nMirr );
mpCGM->ImplMapPoint( aOrigin );
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 9366ec20cfd4..6cf97f933d1a 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1640,7 +1640,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
if(bMirrored)
{
- pGraphicAttr->SetMirrorFlags(BMP_MIRROR_HORZ);
+ pGraphicAttr->SetMirrorFlags(BmpMirrorFlags::Horizontal);
}
// #121074#
@@ -4122,7 +4122,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject
{
SvMemoryStream aSt( sizeof( GraphicAttr ) );
aSt.WriteUInt16( pGraphicAttr->GetDrawMode() )
- .WriteUInt32( pGraphicAttr->GetMirrorFlags() )
+ .WriteUInt32( static_cast<sal_uInt32>(pGraphicAttr->GetMirrorFlags()) )
.WriteInt32( pGraphicAttr->GetLeftCrop() )
.WriteInt32( pGraphicAttr->GetTopCrop() )
.WriteInt32( pGraphicAttr->GetRightCrop() )
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 8935ae4257f2..8e757f7b5916 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1224,12 +1224,12 @@ void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream
{
aBitmap.Rotate( nFix16Angle / 10, rShadeColors[ 0 ].aColor );
- sal_uLong nMirrorFlags = BMP_MIRROR_NONE;
+ BmpMirrorFlags nMirrorFlags = BmpMirrorFlags::NONE;
if ( rObjData.nSpFlags & SP_FFLIPV )
- nMirrorFlags |= BMP_MIRROR_VERT;
+ nMirrorFlags |= BmpMirrorFlags::Vertical;
if ( rObjData.nSpFlags & SP_FFLIPH )
- nMirrorFlags |= BMP_MIRROR_HORZ;
- if ( nMirrorFlags != BMP_MIRROR_NONE )
+ nMirrorFlags |= BmpMirrorFlags::Horizontal;
+ if ( nMirrorFlags != BmpMirrorFlags::NONE )
aBitmap.Mirror( nMirrorFlags );
}
}
diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx
index 35d63bc34776..089b69d08ba9 100644
--- a/include/svtools/grfmgr.hxx
+++ b/include/svtools/grfmgr.hxx
@@ -82,7 +82,7 @@ class SVT_DLLPUBLIC GraphicAttr
private:
double mfGamma;
- sal_uInt32 mnMirrFlags;
+ BmpMirrorFlags mnMirrFlags;
long mnLeftCrop;
long mnTopCrop;
long mnRightCrop;
@@ -108,8 +108,8 @@ public:
void SetDrawMode( GraphicDrawMode eDrawMode ) { meDrawMode = eDrawMode; }
GraphicDrawMode GetDrawMode() const { return meDrawMode; }
- void SetMirrorFlags( sal_uLong nMirrFlags ) { mnMirrFlags = nMirrFlags; }
- sal_uLong GetMirrorFlags() const { return mnMirrFlags; }
+ void SetMirrorFlags( BmpMirrorFlags nMirrFlags ) { mnMirrFlags = nMirrFlags; }
+ BmpMirrorFlags GetMirrorFlags() const { return mnMirrFlags; }
void SetCrop( long nLeft_100TH_MM, long nTop_100TH_MM, long nRight_100TH_MM, long nBottom_100TH_MM )
{
@@ -149,7 +149,7 @@ public:
sal_uInt8 GetTransparency() const { return mcTransparency; }
bool IsSpecialDrawMode() const { return( meDrawMode != GRAPHICDRAWMODE_STANDARD ); }
- bool IsMirrored() const { return( mnMirrFlags != 0UL ); }
+ bool IsMirrored() const { return mnMirrFlags != BmpMirrorFlags::NONE; }
bool IsCropped() const
{
return( mnLeftCrop != 0 || mnTopCrop != 0 ||
diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx
index 0f802210ace2..25ba5e48c90d 100644
--- a/include/svx/xoutbmp.hxx
+++ b/include/svx/xoutbmp.hxx
@@ -49,7 +49,7 @@ public:
static GraphicFilter* pGrfFilter;
- static Graphic MirrorGraphic( const Graphic& rGraphic, const sal_uIntPtr nMirrorFlags );
+ static Graphic MirrorGraphic( const Graphic& rGraphic, const BmpMirrorFlags nMirrorFlags );
static Animation MirrorAnimation( const Animation& rAnimation, bool bHMirr, bool bVMirr );
static sal_uInt16 WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
const OUString& rFilterName, const sal_uIntPtr nFlags = 0L,
diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx
index 74a527fc5c84..1f2a6b8b3920 100644
--- a/include/vcl/animate.hxx
+++ b/include/vcl/animate.hxx
@@ -183,7 +183,7 @@ public:
BmpReduce eReduce = BMP_REDUCE_SIMPLE );
bool Invert();
- bool Mirror( sal_uLong nMirrorFlags );
+ bool Mirror( BmpMirrorFlags nMirrorFlags );
bool Adjust(
short nLuminancePercent = 0,
short nContrastPercent = 0,
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index be7d4eb293d7..5e75b69626d9 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -28,10 +28,18 @@
#include <vcl/mapmod.hxx>
#include <vcl/region.hxx>
#include <vcl/scopedbitmapaccess.hxx>
+#include <o3tl/typed_flags_set.hxx>
-#define BMP_MIRROR_NONE 0x00000000UL
-#define BMP_MIRROR_HORZ 0x00000001UL
-#define BMP_MIRROR_VERT 0x00000002UL
+enum class BmpMirrorFlags
+{
+ NONE = 0x00,
+ Horizontal = 0x01,
+ Vertical = 0x02,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<BmpMirrorFlags> : is_typed_flags<BmpMirrorFlags, 0x03> {};
+}
enum class BmpScaleFlag
@@ -534,7 +542,7 @@ public:
@return true, if the operation was completed successfully.
*/
- bool Mirror( sal_uLong nMirrorFlags );
+ bool Mirror( BmpMirrorFlags nMirrorFlags );
/** Scale the bitmap
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index d7b08e087779..13afdcd46153 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -223,7 +223,7 @@ public:
@return true, if the operation was completed successfully.
*/
- bool Mirror( sal_uLong nMirrorFlags );
+ bool Mirror( BmpMirrorFlags nMirrorFlags );
/** Scale the bitmap
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index bc8da88cdd9e..8baa116eea95 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -53,9 +53,6 @@ class Gradient;
#define METAFILE_LABEL_NOTFOUND GDI_METAFILE_LABEL_NOTFOUND
#endif
-#define MTF_MIRROR_HORZ 0x00000001UL
-#define MTF_MIRROR_VERT 0x00000002UL
-
enum MtfConversion
{
MTF_CONVERSION_NONE = 0,
@@ -132,7 +129,7 @@ public:
bool operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); }
void Clear();
- bool Mirror( sal_uLong nMirrorFlags );
+ bool Mirror( BmpMirrorFlags nMirrorFlags );
void Move( long nX, long nY );
// additional Move method getting specifics how to handle MapMode( MAP_PIXEL )
void Move( long nX, long nY, long nDPIX, long nDPIY );
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index ea284f2764cf..66bcccb8febc 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -245,7 +245,7 @@ namespace vcl {
class FontInfo;
}
-sal_uLong AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
+BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
void AdjustTwoRect( SalTwoRect& rTwoRect, const Rectangle& rValidSrcRect );
extern const sal_uLong nVCLRLut[ 6 ];
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index f5aa025c7d73..3acd0bfc5318 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -554,7 +554,7 @@ void LayoutMenu::Fill()
aBmp.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BmpScaleFlag::Fast);
if (bRightToLeft && (WritingMode_TB_RL != pInfo->meWritingMode))
- aBmp.Mirror (BMP_MIRROR_HORZ);
+ aBmp.Mirror (BmpMirrorFlags::Horizontal);
InsertItem(i, Image(aBmp), SdResId (pInfo->mnStrResId));
SetItemData (i, new AutoLayout(pInfo->maAutoLayout));
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index d206ca7dfbed..f250efebfde9 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -333,7 +333,7 @@ namespace svt
if ( bNeedMirror )
{
BitmapEx aBitmap( aImage.GetBitmapEx() );
- aBitmap.Mirror( BMP_MIRROR_HORZ );
+ aBitmap.Mirror( BmpMirrorFlags::Horizontal );
aImage = Image( aBitmap );
}
return aImage;
diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx
index 29e5e50b0bdd..26001ee13da0 100644
--- a/svtools/source/graphic/grfattr.cxx
+++ b/svtools/source/graphic/grfattr.cxx
@@ -27,7 +27,7 @@
GraphicAttr::GraphicAttr() :
mfGamma ( 1.0 ),
- mnMirrFlags ( 0 ),
+ mnMirrFlags ( BmpMirrorFlags::NONE ),
mnLeftCrop ( 0 ),
mnTopCrop ( 0 ),
mnRightCrop ( 0 ),
@@ -76,10 +76,11 @@ bool GraphicAttr::operator==( const GraphicAttr& rAttr ) const
SvStream& ReadGraphicAttr( SvStream& rIStm, GraphicAttr& rAttr )
{
VersionCompat aCompat( rIStm, StreamMode::READ );
- sal_uInt32 nTmp32;
- sal_uInt16 nTmp16;
+ sal_uInt32 nTmp32, nTmpMirrFlags;
+ sal_uInt16 nTmp16;
- rIStm.ReadUInt32( nTmp32 ).ReadUInt32( nTmp32 ).ReadDouble( rAttr.mfGamma ).ReadUInt32( rAttr.mnMirrFlags ).ReadUInt16( rAttr.mnRotate10 );
+ rIStm.ReadUInt32( nTmp32 ).ReadUInt32( nTmp32 ).ReadDouble( rAttr.mfGamma ).ReadUInt32( nTmpMirrFlags ).ReadUInt16( rAttr.mnRotate10 );
+ rAttr.mnMirrFlags = static_cast<BmpMirrorFlags>(nTmpMirrFlags);
rIStm.ReadInt16( rAttr.mnContPercent ).ReadInt16( rAttr.mnLumPercent ).ReadInt16( rAttr.mnRPercent ).ReadInt16( rAttr.mnGPercent ).ReadInt16( rAttr.mnBPercent );
rIStm.ReadCharAsBool( rAttr.mbInvert ).ReadUChar( rAttr.mcTransparency ).ReadUInt16( nTmp16 );
rAttr.meDrawMode = (GraphicDrawMode) nTmp16;
@@ -106,7 +107,7 @@ SvStream& WriteGraphicAttr( SvStream& rOStm, const GraphicAttr& rAttr )
rOStm.WriteUInt32( nTmp32 ).WriteUInt32( nTmp32 );
rOStm.WriteDouble( rAttr.mfGamma );
- rOStm.WriteUInt32( rAttr.mnMirrFlags ).WriteUInt16( rAttr.mnRotate10 );
+ rOStm.WriteUInt32( static_cast<sal_uInt32>(rAttr.mnMirrFlags) ).WriteUInt16( rAttr.mnRotate10 );
rOStm.WriteInt16( rAttr.mnContPercent ).WriteInt16( rAttr.mnLumPercent ).WriteInt16( rAttr.mnRPercent ).WriteInt16( rAttr.mnGPercent ).WriteInt16( rAttr.mnBPercent );
rOStm.WriteBool( rAttr.mbInvert ).WriteUChar( rAttr.mcTransparency ).WriteUInt16( rAttr.meDrawMode );
rOStm.WriteInt32( rAttr.mnLeftCrop )
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 4d60d73ddcaf..f6eae59e5281 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -303,7 +303,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz
if( aSize100.Width() > 0 && aSize100.Height() > 0 && nTotalWidth > 0 && nTotalHeight > 0 )
{
double fScale = (double) aSize100.Width() / nTotalWidth;
- const long nNewLeft = -FRound( ( ( pAttr->GetMirrorFlags() & BMP_MIRROR_HORZ ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale );
+ const long nNewLeft = -FRound( ( ( pAttr->GetMirrorFlags() & BmpMirrorFlags::Horizontal ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale );
const long nNewRight = nNewLeft + FRound( aSize100.Width() * fScale ) - 1;
fScale = (double) rSz.Width() / aSize100.Width();
@@ -311,7 +311,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz
rSz.Width() = FRound( ( nNewRight - nNewLeft + 1 ) * fScale );
fScale = (double) aSize100.Height() / nTotalHeight;
- const long nNewTop = -FRound( ( ( pAttr->GetMirrorFlags() & BMP_MIRROR_VERT ) ? pAttr->GetBottomCrop() : pAttr->GetTopCrop() ) * fScale );
+ const long nNewTop = -FRound( ( ( pAttr->GetMirrorFlags() & BmpMirrorFlags::Vertical ) ? pAttr->GetBottomCrop() : pAttr->GetTopCrop() ) * fScale );
const long nNewBottom = nNewTop + FRound( aSize100.Height() * fScale ) - 1;
fScale = (double) rSz.Height() / aSize100.Height();
@@ -531,7 +531,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
{
aPt.X() += aSz.Width() + 1;
aSz.Width() = -aSz.Width();
- aAttr.SetMirrorFlags( aAttr.GetMirrorFlags() ^ BMP_MIRROR_HORZ );
+ aAttr.SetMirrorFlags( aAttr.GetMirrorFlags() ^ BmpMirrorFlags::Horizontal );
}
// mirrored vertically
@@ -539,7 +539,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
{
aPt.Y() += aSz.Height() + 1;
aSz.Height() = -aSz.Height();
- aAttr.SetMirrorFlags( aAttr.GetMirrorFlags() ^ BMP_MIRROR_VERT );
+ aAttr.SetMirrorFlags( aAttr.GetMirrorFlags() ^ BmpMirrorFlags::Vertical );
}
if( bCropped )
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 46b48091fb9f..202528d2e42e 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -331,8 +331,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
long nX, nY, nTmpX, nTmpY, nTmpFX, nTmpFY, nTmp;
double fTmp;
- bool bHMirr = ( rAttributes.GetMirrorFlags() & BMP_MIRROR_HORZ ) != 0;
- bool bVMirr = ( rAttributes.GetMirrorFlags() & BMP_MIRROR_VERT ) != 0;
+ bool bHMirr( rAttributes.GetMirrorFlags() & BmpMirrorFlags::Horizontal );
+ bool bVMirr( rAttributes.GetMirrorFlags() & BmpMirrorFlags::Vertical );
boost::scoped_array<long> pMapIX(new long[ aUnrotatedWidth ]);
boost::scoped_array<long> pMapFX(new long[ aUnrotatedWidth ]);
@@ -905,8 +905,8 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice,
const long nW = rBmpSzPix.Width();
const long nH = rBmpSzPix.Height();
long nStartX = -1, nStartY = -1, nEndX = -1, nEndY = -1;
- bool bHMirr = ( rAttributes.GetMirrorFlags() & BMP_MIRROR_HORZ ) != 0;
- bool bVMirr = ( rAttributes.GetMirrorFlags() & BMP_MIRROR_VERT ) != 0;
+ bool bHMirr( rAttributes.GetMirrorFlags() & BmpMirrorFlags::Horizontal );
+ bool bVMirr( rAttributes.GetMirrorFlags() & BmpMirrorFlags::Vertical );
// calculate output sizes
if( !pBmpEx )
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index 069211cf3143..62dccf961263 100644
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -721,11 +721,11 @@ namespace svt
{
aBitmap.Rotate( 2700, COL_BLACK );
if ( m_eTabAlignment == TABS_LEFT )
- aBitmap.Mirror( BMP_MIRROR_HORZ );
+ aBitmap.Mirror( BmpMirrorFlags::Horizontal );
}
else if ( m_eTabAlignment == TABS_BOTTOM )
{
- aBitmap.Mirror( BMP_MIRROR_VERT );
+ aBitmap.Mirror( BmpMirrorFlags::Vertical );
}
const Rectangle aActualRect( m_aNormalizer.getTransformed( i_rLogicalRect, m_eTabAlignment ) );
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 2a72cdeb03be..10bd3e0122d9 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -355,7 +355,7 @@ namespace sdr
if(bHMirr || bVMirr)
{
- aLocalGrafInfo.SetMirrorFlags((bHMirr ? BMP_MIRROR_HORZ : 0)|(bVMirr ? BMP_MIRROR_VERT : 0));
+ aLocalGrafInfo.SetMirrorFlags((bHMirr ? BmpMirrorFlags::Horizontal : BmpMirrorFlags::NONE)|(bVMirr ? BmpMirrorFlags::Vertical : BmpMirrorFlags::NONE));
}
// fill object matrix
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 15df383d7e29..170a4029dcc2 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -501,7 +501,7 @@ Graphic SdrGrafObj::GetTransformedGraphic( SdrGrafObjTransformsAttrs nTransformF
bool bHMirr = nMirrorCase == 2 || nMirrorCase == 4;
bool bVMirr = nMirrorCase == 3 || nMirrorCase == 4;
- aActAttr.SetMirrorFlags( ( bHMirr ? BMP_MIRROR_HORZ : 0 ) | ( bVMirr ? BMP_MIRROR_VERT : 0 ) );
+ aActAttr.SetMirrorFlags( ( bHMirr ? BmpMirrorFlags::Horizontal : BmpMirrorFlags::NONE ) | ( bVMirr ? BmpMirrorFlags::Vertical : BmpMirrorFlags::NONE ) );
}
if( bRotate )
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index d03b43b19af3..6a477489a776 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -47,13 +47,13 @@ Animation XOutBitmap::MirrorAnimation( const Animation& rAnimation, bool bHMirr,
if( bHMirr || bVMirr )
{
const Size& rGlobalSize = aNewAnim.GetDisplaySizePixel();
- sal_uIntPtr nMirrorFlags = 0L;
+ BmpMirrorFlags nMirrorFlags = BmpMirrorFlags::NONE;
if( bHMirr )
- nMirrorFlags |= BMP_MIRROR_HORZ;
+ nMirrorFlags |= BmpMirrorFlags::Horizontal;
if( bVMirr )
- nMirrorFlags |= BMP_MIRROR_VERT;
+ nMirrorFlags |= BmpMirrorFlags::Vertical;
for( sal_uInt16 i = 0, nCount = aNewAnim.Count(); i < nCount; i++ )
{
@@ -78,17 +78,17 @@ Animation XOutBitmap::MirrorAnimation( const Animation& rAnimation, bool bHMirr,
return aNewAnim;
}
-Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const sal_uIntPtr nMirrorFlags )
+Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const BmpMirrorFlags nMirrorFlags )
{
Graphic aRetGraphic;
- if( nMirrorFlags )
+ if( nMirrorFlags != BmpMirrorFlags::NONE )
{
if( rGraphic.IsAnimated() )
{
aRetGraphic = MirrorAnimation( rGraphic.GetAnimation(),
- ( nMirrorFlags & BMP_MIRROR_HORZ ) == BMP_MIRROR_HORZ,
- ( nMirrorFlags & BMP_MIRROR_VERT ) == BMP_MIRROR_VERT );
+ bool( nMirrorFlags & BmpMirrorFlags::Horizontal ),
+ bool( nMirrorFlags & BmpMirrorFlags::Vertical ) );
}
else
{
@@ -300,7 +300,14 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
// mirror?
if( ( nFlags & XOUTBMP_MIRROR_HORZ ) || ( nFlags & XOUTBMP_MIRROR_VERT ) )
- aGraphic = MirrorGraphic( aGraphic, nFlags );
+ {
+ BmpMirrorFlags nBmpMirrorFlags = BmpMirrorFlags::NONE;
+ if( nFlags & XOUTBMP_MIRROR_HORZ )
+ nBmpMirrorFlags |= BmpMirrorFlags::Horizontal;
+ if( nFlags & XOUTBMP_MIRROR_VERT )
+ nBmpMirrorFlags |= BmpMirrorFlags::Vertical;
+ aGraphic = MirrorGraphic( aGraphic, nBmpMirrorFlags );
+ }
if( ( GRFILTER_FORMAT_NOTFOUND != nFilter ) && ( aGraphic.GetType() != GRAPHIC_NONE ) )
{
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 8a5833c7e058..b3b3d13f731e 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -997,22 +997,22 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA,
rGA.SetDrawMode( (GraphicDrawMode)rSet.GetDrawModeGrf().GetValue() );
const SwMirrorGrf & rMirror = rSet.GetMirrorGrf();
- sal_uLong nMirror = BMP_MIRROR_NONE;
+ BmpMirrorFlags nMirror = BmpMirrorFlags::NONE;
if( rMirror.IsGrfToggle() && pFrm && !pFrm->FindPageFrm()->OnRightPage() )
{
switch( rMirror.GetValue() )
{
case RES_MIRROR_GRAPH_DONT:
- nMirror = BMP_MIRROR_HORZ;
+ nMirror = BmpMirrorFlags::Horizontal;
break;
case RES_MIRROR_GRAPH_VERT:
- nMirror = BMP_MIRROR_NONE;
+ nMirror = BmpMirrorFlags::NONE;
break;
case RES_MIRROR_GRAPH_HOR:
- nMirror = BMP_MIRROR_HORZ|BMP_MIRROR_VERT;
+ nMirror = BmpMirrorFlags::Horizontal|BmpMirrorFlags::Vertical;
break;
default:
- nMirror = BMP_MIRROR_VERT;
+ nMirror = BmpMirrorFlags::Vertical;
break;
}
}
@@ -1020,13 +1020,13 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA,
switch( rMirror.GetValue() )
{
case RES_MIRROR_GRAPH_BOTH:
- nMirror = BMP_MIRROR_HORZ|BMP_MIRROR_VERT;
+ nMirror = BmpMirrorFlags::Horizontal|BmpMirrorFlags::Vertical;
break;
case RES_MIRROR_GRAPH_VERT:
- nMirror = BMP_MIRROR_HORZ;
+ nMirror = BmpMirrorFlags::Horizontal;
break;
case RES_MIRROR_GRAPH_HOR:
- nMirror = BMP_MIRROR_VERT;
+ nMirror = BmpMirrorFlags::Vertical;
break;
}
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index f8a8a500a8d0..7da73f230dd8 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2702,11 +2702,11 @@ void BmpWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle&
if (bHorz || bVert)
{
BitmapEx aTmpBmp(bGraphic ? aGraphic.GetBitmapEx() : aBmp);
- sal_uLong nMirrorFlags(BMP_MIRROR_NONE);
+ BmpMirrorFlags nMirrorFlags(BmpMirrorFlags::NONE);
if (bHorz)
- nMirrorFlags |= BMP_MIRROR_VERT;
+ nMirrorFlags |= BmpMirrorFlags::Vertical;
if (bVert)
- nMirrorFlags |= BMP_MIRROR_HORZ;
+ nMirrorFlags |= BmpMirrorFlags::Horizontal;
aTmpBmp.Mirror(nMirrorFlags);
DrawBitmapEx( aPntPos, aPntSz, aTmpBmp );
}
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 6371d660ce08..4dd37f8381e2 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -600,7 +600,7 @@ bool Animation::Invert()
return bRet;
}
-bool Animation::Mirror( sal_uLong nMirrorFlags )
+bool Animation::Mirror( BmpMirrorFlags nMirrorFlags )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
@@ -610,17 +610,17 @@ bool Animation::Mirror( sal_uLong nMirrorFlags )
{
bRet = true;
- if( nMirrorFlags )
+ if( nMirrorFlags != BmpMirrorFlags::NONE )
{
for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i )
{
AnimationBitmap* pStepBmp = maList[ i ];
if( ( bRet = pStepBmp->aBmpEx.Mirror( nMirrorFlags ) ) )
{
- if( nMirrorFlags & BMP_MIRROR_HORZ )
+ if( nMirrorFlags & BmpMirrorFlags::Horizontal )
pStepBmp->aPosPix.X() = maGlobalSize.Width() - pStepBmp->aPosPix.X() - pStepBmp->aSizePix.Width();
- if( nMirrorFlags & BMP_MIRROR_VERT )
+ if( nMirrorFlags & BmpMirrorFlags::Vertical )
pStepBmp->aPosPix.Y() = maGlobalSize.Height() - pStepBmp->aPosPix.Y() - pStepBmp->aSizePix.Height();
}
}
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index b5209f84fad3..51e5db80924f 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -556,10 +556,10 @@ bool Bitmap::Invert()
return bRet;
}
-bool Bitmap::Mirror( sal_uLong nMirrorFlags )
+bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags )
{
- bool bHorz = ( ( nMirrorFlags & BMP_MIRROR_HORZ ) == BMP_MIRROR_HORZ );
- bool bVert = ( ( nMirrorFlags & BMP_MIRROR_VERT ) == BMP_MIRROR_VERT );
+ bool bHorz( nMirrorFlags & BmpMirrorFlags::Horizontal );
+ bool bVert( nMirrorFlags & BmpMirrorFlags::Vertical );
bool bRet = false;
if( bHorz && !bVert )
@@ -664,7 +664,7 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
if( !nAngle10 )
bRet = true;
else if( 1800L == nAngle10 )
- bRet = Mirror( BMP_MIRROR_HORZ | BMP_MIRROR_VERT );
+ bRet = Mirror( BmpMirrorFlags::Horizontal | BmpMirrorFlags::Vertical );
else
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index f3dc33e89565..3ad2c18fd01c 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -1582,19 +1582,19 @@ bool Bitmap::ImplScaleConvolution(
}
bool bResult(true);
- sal_uInt32 nMirrorFlags(BMP_MIRROR_NONE);
+ BmpMirrorFlags nMirrorFlags(BmpMirrorFlags::NONE);
bool bMirrorAfter(false);
if(bMirror)
{
if(bMirrorHor)
{
- nMirrorFlags |= BMP_MIRROR_HORZ;
+ nMirrorFlags |= BmpMirrorFlags::Horizontal;
}
if(bMirrorVer)
{
- nMirrorFlags |= BMP_MIRROR_VERT;
+ nMirrorFlags |= BmpMirrorFlags::Vertical;
}
const sal_uInt32 nStartSize(nWidth * nHeight);
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 38a770d47138..537c7dc8feff 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -359,7 +359,7 @@ bool BitmapEx::Invert()
return bRet;
}
-bool BitmapEx::Mirror( sal_uLong nMirrorFlags )
+bool BitmapEx::Mirror( BmpMirrorFlags nMirrorFlags )
{
bool bRet = false;
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index f3a44928be90..2701046a37eb 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -689,19 +689,19 @@ void GDIMetaFile::RemoveAction( size_t nPos )
pPrev->RemoveAction( nPos );
}
-bool GDIMetaFile::Mirror( sal_uLong nMirrorFlags )
+bool GDIMetaFile::Mirror( BmpMirrorFlags nMirrorFlags )
{
const Size aOldPrefSize( GetPrefSize() );
long nMoveX, nMoveY;
double fScaleX, fScaleY;
bool bRet;
- if( nMirrorFlags & MTF_MIRROR_HORZ )
+ if( nMirrorFlags & BmpMirrorFlags::Horizontal )
nMoveX = SAL_ABS( aOldPrefSize.Width() ) - 1, fScaleX = -1.0;
else
nMoveX = 0, fScaleX = 1.0;
- if( nMirrorFlags & MTF_MIRROR_VERT )
+ if( nMirrorFlags & BmpMirrorFlags::Vertical )
nMoveY = SAL_ABS( aOldPrefSize.Height() ) - 1, fScaleY = -1.0;
else
nMoveY = 0, fScaleY = 1.0;
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 837d69f9aa19..05d4e25083af 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -76,21 +76,21 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
// #i19065# Negative sizes have mirror semantics on
// OutputDevice. BitmapEx and co. have no idea about that, so
// perform that _before_ doing anything with aBitmapEx.
- sal_uLong nMirrorFlags(BMP_MIRROR_NONE);
+ BmpMirrorFlags nMirrorFlags(BmpMirrorFlags::NONE);
if( aSize.Width() < 0 )
{
aSize.Width() *= -1;
aPoint.X() -= aSize.Width();
- nMirrorFlags |= BMP_MIRROR_HORZ;
+ nMirrorFlags |= BmpMirrorFlags::Horizontal;
}
if( aSize.Height() < 0 )
{
aSize.Height() *= -1;
aPoint.Y() -= aSize.Height();
- nMirrorFlags |= BMP_MIRROR_VERT;
+ nMirrorFlags |= BmpMirrorFlags::Vertical;
}
- if( nMirrorFlags != BMP_MIRROR_NONE )
+ if( nMirrorFlags != BmpMirrorFlags::NONE )
{
aBitmapEx.Mirror( nMirrorFlags );
}
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 10d27223d22e..590d6968c17b 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -815,7 +815,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
if( !rMask.IsEmpty() && aSrcRect.GetWidth() && aSrcRect.GetHeight() && aDestSz.Width() && aDestSz.Height() )
{
Bitmap aMask( rMask );
- sal_uLong nMirrFlags = 0UL;
+ BmpMirrorFlags nMirrFlags = BmpMirrorFlags::NONE;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -825,7 +825,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
{
aDestSz.Width() = -aDestSz.Width();
aDestPt.X() -= ( aDestSz.Width() - 1L );
- nMirrFlags |= BMP_MIRROR_HORZ;
+ nMirrFlags |= BmpMirrorFlags::Horizontal;
}
// mirrored vertically
@@ -833,7 +833,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
{
aDestSz.Height() = -aDestSz.Height();
aDestPt.Y() -= ( aDestSz.Height() - 1L );
- nMirrFlags |= BMP_MIRROR_VERT;
+ nMirrFlags |= BmpMirrorFlags::Vertical;
}
// source cropped?
@@ -841,7 +841,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
aMask.Crop( aSrcRect );
// destination mirrored
- if( nMirrFlags )
+ if( nMirrFlags != BmpMirrorFlags::NONE)
aMask.Mirror( nMirrFlags );
// do painting
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 03938508643f..01c279fb181f 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -135,9 +135,9 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
{
- const sal_uLong nMirrFlags = AdjustTwoRect( aPosAry, aBmp.GetSizePixel() );
+ const BmpMirrorFlags nMirrFlags = AdjustTwoRect( aPosAry, aBmp.GetSizePixel() );
- if ( nMirrFlags )
+ if ( nMirrFlags != BmpMirrorFlags::NONE )
aBmp.Mirror( nMirrFlags );
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
@@ -487,12 +487,12 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize
ImplLogicWidthToDevicePixel(rDestSize.Width()),
ImplLogicHeightToDevicePixel(rDestSize.Height()));
- const sal_uLong nMirrFlags = AdjustTwoRect(aPosAry, rBitmapEx.GetSizePixel());
+ const BmpMirrorFlags nMirrFlags = AdjustTwoRect(aPosAry, rBitmapEx.GetSizePixel());
if (aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight)
{
- if (nMirrFlags)
+ if (nMirrFlags != BmpMirrorFlags::NONE)
rBitmapEx.Mirror(nMirrFlags);
const SalBitmap* pSalSrcBmp = rBitmapEx.ImplGetBitmapImpBitmap()->ImplGetSalBitmap();
diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx
index f8ef47457b2f..9f6b55f9d14b 100644
--- a/vcl/source/outdev/mask.cxx
+++ b/vcl/source/outdev/mask.cxx
@@ -108,13 +108,13 @@ void OutputDevice::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
ImplLogicHeightToDevicePixel(rDestSize.Height()));
// we don't want to mirror via cooridates
- const sal_uLong nMirrFlags = AdjustTwoRect( aPosAry, pImpBmp->ImplGetSize() );
+ const BmpMirrorFlags nMirrFlags = AdjustTwoRect( aPosAry, pImpBmp->ImplGetSize() );
// check if output is necessary
if( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
{
- if( nMirrFlags )
+ if( nMirrFlags != BmpMirrorFlags::NONE )
{
Bitmap aTmp( rMask );
aTmp.Mirror( nMirrFlags );
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 4606e7be28f6..463152be1753 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -244,16 +244,16 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLon
mpAlphaVDev->DrawGrid( rRect, rDist, nFlags );
}
-sal_uLong AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix )
+BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix )
{
- sal_uLong nMirrFlags = 0;
+ BmpMirrorFlags nMirrFlags = BmpMirrorFlags::NONE;
if ( rTwoRect.mnDestWidth < 0 )
{
rTwoRect.mnSrcX = rSizePix.Width() - rTwoRect.mnSrcX - rTwoRect.mnSrcWidth;
rTwoRect.mnDestWidth = -rTwoRect.mnDestWidth;
rTwoRect.mnDestX -= rTwoRect.mnDestWidth-1;
- nMirrFlags |= BMP_MIRROR_HORZ;
+ nMirrFlags |= BmpMirrorFlags::Horizontal;
}
if ( rTwoRect.mnDestHeight < 0 )
@@ -261,7 +261,7 @@ sal_uLong AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix )
rTwoRect.mnSrcY = rSizePix.Height() - rTwoRect.mnSrcY - rTwoRect.mnSrcHeight;
rTwoRect.mnDestHeight = -rTwoRect.mnDestHeight;
rTwoRect.mnDestY -= rTwoRect.mnDestHeight-1;
- nMirrFlags |= BMP_MIRROR_VERT;
+ nMirrFlags |= BmpMirrorFlags::Vertical;
}
if( ( rTwoRect.mnSrcX < 0 ) || ( rTwoRect.mnSrcX >= rSizePix.Width() ) ||
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 425a56ab7514..69236f8146e9 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -133,7 +133,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
if( !rBmp.IsEmpty() && aSrcRect.GetWidth() && aSrcRect.GetHeight() && aDestSz.Width() && aDestSz.Height() )
{
Bitmap aPaint( rBmp ), aMask( rMask );
- sal_uLong nMirrFlags = 0UL;
+ BmpMirrorFlags nMirrFlags = BmpMirrorFlags::NONE;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -143,7 +143,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
{
aDestSz.Width() = -aDestSz.Width();
aDestPt.X() -= ( aDestSz.Width() - 1L );
- nMirrFlags |= BMP_MIRROR_HORZ;
+ nMirrFlags |= BmpMirrorFlags::Horizontal;
}
// mirrored vertically
@@ -151,7 +151,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
{
aDestSz.Height() = -aDestSz.Height();
aDestPt.Y() -= ( aDestSz.Height() - 1L );
- nMirrFlags |= BMP_MIRROR_VERT;
+ nMirrFlags |= BmpMirrorFlags::Vertical;
}
// source cropped?
@@ -162,7 +162,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
}
// destination mirrored
- if( nMirrFlags )
+ if( nMirrFlags != BmpMirrorFlags::NONE )
{
aPaint.Mirror( nMirrFlags );
aMask.Mirror( nMirrFlags );
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 5571d03ad70f..3560c6c48dd6 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1099,7 +1099,7 @@ static inline Image ImplMirrorImage( const Image& rImage )
Image aRet;
BitmapEx aBmpEx( rImage.GetBitmapEx() );
- aBmpEx.Mirror( BMP_MIRROR_HORZ );
+ aBmpEx.Mirror( BmpMirrorFlags::Horizontal );
return Image( aBmpEx );
}
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index cedf3bd1b184..e209fd22a0c7 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1202,7 +1202,7 @@ static Image ImplMirrorImage( const Image& rImage )
Image aRet;
BitmapEx aMirrBitmapEx( rImage.GetBitmapEx() );
- aMirrBitmapEx.Mirror( BMP_MIRROR_HORZ );
+ aMirrBitmapEx.Mirror( BmpMirrorFlags::Horizontal );
return Image( aMirrBitmapEx );
}