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 /sw/source/filter/html/swhtml.cxx | |
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 'sw/source/filter/html/swhtml.cxx')
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 0c540768acfb..6b0f99bb93c1 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -1238,7 +1238,7 @@ void SwHTMLParser::NextToken( int nToken ) case HTML_UNKNOWNCONTROL_OFF: if( m_aUnknownToken != sSaveToken ) return; - //fall-through + SAL_FALLTHROUGH; case HTML_FRAMESET_ON: case HTML_HEAD_OFF: case HTML_BODY_ON: @@ -2012,7 +2012,7 @@ void SwHTMLParser::NextToken( int nToken ) !sSaveToken.isEmpty() && '!' != sSaveToken[0] && '%' != sSaveToken[0] ) m_aUnknownToken = sSaveToken; - // no break + SAL_FALLTHROUGH; default: bInsertUnknown = m_bKeepUnknown; @@ -2051,7 +2051,7 @@ static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr, { case RES_CHRATR_FONT: rFont = true; - //fall-through + SAL_FALLTHROUGH; case RES_CHRATR_FONTSIZE: case RES_CHRATR_LANGUAGE: case RES_CHRATR_POSTURE: @@ -2061,7 +2061,7 @@ static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr, break; case RES_CHRATR_CJK_FONT: rFont = true; - //fall-through + SAL_FALLTHROUGH; case RES_CHRATR_CJK_FONTSIZE: case RES_CHRATR_CJK_LANGUAGE: case RES_CHRATR_CJK_POSTURE: @@ -2071,7 +2071,7 @@ static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr, break; case RES_CHRATR_CTL_FONT: rFont = true; - //fall-through + SAL_FALLTHROUGH; case RES_CHRATR_CTL_FONTSIZE: case RES_CHRATR_CTL_LANGUAGE: case RES_CHRATR_CTL_POSTURE: @@ -2873,7 +2873,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable, } OSL_ENSURE( false, "LRSpace ueber mehrere Absaetze gesetzt!" ); - // no break (shouldn't reach this point anyway) + SAL_FALLTHROUGH; // (shouldn't reach this point anyway) // tdf#94088 expand RES_BACKGROUND to the new fill attribute // definitions in the range [XATTR_FILL_FIRST .. XATTR_FILL_LAST]. @@ -4158,7 +4158,7 @@ void SwHTMLParser::NewTextFormatColl( int nToken, sal_uInt16 nColl ) // Fuer dem Fall, dass ein CLASS angegeben ist, loeschen wir // es damit wir nicht die CLASS der PRE-Vorlage bekommen. aClass = aEmptyOUStr; - // fall-through + SAL_FALLTHROUGH; case HTML_BLOCKQUOTE_ON: case HTML_BLOCKQUOTE30_ON: case HTML_PREFORMTXT_ON: |