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 /slideshow/source/engine/shapes/gdimtftools.cxx | |
parent | d93915b2aeabbde90b7eb539116b9be49e0d1a5c (diff) |
convert META_*_ACTION constants to scoped enum
Change-Id: I8ecfbfecd765a35fafcbcc5452b0d04a89be2459
Diffstat (limited to 'slideshow/source/engine/shapes/gdimtftools.cxx')
-rw-r--r-- | slideshow/source/engine/shapes/gdimtftools.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 4a4d994aa22d..03a467a7748b 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -82,7 +82,7 @@ bool hasUnsupportedActions( const GDIMetaFile& rMtf ) { switch( pCurrAct->GetType() ) { - case META_RASTEROP_ACTION: + case MetaActionType::RASTEROP: // overpaint is okay - that's the default, anyway if( ROP_OVERPAINT == static_cast<MetaRasterOpAction*>(pCurrAct)->GetRasterOp() ) @@ -90,13 +90,14 @@ bool hasUnsupportedActions( const GDIMetaFile& rMtf ) break; } // FALLTHROUGH intended - case META_MOVECLIPREGION_ACTION: + case MetaActionType::MOVECLIPREGION: // FALLTHROUGH intended - case META_REFPOINT_ACTION: + case MetaActionType::REFPOINT: // FALLTHROUGH intended - case META_WALLPAPER_ACTION: + case MetaActionType::WALLPAPER: return true; // at least one unsupported // action encountered + default: break; } } @@ -236,24 +237,24 @@ sal_Int32 getNextActionOffset( MetaAction * pCurrAct ) // =========================================== switch (pCurrAct->GetType()) { - case META_TEXT_ACTION: { + case MetaActionType::TEXT: { MetaTextAction * pAct = static_cast<MetaTextAction *>(pCurrAct); sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex()); return nLen; } - case META_TEXTARRAY_ACTION: { + case MetaActionType::TEXTARRAY: { MetaTextArrayAction * pAct = static_cast<MetaTextArrayAction *>(pCurrAct); sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex()); return nLen; } - case META_STRETCHTEXT_ACTION: { + case MetaActionType::STRETCHTEXT: { MetaStretchTextAction * pAct = static_cast<MetaStretchTextAction *>(pCurrAct); sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex()); return nLen; } - case META_FLOATTRANSPARENT_ACTION: { + case MetaActionType::FLOATTRANSPARENT: { MetaFloatTransparentAction * pAct = static_cast<MetaFloatTransparentAction*>(pCurrAct); // TODO(F2): Recurse into action metafile @@ -443,7 +444,7 @@ bool getRectanglesFromScrollMtf( ::basegfx::B2DRectangle& o_rScrollRect, for ( MetaAction * pCurrAct = rMtf->FirstAction(); pCurrAct != 0; pCurrAct = rMtf->NextAction() ) { - if (pCurrAct->GetType() == META_COMMENT_ACTION) + if (pCurrAct->GetType() == MetaActionType::COMMENT) { MetaCommentAction * pAct = static_cast<MetaCommentAction *>(pCurrAct); |