summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-10 16:42:16 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:26:06 -0400
commite7b11300cd813f821d1ec5cb4633ce2c5f7d1b9f (patch)
treea6c39d9d4cde1baa84a9d788affbce3508af89a8 /sd
parent34f591ca95c4c63be092da4c4b2294230404f336 (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. (cherry picked from commit 14cd5182c5f64c43581c82db8c958369152226ac) Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/CustomAnimationCloner.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx2
-rw-r--r--sd/source/filter/eppt/eppt.cxx5
-rw-r--r--sd/source/filter/eppt/epptso.cxx8
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx2
-rw-r--r--sd/source/filter/ppt/pptin.cxx10
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx2
-rw-r--r--sd/source/ui/dlg/tpaction.cxx2
-rw-r--r--sd/source/ui/func/fuconrec.cxx2
-rw-r--r--sd/source/ui/func/fuinsert.cxx2
-rw-r--r--sd/source/ui/func/fusnapln.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx4
-rw-r--r--sd/source/ui/slidesorter/view/SlsTheme.cxx2
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx4
-rw-r--r--sd/source/ui/view/drviews2.cxx2
-rw-r--r--sd/source/ui/view/drviewse.cxx2
-rw-r--r--sd/source/ui/view/viewshel.cxx2
19 files changed, 31 insertions, 28 deletions
diff --git a/sd/source/core/CustomAnimationCloner.cxx b/sd/source/core/CustomAnimationCloner.cxx
index 79a1636fae12..48d74bcdb17e 100644
--- a/sd/source/core/CustomAnimationCloner.cxx
+++ b/sd/source/core/CustomAnimationCloner.cxx
@@ -152,8 +152,8 @@ namespace sd
{
Reference< XIterateContainer > xIter( xNode, UNO_QUERY_THROW );
xIter->setTarget( transformValue( xIter->getTarget() ) );
+ SAL_FALLTHROUGH;
}
- // its intended that here is no break!
case AnimationNodeType::PAR:
case AnimationNodeType::SEQ:
{
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 5a219fc8361a..5220c0c7098f 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1046,7 +1046,7 @@ OUString SdDrawDocument::CreatePageNumValue(sal_uInt16 nNum) const
break;
case SVX_ROMAN_UPPER:
bUpper = true;
- //fall-through
+ SAL_FALLTHROUGH;
case SVX_ROMAN_LOWER:
aPageNumValue += SvxNumberFormat::CreateRomanString(nNum, bUpper);
break;
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index f77c716c4aa5..a4c80708fbed 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -197,7 +197,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_
{
case 1 : // automatic
mnDiaMode++;
- // fall-through
+ SAL_FALLTHROUGH;
case 2 : // semi-automatic
mnDiaMode++;
default :
@@ -1216,7 +1216,8 @@ void PPTWriter::ImplWriteBackground( css::uno::Reference< css::beans::XPropertyS
nFillColor = EscherEx::GetColor( *static_cast<sal_uInt32 const *>(mAny.getValue()) );
nFillBackColor = nFillColor ^ 0xffffff;
}
- } // PASSTHROUGH INTENDED
+ SAL_FALLTHROUGH;
+ }
case css::drawing::FillStyle_NONE :
default:
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x120012 );
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 3addfbfc5194..483e3e7bd847 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1935,16 +1935,16 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, css::presentation::ClickAct
{
case css::presentation::ClickAction_STOPPRESENTATION :
nJump += 2;
- //fall-through
+ SAL_FALLTHROUGH;
case css::presentation::ClickAction_LASTPAGE :
nJump++;
- //fall-through
+ SAL_FALLTHROUGH;
case css::presentation::ClickAction_FIRSTPAGE :
nJump++;
- //fall-through
+ SAL_FALLTHROUGH;
case css::presentation::ClickAction_PREVPAGE :
nJump++;
- //fall-through
+ SAL_FALLTHROUGH;
case css::presentation::ClickAction_NEXTPAGE :
{
nJump++;
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 6b321991b858..af56d7739a9b 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -836,7 +836,7 @@ void AnimationExporter::exportAnimNode( SvStream& rStrm, const Reference< XAnima
{
case AnimationNodeType::PAR :
aAnim.mnGroupType = mso_Anim_GroupType_PAR;
- // PASSTROUGH!!! (as it was intended)
+ SAL_FALLTHROUGH;
case AnimationNodeType::SEQ :
{
sal_Int16 nType = 0;
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 844ae34c0b43..38f49fb61841 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -1255,7 +1255,7 @@ bool ImplSdPPTImport::Import()
break;
case 10 : // titlemaster
nSelectedPage = 1;
- //fall-through
+ SAL_FALLTHROUGH;
case 2 : // master
{
ePageKind = PK_STANDARD;
@@ -1264,7 +1264,7 @@ bool ImplSdPPTImport::Import()
break;
case 5 : // notes master
eEditMode = EM_MASTERPAGE;
- //fall-through
+ SAL_FALLTHROUGH;
case 3 : // notes
ePageKind = PK_NOTES;
break;
@@ -2367,10 +2367,12 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
{
case PptPlaceholder::NOTESBODY : ePresObjKind = PRESOBJ_NOTES; break;
case PptPlaceholder::VERTICALTEXTTITLE :
- bVertical = true; // PASSTHROUGH !!!
+ bVertical = true;
+ SAL_FALLTHROUGH;
case PptPlaceholder::TITLE : ePresObjKind = PRESOBJ_TITLE; break;
case PptPlaceholder::VERTICALTEXTBODY :
- bVertical = true; // PASSTHROUGH !!!
+ bVertical = true;
+ SAL_FALLTHROUGH;
case PptPlaceholder::BODY : ePresObjKind = PRESOBJ_OUTLINE; break;
case PptPlaceholder::CENTEREDTITLE : ePresObjKind = PRESOBJ_TITLE; break;
case PptPlaceholder::SUBTITLE : ePresObjKind = PRESOBJ_TEXT; break; // PRESOBJ_OUTLINE
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index e147a75bd1c4..8d3a83bcd4f5 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -692,7 +692,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
nError = ERRCODE_IO_BROKENPACKAGE;
break;
}
- // fall through intended
+ SAL_FALLTHROUGH;
default:
{
// TODO/LATER: this is completely wrong! Filter code should never call ErrorHandler directly!
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 7e90868080c4..8d9434b5b32b 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1901,7 +1901,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
aEvent.Repeat = 0;
aEnd <<= aEvent;
}
- // ATTENTION: FALL THROUGH INTENDED!
+ SAL_FALLTHROUGH;
case 7:
aRepeatCount <<= Timing_INDEFINITE;
break;
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index c50955fe97b9..1d944115a7c9 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -329,7 +329,7 @@ IMPL_LINK_TYPED(CustomAnimationPane,EventMultiplexerListener,
break;
}
}
- // fall through intended
+ SAL_FALLTHROUGH;
case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
mxView = nullptr;
mxCurrentPage = nullptr;
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 3a6ed516e930..fac2f2fea661 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -730,7 +730,7 @@ void SdTPAction::SetEditText( OUString const & rStr )
if( comphelper::string::getTokenCount(rStr, DOCUMENT_TOKEN) == 2 )
aText = rStr.getToken( 0, DOCUMENT_TOKEN );
- // fallthrough intended
+ SAL_FALLTHROUGH;
case presentation::ClickAction_SOUND:
case presentation::ClickAction_PROGRAM:
{
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 5ad85e42d554..0acc56c3cef4 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -289,7 +289,7 @@ void FuConstructRectangle::Activate()
case SID_LINE_ARROW_SQUARE:
case SID_LINE_SQUARE_ARROW:
mpView->SetGlueVisible();
- // no break !
+ SAL_FALLTHROUGH;
case SID_DRAW_LINE :
case SID_DRAW_XLINE:
aObjKind = OBJ_LINE;
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 753c56155510..8a978ee129cc 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -489,7 +489,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
aServerLst.Remove( DrawDocShell::Factory().GetClassId() );
}
- // intentionally no break!
+ SAL_FALLTHROUGH;
}
case SID_INSERT_PLUGIN :
case SID_INSERT_FLOATINGFRAME :
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index 84688cdb3d87..641e9b2c49fd 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -156,7 +156,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
// delete snap object
if ( !bCreateNew )
pPV->DeleteHelpLine(nHelpLine);
- /*fall-through*/
+ SAL_FALLTHROUGH;
default:
return;
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 07287a08e996..49400ce82ee3 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1863,7 +1863,7 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
gotoNextSlide();
break;
}
- // warning, fall through!
+ SAL_FALLTHROUGH;
case KEY_SPACE:
case KEY_RIGHT:
case KEY_DOWN:
@@ -1909,7 +1909,7 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
gotoPreviousSlide();
break;
}
- // warning, fall through!
+ SAL_FALLTHROUGH;
case KEY_LEFT:
case KEY_UP:
case KEY_P:
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index f669b6ad4639..934dddf96d63 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -186,7 +186,7 @@ ColorData Theme::GetGradientColor (
case Border2: return rDescriptor.maBorderColor2;
case Fill1: return rDescriptor.maFillColor1;
case Fill2: return rDescriptor.maFillColor2;
- default: OSL_ASSERT(false); // fall through
+ default: OSL_ASSERT(false); SAL_FALLTHROUGH;
case Base: return rDescriptor.maBaseColor;
}
}
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index f348e66b52c3..1f40c13b9c2a 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -1389,7 +1389,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
bOk = true;
- // NOTE: No break here!!!
+ SAL_FALLTHROUGH;
case presentation::ClickAction_SOUND:
if( nFound & FOUND_SOUNDURL )
@@ -1634,7 +1634,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
pProperties->State = beans::PropertyState_DIRECT_VALUE;
pProperties++;
- // NOTE: no break here!!!
+ SAL_FALLTHROUGH;
case presentation::ClickAction_SOUND:
if( eClickAction == presentation::ClickAction_SOUND || pInfo->mbSecondSoundOn )
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 08d0ced34835..fb5810415cd9 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1250,7 +1250,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_CAPTUREPOINT:
// negative value to signal call from menu
maMousePos = Point(-1,-1);
- // fall-through
+ SAL_FALLTHROUGH;
case SID_SET_SNAPITEM:
{
SetCurrentFunction( FuSnapLine::Create(this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index a293696455b6..6ef1ea408577 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -971,7 +971,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
// AutoLayouts have to be ready.
GetDoc()->StopWorkStartupDelay();
- // Fall through to following case statements.
+ SAL_FALLTHROUGH;
case SID_DRAWINGMODE:
case SID_SLIDE_SORTER_MODE:
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 2deed289b00a..a493ecea8e05 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -778,7 +778,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
break;
}
}
- // fall through when not running slideshow
+ SAL_FALLTHROUGH;
case CommandEventId::StartAutoScroll:
case CommandEventId::AutoScroll:
{