summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-10 16:42:16 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-10 16:42:16 +0200
commit14cd5182c5f64c43581c82db8c958369152226ac (patch)
tree57f150ba2707f29214eeb9b1eaad2373780d1b15 /slideshow
parente4bb2b4f4875c15bd68297b5be716edd6859841e (diff)
Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/activities/activitiesfactory.cxx8
-rw-r--r--slideshow/source/engine/animationnodes/basenode.cxx4
-rw-r--r--slideshow/source/engine/animationnodes/generateevent.cxx2
-rw-r--r--slideshow/source/engine/shapes/drawshapesubsetting.cxx14
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx4
-rw-r--r--slideshow/source/engine/slide/targetpropertiescreator.cxx3
6 files changed, 13 insertions, 22 deletions
diff --git a/slideshow/source/engine/activities/activitiesfactory.cxx b/slideshow/source/engine/activities/activitiesfactory.cxx
index c3e026b85986..17868c25761a 100644
--- a/slideshow/source/engine/activities/activitiesfactory.cxx
+++ b/slideshow/source/engine/activities/activitiesfactory.cxx
@@ -764,11 +764,9 @@ AnimationActivitySharedPtr createActivity(
default:
OSL_FAIL( "createActivity(): unexpected case" );
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case animations::AnimationCalcMode::PACED:
- // FALLTHROUGH intended
case animations::AnimationCalcMode::SPLINE:
- // FALLTHROUGH intended
case animations::AnimationCalcMode::LINEAR:
return createValueListActivity< ContinuousKeyTimeActivityBase >(
xNode->getValues(),
@@ -832,11 +830,9 @@ AnimationActivitySharedPtr createActivity(
default:
OSL_FAIL( "createActivity(): unexpected case" );
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case animations::AnimationCalcMode::PACED:
- // FALLTHROUGH intended
case animations::AnimationCalcMode::SPLINE:
- // FALLTHROUGH intended
case animations::AnimationCalcMode::LINEAR:
return createFromToByActivity< ContinuousActivityBase >(
xNode->getFrom(),
diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx
index 9b7bae8cca47..a1467a5db0e7 100644
--- a/slideshow/source/engine/animationnodes/basenode.cxx
+++ b/slideshow/source/engine/animationnodes/basenode.cxx
@@ -203,7 +203,7 @@ const int* getStateTransitionTable( sal_Int16 nRestartMode,
// same value: animations::AnimationRestart::INHERIT:
OSL_FAIL(
"getStateTransitionTable(): unexpected case for restart" );
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case animations::AnimationRestart::NEVER:
nRestartValue = 0;
break;
@@ -223,7 +223,7 @@ const int* getStateTransitionTable( sal_Int16 nRestartMode,
// same value: animations::AnimationFill::INHERIT:
OSL_FAIL(
"getStateTransitionTable(): unexpected case for fill" );
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case animations::AnimationFill::REMOVE:
nFillValue = 0;
break;
diff --git a/slideshow/source/engine/animationnodes/generateevent.cxx b/slideshow/source/engine/animationnodes/generateevent.cxx
index 76a778c4acec..513f0bc889b3 100644
--- a/slideshow/source/engine/animationnodes/generateevent.cxx
+++ b/slideshow/source/engine/animationnodes/generateevent.cxx
@@ -188,7 +188,7 @@ EventSharedPtr generateEvent(
case animations::EventTrigger::ON_PREV:
OSL_FAIL( "event trigger ON_PREV not yet implemented, "
"mapped to ON_NEXT!" );
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case animations::EventTrigger::ON_NEXT:
pEvent = makeDelay( rFunctor,
nDelay2 + nAdditionalDelay,
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
index 588f6cc47613..d8a1ad127f55 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
@@ -152,7 +152,7 @@ namespace slideshow
SAL_INFO("slideshow.verbose", "Shape text \"" <<
(static_cast<MetaTextAction*>(pCurrAct))->GetText() <<
"\" at action #" << nActionIndex );
- // fallthrough intended
+ SAL_FALLTHROUGH;
default:
// comment action and all actions not
// explicitly handled here:
@@ -504,8 +504,7 @@ namespace slideshow
}
++nCurrShapeCount;
- // FALLTHROUGH intended: shape end also
- // ends lines
+ SAL_FALLTHROUGH; // shape end also ends lines
case DrawShapeSubsetting::CLASS_PARAGRAPH_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_PARAGRAPH_END,
nCurrParaCount,
@@ -517,8 +516,7 @@ namespace slideshow
++nCurrParaCount;
aLastParaStart = aNext;
- // FALLTHROUGH intended: para end also
- // ends line
+ SAL_FALLTHROUGH; // para end also ends line
case DrawShapeSubsetting::CLASS_LINE_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_LINE_END,
nCurrLineCount,
@@ -545,7 +543,7 @@ namespace slideshow
// character cell, OTOH?
break;
}
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case DrawShapeSubsetting::CLASS_SENTENCE_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_SENTENCE_END,
nCurrSentenceCount,
@@ -557,7 +555,7 @@ namespace slideshow
++nCurrSentenceCount;
aLastSentenceStart = aNext;
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case DrawShapeSubsetting::CLASS_WORD_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_WORD_END,
nCurrWordCount,
@@ -569,7 +567,7 @@ namespace slideshow
++nCurrWordCount;
aLastWordStart = aNext;
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case DrawShapeSubsetting::CLASS_CHARACTER_CELL_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_CHARACTER_CELL_END,
nCurrCharCount,
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index 684c07a57617..19fc0015b6a4 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -86,11 +86,9 @@ bool hasUnsupportedActions( const GDIMetaFile& rMtf )
{
break;
}
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case MetaActionType::MOVECLIPREGION:
- // FALLTHROUGH intended
case MetaActionType::REFPOINT:
- // FALLTHROUGH intended
case MetaActionType::WALLPAPER:
return true; // at least one unsupported
// action encountered
diff --git a/slideshow/source/engine/slide/targetpropertiescreator.cxx b/slideshow/source/engine/slide/targetpropertiescreator.cxx
index 8974acdc4b17..6eb1f70b5cdc 100644
--- a/slideshow/source/engine/slide/targetpropertiescreator.cxx
+++ b/slideshow/source/engine/slide/targetpropertiescreator.cxx
@@ -168,10 +168,9 @@ namespace internal
return;
}
}
+ SAL_FALLTHROUGH;
}
- // FALLTHROUGH intended
case animations::AnimationNodeType::PAR:
- // FALLTHROUGH intended
case animations::AnimationNodeType::SEQ:
{
/// forward bInitial