summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx2
-rw-r--r--cui/source/tabpages/numfmt.cxx2
-rw-r--r--cui/source/tabpages/paragrph.cxx4
-rw-r--r--cui/source/tabpages/textattr.cxx2
-rw-r--r--cui/source/tabpages/tpline.cxx2
5 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 17d6da871044..8ef0efceda2a 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -735,8 +735,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/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index f0b3255373c3..fd5f20649712 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -966,7 +966,7 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa
else
bThousand = false;
}
- // 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 775e80b61dd8..b00e6b4fbcc9 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -2058,7 +2058,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);
@@ -2080,7 +2080,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 a0ba1bb62641..ba7d6ccee10c 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 2dca969491a0..cc5e6bbb6e48 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 );