diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-05-10 16:42:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-05-10 16:42:16 +0200 |
commit | 14cd5182c5f64c43581c82db8c958369152226ac (patch) | |
tree | 57f150ba2707f29214eeb9b1eaad2373780d1b15 /dbaccess/source/ui/querydesign | |
parent | e4bb2b4f4875c15bd68297b5be716edd6859841e (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 'dbaccess/source/ui/querydesign')
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/querycontroller.cxx | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index c5399b965c16..cff9469c682b 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -2003,8 +2003,9 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) EditBrowseBox::Command(rEvt); return; } + + SAL_FALLTHROUGH; } - //fall-through default: EditBrowseBox::Command(rEvt); } diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx index 19b60e6f13e2..d4b3a13bb123 100644 --- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx +++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx @@ -68,7 +68,7 @@ bool LimitBoxImpl::Notify( NotifyEvent& rNEvt ) { case KEY_ESCAPE: Undo(); - // fall-through + SAL_FALLTHROUGH; case KEY_RETURN: GrabFocusToDocument(); bHandled = true; diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 4f543c4b693f..8a96808a58db 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -553,7 +553,7 @@ FeatureState OQueryController::GetState(sal_uInt16 _nId) const aReturn.bEnabled = false; break; } - // run through + SAL_FALLTHROUGH; default: aReturn = OJoinController::GetState(_nId); break; |