diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-05-10 14:49:37 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-05-10 14:57:26 +0200 |
commit | 0f3ac23d732239b50207cfbb8cf810ef41fa9835 (patch) | |
tree | a338a71c043dfa71e9de3c6cdc5b239b5f4b04a3 /sw | |
parent | 356cef643585469d17232543e4cb98ee4f3c225b (diff) |
Insert explicit "break" when falling through to empty next case
...which itself only contains a "break" (or nothing at all at the end of the
"switch"), as otherwise Clang -Wimplicit-fallthrough would warn about these.
Change-Id: I25c1cf2ca74dfeba7ca0385ca8f1c1bf30bbf91b
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/flowfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/tox/tox.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/html/htmlsect.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/html/svxcss1.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/config/optload.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 11 | ||||
-rw-r--r-- | sw/source/uibase/shells/tabsh.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxvw.cxx | 2 |
13 files changed, 28 insertions, 6 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 146454223359..c9698bd34fb1 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -194,6 +194,7 @@ bool SwFlowFrame::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKee case SVX_BREAK_PAGE_BOTH: { bKeep = false; + break; } default: break; } @@ -247,6 +248,7 @@ bool SwFlowFrame::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKee case SVX_BREAK_PAGE_BEFORE: case SVX_BREAK_PAGE_BOTH: bKeep = false; + break; default: break; } } diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index f13961a3a6f6..171755e310f1 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -635,6 +635,7 @@ OUString SwFormToken::GetString() const { sData = OUString::number( nAuthorityField ) + sData; } + break; default: break; } diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 03f333377096..c3703db5f670 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -820,8 +820,9 @@ void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd, if( bFormatBreak ) pDestContentNd->SetAttr( *pItem ); pSrcContentNd->ResetAttr( RES_BREAK ); + break; default: - ; + break; } } } diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 068cba4a6267..0d64d8b68bc0 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -3726,8 +3726,9 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, case SVX_BREAK_PAGE_BOTH: pFrameFormat->SetFormatAttr( *pItem2 ); pOldTextNd->ResetAttr( RES_BREAK ); + break; default: - ; + break; } } } diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 41c9da144c86..23fce2fd99b7 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -1264,9 +1264,10 @@ static void ParseCSS1_font_variant( const CSS1Expression *pExpr, rItemSet.Put( SvxCaseMapItem( (SvxCaseMap)nCaseMap, aItemIds.nCaseMap ) ); } + break; } default: - ; + break; } } @@ -1290,9 +1291,10 @@ static void ParseCSS1_text_transform( const CSS1Expression *pExpr, rItemSet.Put( SvxCaseMapItem( (SvxCaseMap)nCaseMap, aItemIds.nCaseMap ) ); } + break; } default: - ; + break; } } diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 4bb1527e4719..8bee90926d3a 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2553,6 +2553,7 @@ void DocxAttributeOutput::StartRedline( const SwRedlineData * pRedlineData ) case nsRedlineType_t::REDLINE_FORMAT: OSL_TRACE( "TODO DocxAttributeOutput::StartRedline()" ); + break; default: break; } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index a6346c37a34f..97240285f392 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -786,6 +786,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, case mso_txflHorzA: bVerticalText = true; nTextRotationAngle = 9000; + break; case mso_txflHorzN: default : break; diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index aaa4ed4c36e3..dfe1b5df6234 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -1304,6 +1304,7 @@ short WW8_BRCVer9::DetermineBorderProperties(short *pSpace) const case 5: case 22: OSL_FAIL("Can't create these from the menus, please report"); + break; default: case 23: //Only 3pt in the menus, but honours the size setting. break; diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index f21acd041aeb..4fa9271e39da 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -99,6 +99,7 @@ SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet) // use only these metrics sal_Int32 nPos = m_pMetricLB->InsertEntry( sMetric ); m_pMetricLB->SetEntryData( nPos, reinterpret_cast<void*>((sal_IntPtr)eFUnit) ); + break; } default:; //prevent warning } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 22742be8613d..9a0d509bfa02 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -155,6 +155,7 @@ SwContentOptPage::SwContentOptPage( vcl::Window* pParent, sal_Int32 nPos = m_pVMetric->InsertEntry( sMetric ); m_pVMetric->SetEntryData( nPos, reinterpret_cast<void*>((sal_IntPtr)eFUnit) ); } + break; } default:;//prevent warning } diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index d948c5d29906..b1795c156462 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -578,7 +578,10 @@ void SwDocStyleSheet::SetHidden( bool bValue ) bChg = true; } } - default:; + break; + + default: + break; } if( bChg ) @@ -625,7 +628,9 @@ bool SwDocStyleSheet::IsHidden( ) const SwNumRule* pRule = rDoc.FindNumRulePtr( aName ); bRet = pRule && pRule->IsHidden( ); } - default:; + break; + default: + break; } return bRet; @@ -717,6 +722,7 @@ bool SwDocStyleSheet::HasParentSupport() const case SfxStyleFamily::Char : case SfxStyleFamily::Para : case SfxStyleFamily::Frame: bRet = true; + break; default:; //prevent warning } return bRet; @@ -730,6 +736,7 @@ bool SwDocStyleSheet::HasClearParentSupport() const case SfxStyleFamily::Para : case SfxStyleFamily::Char : case SfxStyleFamily::Frame: bRet = true; + break; default:; //prevent warning } return bRet; diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index d686b78ac472..91199fc84878 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -1009,6 +1009,7 @@ void SwTableShell::Execute(SfxRequest &rReq) case HEADLINE_BOXATTRCOPY: case HEADLINE_BOXATRCOLLCOPY: rSh.SplitTable(pType->GetValue()) ; + break; default: ;//wrong parameter, do nothing } } diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 3411f39c5a98..c3b98384bc73 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -1436,6 +1436,7 @@ OUString SwXTextViewCursor::getString() SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCursor = rSh.GetCursor(); SwUnoCursorHelper::GetTextFromPam(*pShellCursor, uRet); + break; } default:;//prevent warning } @@ -1467,6 +1468,7 @@ void SwXTextViewCursor::setString(const OUString& aString) SwWrtShell& rSh = m_pView->GetWrtShell(); SwCursor* pShellCursor = rSh.GetSwCursor(); SwUnoCursorHelper::SetString(*pShellCursor, aString); + break; } default:;//prevent warning } |