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 /filter | |
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 'filter')
-rw-r--r-- | filter/source/flash/swfwriter1.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/idxf/dxfentrd.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/ios2met/ios2met.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/ipbm/ipbm.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/ipsd/ipsd.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 12 | ||||
-rw-r--r-- | filter/source/msfilter/util.cxx | 2 | ||||
-rw-r--r-- | filter/source/svg/svgexport.cxx | 2 |
8 files changed, 17 insertions, 15 deletions
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 93dfe76f645b..112173ba0e90 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -1766,6 +1766,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) { const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pAction); clipRect = pA->GetRect(); + SAL_FALLTHROUGH; } // fall-through case( MetaActionType::CLIPREGION ): @@ -1779,6 +1780,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) case( MetaActionType::MAPMODE ): { bMap++; + SAL_FALLTHROUGH; } // fall-through case( MetaActionType::REFPOINT ): diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx b/filter/source/graphicfilter/idxf/dxfentrd.cxx index 755b9df2bc78..85508ac2d1cc 100644 --- a/filter/source/graphicfilter/idxf/dxfentrd.cxx +++ b/filter/source/graphicfilter/idxf/dxfentrd.cxx @@ -699,7 +699,7 @@ void DXFHatchEntity::EvaluateGroup( DXFGroupReader & rDGR ) case 92: nCurrentBoundaryPathIndex++; - //fallthrough + SAL_FALLTHROUGH; default: { bool bExecutingGroupCode = false; diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 26b73206ec01..ff578ac5f44a 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -698,11 +698,11 @@ void OS2METReader::SetPen( const Color& rColor, sal_uInt16 nLineWidth, PenStyle break; case PEN_DASHDOT : nDashCount++; - //fall-through + SAL_FALLTHROUGH; case PEN_DOT : nDotCount++; nDashCount--; - //fall-through + SAL_FALLTHROUGH; case PEN_DASH : nDashCount++; aLineInfo.SetDotCount( nDotCount ); diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx index b54a1f74ad04..c84a60601001 100644 --- a/filter/source/graphicfilter/ipbm/ipbm.cxx +++ b/filter/source/graphicfilter/ipbm/ipbm.cxx @@ -155,7 +155,7 @@ bool PBMReader::ImplReadHeader() { case '1' : mbRaw = false; - //fall-through + SAL_FALLTHROUGH; case '4' : mnMode = 0; nMax = 2; // number of parameters in Header @@ -163,14 +163,14 @@ bool PBMReader::ImplReadHeader() break; case '2' : mbRaw = false; - //fall-through + SAL_FALLTHROUGH; case '5' : mnMode = 1; nMax = 3; break; case '3' : mbRaw = false; - //fall-through + SAL_FALLTHROUGH; case '6' : mnMode = 2; nMax = 3; diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx index d6213de3be19..3556aa71c6e0 100644 --- a/filter/source/graphicfilter/ipsd/ipsd.cxx +++ b/filter/source/graphicfilter/ipsd/ipsd.cxx @@ -241,7 +241,7 @@ bool PSDReader::ImplReadHeader() case PSD_DUOTONE : // we'll handle the duotone color like a normal grayscale picture m_rPSD.SeekRel( nColorLength ); nColorLength = 0; - /* Fall through */ + SAL_FALLTHROUGH; case PSD_GRAYSCALE : { if ( nColorLength ) diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 74268e99bd25..a53aa3123649 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -758,11 +758,11 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi switch ( aPlaceholderAtom.nPlaceholderId ) { case PptPlaceholder::MASTERSLIDENUMBER : nHeaderFooterInstance++; - // fall-through + SAL_FALLTHROUGH; case PptPlaceholder::MASTERFOOTER : nHeaderFooterInstance++; - // fall-through + SAL_FALLTHROUGH; case PptPlaceholder::MASTERHEADER : nHeaderFooterInstance++; - // fall-through + SAL_FALLTHROUGH; case PptPlaceholder::MASTERDATE : nHeaderFooterInstance++; break; default: break; @@ -6436,13 +6436,13 @@ void PPTFieldEntry::GetDateTime( const sal_uInt32 nVal, SvxDateFormat& eDateForm break; case 7: eDateFormat = SVXDATEFORMAT_A; - //fall-through + SAL_FALLTHROUGH; case 9: eTimeFormat = SVXTIMEFORMAT_24_HM; break; case 8: eDateFormat = SVXDATEFORMAT_A; - //fall-through + SAL_FALLTHROUGH; case 11: eTimeFormat = SVXTIMEFORMAT_12_HM; break; @@ -6552,7 +6552,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport { case PPT_NOTEPAGE : nInstance++; - // fall-through + SAL_FALLTHROUGH; case PPT_MASTERPAGE : nInstance++; case PPT_SLIDEPAGE : diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx index 687411198c08..673a948b95c5 100644 --- a/filter/source/msfilter/util.cxx +++ b/filter/source/msfilter/util.cxx @@ -479,7 +479,7 @@ EquationResult Read_SubF_Combined(WW8ReadFieldParams& rReadParam) break; } (void)rReadParam.SkipToNextToken(); - // intentional fall-through + SAL_FALLTHROUGH; case -2: { if ( rReadParam.GetResult().startsWithIgnoreAsciiCase("(") ) diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 4c7153221ada..c96981e2abe2 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -2331,7 +2331,7 @@ IMPL_LINK_TYPED( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void ) aDate.SetDay( i ); sDate += SvxDateField::GetFormatted( aDate, eDateFormat, *pNumberFormatter, eLang ); } - // No break here! We need months too! + SAL_FALLTHROUGH; // We need months too! case SVXDATEFORMAT_C: // 13.Feb 1996 case SVXDATEFORMAT_D: // 13.February 1996 for( sal_uInt16 i = 1; i <= 12; ++i ) // we get all months in a year |