diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-05-10 16:42:16 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-20 01:26:06 -0400 |
commit | e7b11300cd813f821d1ec5cb4633ce2c5f7d1b9f (patch) | |
tree | a6c39d9d4cde1baa84a9d788affbce3508af89a8 /sfx2 | |
parent | 34f591ca95c4c63be092da4c4b2294230404f336 (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 'sfx2')
-rw-r--r-- | sfx2/source/bastyp/sfxhtml.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailviewitem.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/titledockwin.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index 6d3c57479e25..045b49c16bff 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -153,14 +153,14 @@ bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const OUString& rBase case HTML_O_ONMOUSEOVER: eScrpType = JAVASCRIPT; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_SDONMOUSEOVER: nEvent = nEventMouseOver; goto IMAPOBJ_SETEVENT; case HTML_O_ONMOUSEOUT: eScrpType = JAVASCRIPT; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_SDONMOUSEOUT: nEvent = nEventMouseOut; goto IMAPOBJ_SETEVENT; diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 6e5321d4aeea..6ef977c9e7e6 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -602,7 +602,7 @@ void ThumbnailView::KeyInput( const KeyEvent& rKEvt ) if ( bFoundLast ) OnItemDblClicked( mFilteredItemList[nLastPos] ); } - //fall-through + SAL_FALLTHROUGH; default: Control::KeyInput( rKEvt ); } diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index b085229baeb3..bd6746710812 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -77,7 +77,7 @@ bool ResizableMultiLineEdit::PreNotify(NotifyEvent& rNEvt) { case KEY_RETURN: mpItem->setTitle( GetText() ); - //fall-through + SAL_FALLTHROUGH; case KEY_ESCAPE: mpItem->setEditTitle(false); bDone = true; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index e5fa7b57233b..9a0bd9ebe52e 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2407,7 +2407,7 @@ void SfxTemplateDialog_Impl::EnableItem(sal_uInt16 nMesId, bool bCheck) case SID_STYLE_WATERCAN : if(!bCheck && IsCheckedItem(SID_STYLE_WATERCAN)) Execute_Impl(SID_STYLE_WATERCAN, "", "", 0); - //fall-through + SAL_FALLTHROUGH; case SID_STYLE_NEW_BY_EXAMPLE: case SID_STYLE_UPDATE_BY_EXAMPLE: m_aActionTbR->EnableItem(nMesId,bCheck); diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index 22af458a4d8e..c48605133abb 100644 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -302,7 +302,7 @@ namespace sfx2 case DataChangedEventType::SETTINGS: if ( !( i_rDataChangedEvent.GetFlags() & AllSettingsFlags::STYLE ) ) break; - // else fall through. + SAL_FALLTHROUGH; case DataChangedEventType::FONTS: case DataChangedEventType::FONTSUBSTITUTION: { diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 5bd9e1df2508..1cb82cf9f2d8 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -523,7 +523,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) case SID_EXPORTDOCASPDF: case SID_DIRECTEXPORTDOCASPDF: bIsPDFExport = true; - //fall-through + SAL_FALLTHROUGH; case SID_EXPORTDOC: case SID_SAVEASDOC: case SID_SAVEASREMOTE: diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index aa09dc681117..e6c0200efc56 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -343,7 +343,7 @@ void SfxPrinterController::jobFinished( css::view::PrintableState nState ) OUString aMsg( SfxResId(STR_NOSTARTPRINTER).toString() ); if ( !m_bApi ) ScopedVclPtrInstance<MessageDialog>::Create(mpViewShell->GetWindow(), aMsg)->Execute(); - // intentionally no break + SAL_FALLTHROUGH; } case view::PrintableState_JOB_ABORTED : { |