diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-15 10:03:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-15 10:05:03 +0200 |
commit | ad0c5e6c663642c1e4b212e4e6a38ebfe8c3e0a7 (patch) | |
tree | 6176009e3c65a6a1ce392ca4c4a9eccea3c3517c /svtools | |
parent | d93915b2aeabbde90b7eb539116b9be49e0d1a5c (diff) |
convert META_*_ACTION constants to scoped enum
Change-Id: I8ecfbfecd765a35fafcbcc5452b0d04a89be2459
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/graphic/grfcache.cxx | 106 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr2.cxx | 106 | ||||
-rw-r--r-- | svtools/source/graphic/provider.cxx | 26 |
3 files changed, 119 insertions, 119 deletions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index e37d3b7cf345..a747380e3a5e 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -510,40 +510,40 @@ bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf, { switch( pAct->GetType() ) { - case META_FONT_ACTION: + case MetaActionType::FONT: // FALLTHROUGH intended - case META_NULL_ACTION: + case MetaActionType::NONE: // FALLTHROUGH intended // OutDev state changes (which don't affect bitmap // output) - case META_LINECOLOR_ACTION: + case MetaActionType::LINECOLOR: // FALLTHROUGH intended - case META_FILLCOLOR_ACTION: + case MetaActionType::FILLCOLOR: // FALLTHROUGH intended - case META_TEXTCOLOR_ACTION: + case MetaActionType::TEXTCOLOR: // FALLTHROUGH intended - case META_TEXTFILLCOLOR_ACTION: + case MetaActionType::TEXTFILLCOLOR: // FALLTHROUGH intended - case META_TEXTALIGN_ACTION: + case MetaActionType::TEXTALIGN: // FALLTHROUGH intended - case META_TEXTLINECOLOR_ACTION: + case MetaActionType::TEXTLINECOLOR: // FALLTHROUGH intended - case META_TEXTLINE_ACTION: + case MetaActionType::TEXTLINE: // FALLTHROUGH intended - case META_PUSH_ACTION: + case MetaActionType::PUSH: // FALLTHROUGH intended - case META_POP_ACTION: + case MetaActionType::POP: // FALLTHROUGH intended - case META_LAYOUTMODE_ACTION: + case MetaActionType::LAYOUTMODE: // FALLTHROUGH intended - case META_TEXTLANGUAGE_ACTION: + case MetaActionType::TEXTLANGUAGE: // FALLTHROUGH intended - case META_COMMENT_ACTION: + case MetaActionType::COMMENT: break; // bitmap output methods - case META_BMP_ACTION: + case MetaActionType::BMP: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpAction* pAction = static_cast<MetaBmpAction*>(pAct); @@ -560,7 +560,7 @@ bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf, ++nNumBitmaps; break; - case META_BMPSCALE_ACTION: + case MetaActionType::BMPSCALE: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpScaleAction* pAction = static_cast<MetaBmpScaleAction*>(pAct); @@ -578,7 +578,7 @@ bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf, ++nNumBitmaps; break; - case META_BMPSCALEPART_ACTION: + case MetaActionType::BMPSCALEPART: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpScalePartAction* pAction = static_cast<MetaBmpScalePartAction*>(pAct); @@ -596,7 +596,7 @@ bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf, ++nNumBitmaps; break; - case META_BMPEX_ACTION: + case MetaActionType::BMPEX: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpExAction* pAction = static_cast<MetaBmpExAction*>(pAct); @@ -613,7 +613,7 @@ bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf, ++nNumBitmaps; break; - case META_BMPEXSCALE_ACTION: + case MetaActionType::BMPEXSCALE: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpExScaleAction* pAction = static_cast<MetaBmpExScaleAction*>(pAct); @@ -631,7 +631,7 @@ bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf, ++nNumBitmaps; break; - case META_BMPEXSCALEPART_ACTION: + case MetaActionType::BMPEXSCALEPART: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpExScalePartAction* pAction = static_cast<MetaBmpExScalePartAction*>(pAct); @@ -651,81 +651,81 @@ bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf, // these actions actually output something (that's // different from a bitmap) - case META_RASTEROP_ACTION: + case MetaActionType::RASTEROP: if( static_cast<MetaRasterOpAction*>(pAct)->GetRasterOp() == ROP_OVERPAINT ) break; // FALLTHROUGH intended - case META_PIXEL_ACTION: + case MetaActionType::PIXEL: // FALLTHROUGH intended - case META_POINT_ACTION: + case MetaActionType::POINT: // FALLTHROUGH intended - case META_LINE_ACTION: + case MetaActionType::LINE: // FALLTHROUGH intended - case META_RECT_ACTION: + case MetaActionType::RECT: // FALLTHROUGH intended - case META_ROUNDRECT_ACTION: + case MetaActionType::ROUNDRECT: // FALLTHROUGH intended - case META_ELLIPSE_ACTION: + case MetaActionType::ELLIPSE: // FALLTHROUGH intended - case META_ARC_ACTION: + case MetaActionType::ARC: // FALLTHROUGH intended - case META_PIE_ACTION: + case MetaActionType::PIE: // FALLTHROUGH intended - case META_CHORD_ACTION: + case MetaActionType::CHORD: // FALLTHROUGH intended - case META_POLYLINE_ACTION: + case MetaActionType::POLYLINE: // FALLTHROUGH intended - case META_POLYGON_ACTION: + case MetaActionType::POLYGON: // FALLTHROUGH intended - case META_POLYPOLYGON_ACTION: + case MetaActionType::POLYPOLYGON: // FALLTHROUGH intended - case META_TEXT_ACTION: + case MetaActionType::TEXT: // FALLTHROUGH intended - case META_TEXTARRAY_ACTION: + case MetaActionType::TEXTARRAY: // FALLTHROUGH intended - case META_STRETCHTEXT_ACTION: + case MetaActionType::STRETCHTEXT: // FALLTHROUGH intended - case META_TEXTRECT_ACTION: + case MetaActionType::TEXTRECT: // FALLTHROUGH intended - case META_MASK_ACTION: + case MetaActionType::MASK: // FALLTHROUGH intended - case META_MASKSCALE_ACTION: + case MetaActionType::MASKSCALE: // FALLTHROUGH intended - case META_MASKSCALEPART_ACTION: + case MetaActionType::MASKSCALEPART: // FALLTHROUGH intended - case META_GRADIENT_ACTION: + case MetaActionType::GRADIENT: // FALLTHROUGH intended - case META_HATCH_ACTION: + case MetaActionType::HATCH: // FALLTHROUGH intended - case META_WALLPAPER_ACTION: + case MetaActionType::WALLPAPER: // FALLTHROUGH intended - case META_TRANSPARENT_ACTION: + case MetaActionType::TRANSPARENT: // FALLTHROUGH intended - case META_EPS_ACTION: + case MetaActionType::EPS: // FALLTHROUGH intended - case META_FLOATTRANSPARENT_ACTION: + case MetaActionType::FLOATTRANSPARENT: // FALLTHROUGH intended - case META_GRADIENTEX_ACTION: + case MetaActionType::GRADIENTEX: // FALLTHROUGH intended // OutDev state changes that _do_ affect bitmap // output - case META_CLIPREGION_ACTION: + case MetaActionType::CLIPREGION: // FALLTHROUGH intended - case META_ISECTRECTCLIPREGION_ACTION: + case MetaActionType::ISECTRECTCLIPREGION: // FALLTHROUGH intended - case META_ISECTREGIONCLIPREGION_ACTION: + case MetaActionType::ISECTREGIONCLIPREGION: // FALLTHROUGH intended - case META_MOVECLIPREGION_ACTION: + case MetaActionType::MOVECLIPREGION: // FALLTHROUGH intended - case META_MAPMODE_ACTION: + case MetaActionType::MAPMODE: // FALLTHROUGH intended - case META_REFPOINT_ACTION: + case MetaActionType::REFPOINT: // FALLTHROUGH intended default: bNonBitmapActionEncountered = true; diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 972c63498d5e..fae233139002 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -1129,7 +1129,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, MetaAction* pModAct = NULL; switch( pAct->GetType() ) { - case META_FONT_ACTION: + case MetaActionType::FONT: { // taking care of font width default if scaling metafile. MetaFontAction* pA = static_cast<MetaFontAction*>(pAct); @@ -1142,38 +1142,38 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, } } // FALLTHROUGH intended - case META_NULL_ACTION: + case MetaActionType::NONE: // FALLTHROUGH intended // OutDev state changes (which don't affect bitmap // output) - case META_LINECOLOR_ACTION: + case MetaActionType::LINECOLOR: // FALLTHROUGH intended - case META_FILLCOLOR_ACTION: + case MetaActionType::FILLCOLOR: // FALLTHROUGH intended - case META_TEXTCOLOR_ACTION: + case MetaActionType::TEXTCOLOR: // FALLTHROUGH intended - case META_TEXTFILLCOLOR_ACTION: + case MetaActionType::TEXTFILLCOLOR: // FALLTHROUGH intended - case META_TEXTALIGN_ACTION: + case MetaActionType::TEXTALIGN: // FALLTHROUGH intended - case META_TEXTLINECOLOR_ACTION: + case MetaActionType::TEXTLINECOLOR: // FALLTHROUGH intended - case META_TEXTLINE_ACTION: + case MetaActionType::TEXTLINE: // FALLTHROUGH intended - case META_PUSH_ACTION: + case MetaActionType::PUSH: // FALLTHROUGH intended - case META_POP_ACTION: + case MetaActionType::POP: // FALLTHROUGH intended - case META_LAYOUTMODE_ACTION: + case MetaActionType::LAYOUTMODE: // FALLTHROUGH intended - case META_TEXTLANGUAGE_ACTION: + case MetaActionType::TEXTLANGUAGE: // FALLTHROUGH intended - case META_COMMENT_ACTION: + case MetaActionType::COMMENT: break; // bitmap output methods - case META_BMP_ACTION: + case MetaActionType::BMP: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpAction* pAction = static_cast<MetaBmpAction*>(pAct); @@ -1190,7 +1190,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, ++nNumBitmaps; break; - case META_BMPSCALE_ACTION: + case MetaActionType::BMPSCALE: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpScaleAction* pAction = static_cast<MetaBmpScaleAction*>(pAct); @@ -1208,7 +1208,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, ++nNumBitmaps; break; - case META_BMPSCALEPART_ACTION: + case MetaActionType::BMPSCALEPART: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpScalePartAction* pAction = static_cast<MetaBmpScalePartAction*>(pAct); @@ -1227,7 +1227,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, ++nNumBitmaps; break; - case META_BMPEX_ACTION: + case MetaActionType::BMPEX: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpExAction* pAction = static_cast<MetaBmpExAction*>(pAct); @@ -1244,7 +1244,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, ++nNumBitmaps; break; - case META_BMPEXSCALE_ACTION: + case MetaActionType::BMPEXSCALE: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpExScaleAction* pAction = static_cast<MetaBmpExScaleAction*>(pAct); @@ -1262,7 +1262,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, ++nNumBitmaps; break; - case META_BMPEXSCALEPART_ACTION: + case MetaActionType::BMPEXSCALEPART: if( !nNumBitmaps && !bNonBitmapActionEncountered ) { MetaBmpExScalePartAction* pAction = static_cast<MetaBmpExScalePartAction*>(pAct); @@ -1282,81 +1282,81 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, // these actions actually output something (that's // different from a bitmap) - case META_RASTEROP_ACTION: + case MetaActionType::RASTEROP: if( static_cast<MetaRasterOpAction*>(pAct)->GetRasterOp() == ROP_OVERPAINT ) break; // FALLTHROUGH intended - case META_PIXEL_ACTION: + case MetaActionType::PIXEL: // FALLTHROUGH intended - case META_POINT_ACTION: + case MetaActionType::POINT: // FALLTHROUGH intended - case META_LINE_ACTION: + case MetaActionType::LINE: // FALLTHROUGH intended - case META_RECT_ACTION: + case MetaActionType::RECT: // FALLTHROUGH intended - case META_ROUNDRECT_ACTION: + case MetaActionType::ROUNDRECT: // FALLTHROUGH intended - case META_ELLIPSE_ACTION: + case MetaActionType::ELLIPSE: // FALLTHROUGH intended - case META_ARC_ACTION: + case MetaActionType::ARC: // FALLTHROUGH intended - case META_PIE_ACTION: + case MetaActionType::PIE: // FALLTHROUGH intended - case META_CHORD_ACTION: + case MetaActionType::CHORD: // FALLTHROUGH intended - case META_POLYLINE_ACTION: + case MetaActionType::POLYLINE: // FALLTHROUGH intended - case META_POLYGON_ACTION: + case MetaActionType::POLYGON: // FALLTHROUGH intended - case META_POLYPOLYGON_ACTION: + case MetaActionType::POLYPOLYGON: // FALLTHROUGH intended - case META_TEXT_ACTION: + case MetaActionType::TEXT: // FALLTHROUGH intended - case META_TEXTARRAY_ACTION: + case MetaActionType::TEXTARRAY: // FALLTHROUGH intended - case META_STRETCHTEXT_ACTION: + case MetaActionType::STRETCHTEXT: // FALLTHROUGH intended - case META_TEXTRECT_ACTION: + case MetaActionType::TEXTRECT: // FALLTHROUGH intended - case META_MASK_ACTION: + case MetaActionType::MASK: // FALLTHROUGH intended - case META_MASKSCALE_ACTION: + case MetaActionType::MASKSCALE: // FALLTHROUGH intended - case META_MASKSCALEPART_ACTION: + case MetaActionType::MASKSCALEPART: // FALLTHROUGH intended - case META_GRADIENT_ACTION: + case MetaActionType::GRADIENT: // FALLTHROUGH intended - case META_HATCH_ACTION: + case MetaActionType::HATCH: // FALLTHROUGH intended - case META_WALLPAPER_ACTION: + case MetaActionType::WALLPAPER: // FALLTHROUGH intended - case META_TRANSPARENT_ACTION: + case MetaActionType::TRANSPARENT: // FALLTHROUGH intended - case META_EPS_ACTION: + case MetaActionType::EPS: // FALLTHROUGH intended - case META_FLOATTRANSPARENT_ACTION: + case MetaActionType::FLOATTRANSPARENT: // FALLTHROUGH intended - case META_GRADIENTEX_ACTION: + case MetaActionType::GRADIENTEX: // FALLTHROUGH intended // OutDev state changes that _do_ affect bitmap // output - case META_CLIPREGION_ACTION: + case MetaActionType::CLIPREGION: // FALLTHROUGH intended - case META_ISECTRECTCLIPREGION_ACTION: + case MetaActionType::ISECTRECTCLIPREGION: // FALLTHROUGH intended - case META_ISECTREGIONCLIPREGION_ACTION: + case MetaActionType::ISECTREGIONCLIPREGION: // FALLTHROUGH intended - case META_MOVECLIPREGION_ACTION: + case MetaActionType::MOVECLIPREGION: // FALLTHROUGH intended - case META_MAPMODE_ACTION: + case MetaActionType::MAPMODE: // FALLTHROUGH intended - case META_REFPOINT_ACTION: + case MetaActionType::REFPOINT: // FALLTHROUGH intended default: bNonBitmapActionEncountered = true; diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 292945d96714..7a5bda77d247 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -651,29 +651,29 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal switch( pAction->GetType() ) { // only optimizing common bitmap actions: - case( META_MAPMODE_ACTION ): + case( MetaActionType::MAPMODE ): { const_cast< MetaAction* >( pAction )->Execute( aDummyVDev.get() ); break; } - case( META_PUSH_ACTION ): + case( MetaActionType::PUSH ): { const MetaPushAction* pA = static_cast<const MetaPushAction*>(pAction); aDummyVDev->Push( pA->GetFlags() ); break; } - case( META_POP_ACTION ): + case( MetaActionType::POP ): { aDummyVDev->Pop(); break; } - case( META_BMPSCALE_ACTION ): - case( META_BMPEXSCALE_ACTION ): + case( MetaActionType::BMPSCALE ): + case( MetaActionType::BMPEXSCALE ): { BitmapEx aBmpEx; Point aPos; Size aSize; - if ( pAction->GetType() == META_BMPSCALE_ACTION ) + if ( pAction->GetType() == MetaActionType::BMPSCALE ) { MetaBmpScaleAction* pScaleAction = dynamic_cast< MetaBmpScaleAction* >( pAction ); aBmpEx = pScaleAction->GetBitmap(); @@ -695,7 +695,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal aGraphic.GetSizePixel(), awt::Size( aSize100thmm2.Width(), aSize100thmm2.Height() ) ); MetaAction* pNewAction; - if ( pAction->GetType() == META_BMPSCALE_ACTION ) + if ( pAction->GetType() == MetaActionType::BMPSCALE ) pNewAction = new MetaBmpScaleAction ( aPos, aSize, aGraphic.GetBitmap() ); else pNewAction = new MetaBmpExScaleAction( aPos, aSize, aGraphic.GetBitmapEx() ); @@ -706,12 +706,12 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal break; } default: - case( META_BMP_ACTION ): - case( META_BMPSCALEPART_ACTION ): - case( META_BMPEX_ACTION ): - case( META_BMPEXSCALEPART_ACTION ): - case( META_MASK_ACTION ): - case( META_MASKSCALE_ACTION ): + case( MetaActionType::BMP ): + case( MetaActionType::BMPSCALEPART ): + case( MetaActionType::BMPEX ): + case( MetaActionType::BMPEXSCALEPART ): + case( MetaActionType::MASK ): + case( MetaActionType::MASKSCALE ): break; } } |