summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-10 16:42:16 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-10 16:42:16 +0200
commit14cd5182c5f64c43581c82db8c958369152226ac (patch)
tree57f150ba2707f29214eeb9b1eaad2373780d1b15 /filter
parentNote pull request for boost patch (diff)
downloadcore-14cd5182c5f64c43581c82db8c958369152226ac.tar.gz
core-14cd5182c5f64c43581c82db8c958369152226ac.zip
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 'filter')
-rw-r--r--filter/source/flash/swfwriter1.cxx4
-rw-r--r--filter/source/graphicfilter/idxf/dxfentrd.cxx2
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx4
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx6
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx2
-rw-r--r--filter/source/msfilter/svdfppt.cxx12
-rw-r--r--filter/source/msfilter/util.cxx2
-rw-r--r--filter/source/svg/svgexport.cxx2
8 files changed, 17 insertions, 17 deletions
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index b113e31dd424..7ad1513f9838 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -1766,8 +1766,8 @@ 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:
case MetaActionType::ISECTREGIONCLIPREGION:
case MetaActionType::MOVECLIPREGION:
@@ -1779,8 +1779,8 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case MetaActionType::MAPMODE:
{
bMap++;
+ SAL_FALLTHROUGH;
}
- // fall-through
case MetaActionType::REFPOINT:
case MetaActionType::LINECOLOR:
case MetaActionType::FILLCOLOR:
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 05ec943ec754..f481f5ed272a 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 58d376ed564e..7cdc3e1cd795 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -156,7 +156,7 @@ bool PBMReader::ImplReadHeader()
{
case '1' :
mbRaw = false;
- //fall-through
+ SAL_FALLTHROUGH;
case '4' :
mnMode = 0;
nMax = 2; // number of parameters in Header
@@ -164,14 +164,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 249ecfbd1557..3dcc60359387 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -242,7 +242,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 b72a6592eec1..ed227e083616 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -761,11 +761,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;
@@ -6438,13 +6438,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;
@@ -6554,7 +6554,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
{
case PPT_NOTEPAGE :
nInstance++;
- // fall-through
+ SAL_FALLTHROUGH;
case PPT_MASTERPAGE :
nInstance++;
break;
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index 1b7bac492fff..3b85e1c27061 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 18403f6eb978..acc091276c13 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -2263,7 +2263,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