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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/dialogs/cuifmsearch.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/cuigrfflt.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/paragrph.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/textattr.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 77905dda2b6b..e0b944498af0 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -737,8 +737,8 @@ IMPL_LINK_TYPED(FmSearchDialog, OnSearchProgress, const FmSearchProgress*, pProg ? RID_STR_SEARCH_GENERAL_ERROR : RID_STR_SEARCH_NORECORD; ScopedVclPtrInstance<MessageDialog>::Create(this, CUI_RES(nErrorId))->Execute(); + SAL_FALLTHROUGH; } - // NO break ! case FmSearchProgress::STATE_CANCELED: EnableSearchUI(true); if (m_lnkCanceledNotFoundHdl.IsSet()) diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 3723f81146c8..bd694f2cd061 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -572,7 +572,7 @@ Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic, double switch( mpCtlLight->GetActualRP() ) { default: OSL_FAIL("svx::GraphicFilterEmboss::GetFilteredGraphic(), unknown Reference Point!" ); - /* Fall through */ + SAL_FALLTHROUGH; case RP_LT: nAzim = 4500; nElev = 4500; break; case RP_MT: nAzim = 9000; nElev = 4500; break; case RP_RT: nAzim = 13500; nElev = 4500; break; diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index ad5bfd2f547f..f4aaa90393c0 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -974,7 +974,7 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa m_pBtnEngineering->Enable(); m_pBtnEngineering->Check( bThousand ); } - // fallthru + SAL_FALLTHROUGH; case CAT_NUMBER: case CAT_PERCENT: case CAT_CURRENCY: diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 9e8f531bf973..4b9e7daeeb0e 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -2053,7 +2053,7 @@ IMPL_LINK_NOARG_TYPED(SvxExtParagraphTabPage, WidowHdl_Impl, Button*, void) if ( m_pOrphanBox->GetState() == TRISTATE_FALSE ) m_pKeepTogetherBox->Enable(); - // no break + SAL_FALLTHROUGH; case TRISTATE_INDET: m_pWidowRowNo->Enable(false); m_pWidowRowLabel->Enable(false); @@ -2075,7 +2075,7 @@ IMPL_LINK_NOARG_TYPED(SvxExtParagraphTabPage, OrphanHdl_Impl, Button*, void) if ( m_pWidowBox->GetState() == TRISTATE_FALSE ) m_pKeepTogetherBox->Enable(); - // no break + SAL_FALLTHROUGH; case TRISTATE_INDET: m_pOrphanRowNo->Enable(false); m_pOrphanRowLabel->Enable(false); diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 9dcbb2f0a83d..315e6649c885 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -407,7 +407,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) { default: ; //prevent warning OSL_FAIL( "svx::SvxTextAttrPage::FillItemSet(), unhandled state!" ); - /* Fall through */ + SAL_FALLTHROUGH; case TRISTATE_FALSE: eFTS = SDRTEXTFIT_NONE; break; case TRISTATE_TRUE: eFTS = SDRTEXTFIT_AUTOFIT; break; } diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index e9837482ad5d..240e9daa38ce 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -155,7 +155,7 @@ SvxLineTabPage::SvxLineTabPage case FUNIT_M: case FUNIT_KM: eFUnit = FUNIT_MM; - // no break -> we now have mm + SAL_FALLTHROUGH; // we now have mm case FUNIT_MM: m_pMtrLineWidth->SetSpinSize( 50 ); m_pMtrStartWidth->SetSpinSize( 50 ); |