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 | |
parent | d93915b2aeabbde90b7eb539116b9be49e0d1a5c (diff) |
convert META_*_ACTION constants to scoped enum
Change-Id: I8ecfbfecd765a35fafcbcc5452b0d04a89be2459
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/shapes/drawshape.cxx | 2 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/drawshapesubsetting.cxx | 8 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/gdimtftools.cxx | 19 |
3 files changed, 15 insertions, 14 deletions
diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index 875dffebb58c..3eec85e8c47c 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -909,7 +909,7 @@ namespace slideshow for ( MetaAction * pCurrAct = mpCurrMtf->FirstAction(); pCurrAct != 0; pCurrAct = mpCurrMtf->NextAction() ) { - if (pCurrAct->GetType() == META_COMMENT_ACTION) { + if (pCurrAct->GetType() == MetaActionType::COMMENT) { MetaCommentAction * pAct = static_cast<MetaCommentAction *>(pCurrAct); // skip comment if not a special XTEXT comment diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx index cc0828a13f40..953f97bdfe74 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx @@ -74,7 +74,7 @@ namespace slideshow // check for one of our special text doctree comments switch( pCurrAct->GetType() ) { - case META_COMMENT_ACTION: + case MetaActionType::COMMENT: { MetaCommentAction* pAct = static_cast<MetaCommentAction*>(pCurrAct); @@ -152,9 +152,9 @@ namespace slideshow ++nActionIndex; break; } - case META_TEXT_ACTION: - case META_TEXTARRAY_ACTION: - case META_STRETCHTEXT_ACTION: + case MetaActionType::TEXT: + case MetaActionType::TEXTARRAY: + case MetaActionType::STRETCHTEXT: nLastTextActionIndex = nActionIndex; #if OSL_DEBUG_LEVEL > 1 { 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); |