diff options
Diffstat (limited to 'sw')
85 files changed, 210 insertions, 188 deletions
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index 3fba776b7202..3af6558bec8c 100644 --- a/sw/source/core/access/accnotextframe.cxx +++ b/sw/source/core/access/accnotextframe.cxx @@ -134,8 +134,8 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem { break; } + SAL_FALLTHROUGH; } - // intentional no break here case RES_DESCRIPTION_CHANGED: { if ( pNd && GetFrame() ) diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx index 55a7ae101e4f..b8e962e1dd68 100644 --- a/sw/source/core/access/acctextframe.cxx +++ b/sw/source/core/access/acctextframe.cxx @@ -107,8 +107,8 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * { break; } + SAL_FALLTHROUGH; } - // intentionally no break here case RES_DESCRIPTION_CHANGED: { if ( pFlyFrame ) diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index 8c671de14cee..d38532e32b9c 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -248,7 +248,7 @@ void SwModify::CheckCaching( const sal_uInt16 nWhich ) case RES_FMT_CHG: case RES_ATTRSET_CHG: SetInSwFntCache( false ); - // fall through + SAL_FALLTHROUGH; case RES_UL_SPACE: case RES_LR_SPACE: case RES_BOX: diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 9df9a1c520d3..9a99b65fd34d 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -149,7 +149,7 @@ void SwTableBoxFormula::ChangeState( const SfxPoolItem* pItem ) } else pUpdateField->m_bBehindSplitLine = false; - // no break + SAL_FALLTHROUGH; case TBL_MERGETBL: if( pUpdateField->m_pHistory ) { diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx index ebcd7883f75d..3ea3732a6f18 100644 --- a/sw/source/core/attr/hints.cxx +++ b/sw/source/core/attr/hints.cxx @@ -226,9 +226,11 @@ sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript ) switch( nScript) { case i18n::ScriptType::COMPLEX: - ++pM; // no break; + ++pM; + SAL_FALLTHROUGH; case i18n::ScriptType::ASIAN: - ++pM; // no break; + ++pM; + SAL_FALLTHROUGH; default: nRet = *pM; } diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 634d8bb72dfb..7dd29d42c0b3 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1934,7 +1934,7 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode ) if (!sInsert.isEmpty()) GetDoc()->getIDocumentContentOperations().InsertString( *m_pCurrentCursor, sInsert.makeStringAndClear()); } - // no break - still need to set orientation + SAL_FALLTHROUGH; // still need to set orientation case FILL_MARGIN: if( text::HoriOrientation::NONE != aFPos.eOrient ) { diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 199ccccfde13..eed622297f2f 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -176,7 +176,7 @@ SwFieldType* DocumentFieldsManager::InsertFieldType(const SwFieldType &rFieldTyp //constructing string pools and when reading SetExp fields if( nsSwGetSetExpType::GSE_SEQ & static_cast<const SwSetExpFieldType&>(rFieldTyp).GetType() ) i -= INIT_SEQ_FLDTYPES; - // no break; + SAL_FALLTHROUGH; case RES_DBFLD: case RES_USERFLD: case RES_DDEFLD: @@ -308,7 +308,7 @@ void DocumentFieldsManager::RemoveFieldType(size_t nField) case RES_SETEXPFLD: case RES_USERFLD: mpUpdateFields->RemoveFieldType( *pTmp ); - // no break; + SAL_FALLTHROUGH; case RES_DDEFLD: if( pTmp->HasWriterListeners() && !m_rDoc.IsUsed( *pTmp ) ) { @@ -547,7 +547,7 @@ bool DocumentFieldsManager::UpdateField(SwTextField * pDstTextField, SwField & r pDBField->InitContent(); } #endif - // no break; + SAL_FALLTHROUGH; default: pDstFormatField->ModifyNotification( nullptr, pMsgHint ); diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx index 72978cebac7e..c5380df0b3de 100644 --- a/sw/source/core/doc/DocumentLayoutManager.cxx +++ b/sw/source/core/doc/DocumentLayoutManager.cxx @@ -120,7 +120,7 @@ SwFrameFormat *DocumentLayoutManager::MakeLayoutFormat( RndStdIds eRequest, cons case RND_STD_HEADERR: { bHeader = true; - // no break, we continue further down + SAL_FALLTHROUGH; } case RND_STD_FOOTER: case RND_STD_FOOTERL: diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 5fb77d1315c1..bbb9fba6c623 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -1187,7 +1187,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall bCompress = true; mpRedlineTable->DeleteAndDestroy( n ); bDec = true; - // no break! + SAL_FALLTHROUGH; case POS_INSIDE: if( bCallDelete ) diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index d7cab28d9280..3592073ef72f 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1979,7 +1979,7 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline) case POS_EQUAL: delete pDestRedl; pDestRedl = nullptr; - // break; -> no break !!!! + SAL_FALLTHROUGH; case POS_COLLIDE_END: case POS_BEFORE: diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 0d141d29a06c..2734f8dcdf58 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -482,7 +482,7 @@ void SwDoc::GetAllUsedDB( std::vector<OUString>& rDBNameList, case RES_DBNEXTSETFLD: AddUsedDBToList( rDBNameList, lcl_DBDataToString(static_cast<const SwDBNameInfField*>(pField)->GetRealDBData() )); - // no break // JP: is that right like that? + SAL_FALLTHROUGH; // JP: is that right like that? case RES_HIDDENTXTFLD: case RES_HIDDENPARAFLD: @@ -662,7 +662,7 @@ void SwDoc::ChangeDBFields( const std::vector<OUString>& rOldNames, { static_cast<SwDBNameInfField*>(pField)->SetDBData(aNewDBData); } - // no break; + SAL_FALLTHROUGH; case RES_HIDDENTXTFLD: case RES_HIDDENPARAFLD: pField->SetPar1( ReplaceUsedDBs(rOldNames, rNewName, pField->GetPar1()) ); diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index c2ae5a0baf03..ae17ec2bec16 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -416,7 +416,7 @@ lcl_SetFlyFrameAttr(SwDoc & rDoc, case RES_CNTNT: case RES_FOOTER: OSL_FAIL( "Unknown Fly attribute." ); - // no break; + SAL_FALLTHROUGH; case RES_CHAIN: rSet.ClearItem( nWhich ); break; @@ -797,7 +797,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, } aNewAnch.SetType( FLY_AT_PAGE ); - // no break + SAL_FALLTHROUGH; } case FLY_AT_PAGE: { diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index e1109c52e042..3c9929f62292 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -675,7 +675,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, { case LTYPE_TABLE: bTable = true; - // no break here + SAL_FALLTHROUGH; case LTYPE_FLY: // At the FlySection's Beginning/End insert the corresponding Node with its Field. // The Frame is created automatically. diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index d92ee5c36149..d5546626c502 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -281,7 +281,7 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_uInt1 case UnicodeType::OTHER_LETTER: bChkNxtWrd = true; - //fall-through + SAL_FALLTHROUGH; default: bIsAlphaNum = false; break; diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 0cc41d437305..d7a239e082a2 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -258,7 +258,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark, case TOX_SAME_PRV: if( pTOXMark->GetText() != rCurTOXMark.GetText() ) break; - /* no break here */ + SAL_FALLTHROUGH; case TOX_PRV: if ( (aAbsNew < aAbsIdx && aAbsNew > aPrevPos) || (aAbsIdx == aAbsNew && @@ -280,7 +280,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark, case TOX_SAME_NXT: if( pTOXMark->GetText() != rCurTOXMark.GetText() ) break; - /* no break here */ + SAL_FALLTHROUGH; case TOX_NXT: if ( (aAbsNew > aAbsIdx && aAbsNew < aNextPos) || (aAbsIdx == aAbsNew && diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 3aa513caeddf..d391bfa4534c 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -607,7 +607,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) if (GetNode()->GetNodeType() != ND_GRFNODE) { break; } - // fall through + SAL_FALLTHROUGH; case RES_FMT_CHG: CLEARCACHE break; diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index ca223b0093c1..404167e22410 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -4161,7 +4161,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, pLines = &pLine->GetUpper()->GetTabLines(); nBaseLinePos = pLines->GetPos( pLine ); pBaseLine = pLine; - // no break! + SAL_FALLTHROUGH; case nsTableChgWidthHeightType::WH_ROW_TOP: case nsTableChgWidthHeightType::WH_ROW_BOTTOM: diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index d3196bfc0c91..9863205d253b 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -698,7 +698,7 @@ bool SwNodes::MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, --aIdx; break; } - // no break !! + SAL_FALLTHROUGH; case ND_TABLENODE: case ND_STARTNODE: { diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 5390d3e9e305..c1a699190d3c 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -782,7 +782,7 @@ void SwSectionFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) case RES_SECTION_RESETHIDDENFLAG: case RES_FTN_AT_TXTEND: case RES_END_AT_TXTEND : bClients = true; - // no break !! + SAL_FALLTHROUGH; case RES_SECTION_HIDDEN: case RES_SECTION_NOT_HIDDEN: { diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index c93ca939e506..853c40aacfc4 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1254,7 +1254,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj, } } } - // fallthrough intended here + SAL_FALLTHROUGH; } case SDRUSERCALL_MOVEONLY: case SDRUSERCALL_RESIZE: diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index aab512412ac1..c75e90dcc837 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -2004,7 +2004,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) case '?': if( m_aFlags.bCapitalStartSentence ) bFirstSent = true; - /* fallthrough */ + SAL_FALLTHROUGH; default: if( !( rAppCC.isLetterNumeric( *pText, nPos ) || '/' == cChar )) // '/' should not be a word separator (e.g. '1/2' needs to be handled as one word for replacement) diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 0367dd701cf5..eddbe82046a8 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -178,7 +178,7 @@ static bool lcl_FindAnchorPos( } aNewAnch.SetType( nNew = FLY_AT_PAGE ); - // no break + SAL_FALLTHROUGH; case FLY_AT_PAGE: pNewAnch = rFrame.FindPageFrame(); diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 9759ede9c7d3..866f8122136c 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -389,7 +389,8 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) if( pos != *aAnch.GetContentAnchor()) aAnch.SetAnchor( &pos ); } - } // no break! + SAL_FALLTHROUGH; + } case FLY_AT_PARA: { OSL_ENSURE( pOld->IsContentFrame(), "Wrong anchor, page expected." ); diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index ed30212c2177..c15266976511 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -109,7 +109,8 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, bool bFrame = true; switch ( eType ) { - case RECT_PAGE_PRT: bFrame = false; /* no break */ + case RECT_PAGE_PRT: bFrame = false; + SAL_FALLTHROUGH; case RECT_PAGE : pFrame = pFrame->FindPageFrame(); break; @@ -118,7 +119,8 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, pFrame->Calc(Imp()->GetShell()->GetOut()); break; - case RECT_FLY_PRT_EMBEDDED: bFrame = false; /* no break */ + case RECT_FLY_PRT_EMBEDDED: bFrame = false; + SAL_FALLTHROUGH; case RECT_FLY_EMBEDDED: pFrame = xObj.is() ? FindFlyFrame( xObj ) : pFrame->IsFlyFrame() ? pFrame @@ -131,7 +133,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, else { OSL_FAIL( "Missing Table" ); } - /* no break */ + SAL_FALLTHROUGH; case RECT_SECTION_PRT: case RECT_SECTION: if( pFrame->IsInSct() ) pFrame = pFrame->FindSctFrame(); @@ -144,7 +146,8 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, bFrame = false; break; - case RECT_HEADERFOOTER_PRT: bFrame = false; /* no break */ + case RECT_HEADERFOOTER_PRT: bFrame = false; + SAL_FALLTHROUGH; case RECT_HEADERFOOTER: if( nullptr == (pFrame = pFrame->FindFooterOrHeader()) ) return GetLayout()->Frame(); break; @@ -752,7 +755,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { case text::RelOrientation::PAGE_RIGHT: case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrame->Prt().Height(); - // no break! + SAL_FALLTHROUGH; case text::RelOrientation::PRINT_AREA: case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() += pFrame->Prt().Top(); break; default: break; @@ -764,7 +767,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { case text::RelOrientation::PRINT_AREA: case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->Prt().Width(); - // no break + SAL_FALLTHROUGH; case text::RelOrientation::PAGE_RIGHT: case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->Prt().Left(); break; default: aPos.X() += pFrame->Frame().Width(); @@ -776,7 +779,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { case text::RelOrientation::PRINT_AREA: case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->Prt().Width(); - // no break! + SAL_FALLTHROUGH; case text::RelOrientation::PAGE_LEFT: case text::RelOrientation::FRAME_LEFT: aPos.X() += pFrame->Prt().Left() - pFrame->Frame().Width(); break; @@ -789,7 +792,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { case text::RelOrientation::PAGE_RIGHT: case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->Prt().Width(); - // no break! + SAL_FALLTHROUGH; case text::RelOrientation::PRINT_AREA: case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->Prt().Left(); break; default:break; diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 08eeee43ad9a..00eaf234d19f 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -538,7 +538,8 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uL if( nAct == ACT_START ) lcl_Flags( aOut, pFrame ); break; - case PROT_MOVE_FWD: bTmp = true; // NoBreak + case PROT_MOVE_FWD: bTmp = true; + SAL_FALLTHROUGH; case PROT_MOVE_BWD: if (nFunction == (bTmp ? 1U : 0U)) aOut.append("Fwd"); @@ -560,7 +561,8 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uL aOut.append("TestShrink"); break; case PROT_ADJUSTN : - case PROT_SHRINK: bTmp = true; // NoBreak + case PROT_SHRINK: bTmp = true; + SAL_FALLTHROUGH; case PROT_GROW: if (!bTmp) aOut.append("Grow"); @@ -601,7 +603,8 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uL break; case PROT_SECTION: SectFunc(aOut, pFrame, nAct, pParam); break; - case PROT_CUT: bTmp = true; // NoBreak + case PROT_CUT: bTmp = true; + SAL_FALLTHROUGH; case PROT_PASTE: if (bTmp) aOut.append("Cut from "); @@ -667,7 +670,8 @@ void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrame* , sal_uLong nA case ACT_MERGE: rOut.append("Merge Section "); rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam)))); break; - case ACT_CREATE_MASTER: bTmp = true; // NoBreak + case ACT_CREATE_MASTER: bTmp = true; + SAL_FALLTHROUGH; case ACT_CREATE_FOLLOW: rOut.append("Create Section "); if (bTmp) rOut.append("Master to "); @@ -675,7 +679,8 @@ void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrame* , sal_uLong nA rOut.append("Follow from "); rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam)))); break; - case ACT_DEL_MASTER: bTmp = true; // NoBreak + case ACT_DEL_MASTER: bTmp = true; + SAL_FALLTHROUGH; case ACT_DEL_FOLLOW: rOut.append("Delete Section "); if (bTmp) rOut.append("Master to "); diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index e42eefd94f31..314888841ec5 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -1055,7 +1055,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, else if ( GetPrevLink() ) SwFlyFrame::UnchainFrames( GetPrevLink(), this ); } - //fall-through + SAL_FALLTHROUGH; default: bClear = false; } diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 0df9377d93a7..278894cd6080 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -589,8 +589,9 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, if( rOldF != rNewF ) rInvFlags |= 0x10; CheckDirChange(); + + SAL_FALLTHROUGH; } - // no break case RES_FRM_SIZE: { const SwRect aOldPageFrameRect( Frame() ); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 9e57affa15fe..f645fcdde313 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -3180,7 +3180,7 @@ void SwTabFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, break; case RES_UL_SPACE: rInvFlags |= 0x1C; - /* no break here */ + SAL_FALLTHROUGH; default: bClear = false; diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index f5dd429a0d80..9f04d848aff7 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -276,7 +276,7 @@ void SwFrame::UpdateAttrFrame( const SfxPoolItem *pOld, const SfxPoolItem *pNew, case RES_BOX: case RES_SHADOW: Prepare( PREP_FIXSIZE_CHG ); - // no break here! + SAL_FALLTHROUGH; case RES_LR_SPACE: case RES_UL_SPACE: rInvFlags |= 0x0B; @@ -2008,7 +2008,7 @@ void SwContentFrame::UpdateAttr_( const SfxPoolItem* pOld, const SfxPoolItem* pN { case RES_FMT_CHG: rInvFlags = 0xFF; - /* no break here */ + SAL_FALLTHROUGH; case RES_PAGEDESC: //attribute changes (on/off) if ( IsInDocBody() && !IsInTab() ) @@ -2058,7 +2058,7 @@ void SwContentFrame::UpdateAttr_( const SfxPoolItem* pOld, const SfxPoolItem* pN } Prepare( PREP_UL_SPACE ); //TextFrame has to correct line spacing. rInvFlags |= 0x80; - /* no break here */ + SAL_FALLTHROUGH; } case RES_LR_SPACE: case RES_BOX: @@ -2129,7 +2129,7 @@ void SwContentFrame::UpdateAttr_( const SfxPoolItem* pOld, const SfxPoolItem* pN case RES_FRM_SIZE: rInvFlags |= 0x01; - /* no break here */ + SAL_FALLTHROUGH; default: bClear = false; diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index d3bcf7f003c8..afd00eb3389a 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -653,7 +653,7 @@ void SwAnchoredObjectPosition::GetHoriAlignmentValues( const SwFrame& _rHoriOri (ToCharOrientFrame()->Frame().*fnRect->fnGetLeft)() ); break; } - // no break! + SAL_FALLTHROUGH; } case text::RelOrientation::PAGE_PRINT_AREA: { diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 0d9a088ae755..c01d474488e7 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -278,8 +278,8 @@ void SwToContentAnchoredObjectPosition::CalcPosition() } break; } + SAL_FALLTHROUGH; } - // no break here case text::VertOrientation::TOP: { // #i22341# - special case for vertical diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 156591407742..acc48ea81c27 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1562,7 +1562,7 @@ sal_Int32 SwTextFormatInfo::ScanPortionEnd( const sal_Int32 nStart, case CH_TXTATR_INWORD: if( !HasHint( i )) break; - // no break; + SAL_FALLTHROUGH; case CHAR_SOFTHYPHEN: case CHAR_HARDHYPHEN: diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index eb4d9839ac1c..4adfddceef88 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1325,7 +1325,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) pPor = NewExtraPortion( rInf ); break; } - // No break + SAL_FALLTHROUGH; default : { SwTabPortion* pLastTabPortion = rInf.GetLastTab(); diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index fb891a39e4ee..c8ac92c94ece 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -379,7 +379,7 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf ) switch (nNew) { case CH_BREAK : bFull = true; - // no break + SAL_FALLTHROUGH; case ' ' : case CH_TAB : case CHAR_HARDHYPHEN: // non-breaking hyphen @@ -1275,16 +1275,20 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf ) nBotDiff = ( Width() - nMaxWidth ) / 2; switch( nTop) { - case 3: aPos[1] = aPos[0] + nTopDiff; // no break + case 3: aPos[1] = aPos[0] + nTopDiff; + SAL_FALLTHROUGH; case 2: aPos[nTop-1] = Width() - aPos[nTop-1]; } aPos[0] = 0; switch( nCount ) { - case 5: aPos[4] = aPos[3] + nBotDiff; // no break + case 5: aPos[4] = aPos[3] + nBotDiff; + SAL_FALLTHROUGH; case 3: aPos[nTop] = nBotDiff; break; - case 6: aPos[4] = aPos[3] + nBotDiff; // no break - case 4: aPos[nTop] = 0; // no break + case 6: aPos[4] = aPos[3] + nBotDiff; + SAL_FALLTHROUGH; + case 4: aPos[nTop] = 0; + SAL_FALLTHROUGH; case 2: aPos[nCount-1] = Width() - aPos[nCount-1]; } diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 14d904ecbe2d..616b5de23d23 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -641,9 +641,11 @@ void SwRubyPortion::Adjust_( SwTextFormatInfo &rInf ) sal_Int32 nSub = 0; switch ( nAdjustment ) { - case 1: nRight = static_cast<sal_uInt16>(nLineDiff / 2); // no break + case 1: nRight = static_cast<sal_uInt16>(nLineDiff / 2); + SAL_FALLTHROUGH; case 2: nLeft = static_cast<sal_uInt16>(nLineDiff - nRight); break; - case 3: nSub = 1; // no break + case 3: nSub = 1; + SAL_FALLTHROUGH; case 4: { sal_Int32 nCharCnt = 0; diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 9b1a55af3c59..0315849dd654 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1524,7 +1524,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid, Prt().Height(0); InvalidatePrt_(); InvalidateSize_(); - /* no break here */ + SAL_FALLTHROUGH; case PREP_ADJUST_FRM : pPara->SetPrepAdjust(); if( IsFootnoteNumFrame() != pPara->IsFootnoteNum() || IsUndersized() ) @@ -1535,7 +1535,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid, } break; case PREP_MUST_FIT : pPara->SetPrepMustFit(); - /* no break here */ + SAL_FALLTHROUGH; case PREP_WIDOWS_ORPHANS : pPara->SetPrepAdjust(); break; @@ -1782,7 +1782,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid, InvalidateRange( SwCharRange( nWhere, 1 ) ); return bParaPossiblyInvalid; } - // else: continue with default case block + SAL_FALLTHROUGH; // else: continue with default case block } case PREP_CLEAR: default: diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 62b8024e2d82..99b7768f9cdb 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -184,7 +184,7 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere, aTmp = *pNd->StartOfSectionNode(); break; } - // no break !!! + SAL_FALLTHROUGH; default: if( rWhere == aTmp ) aTmp -= 2; diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index d6cc66eda27d..fa2f73cf0fd9 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1160,7 +1160,7 @@ void SwTextNode::DestroyAttr( SwTextAttr* pAttr ) { case RES_HIDDENPARAFLD: SetCalcHiddenParaField(); - // no break + SAL_FALLTHROUGH; case RES_DBSETNUMBERFLD: case RES_GETEXPFLD: case RES_DBFLD: diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 5d19885997b6..5a3805b15a71 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1360,7 +1360,8 @@ SwRect SwTextFrame::AutoSpell_( const SwContentNode* pActNode, sal_Int32 nActPos pNode->GetWrong()->Insert(OUString(), nullptr, nBegin, nLen, nInsertPos++); break; case SwWrongList::FreshState::CURSOR: - bPending = true; // fall-through to mark as invalid + bPending = true; + SAL_FALLTHROUGH; // to mark as invalid case SwWrongList::FreshState::NOTHING: nInvStart = nBegin; nInvEnd = nBegin + nLen; diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 52c5a11939c3..d7e6cb7e4c3d 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -252,7 +252,7 @@ bool SwUndoFormatAttr::IsFormatInDoc( SwDoc* pDoc ) } } } - // no break! + SAL_FALLTHROUGH; case RES_DRAWFRMFMT: case RES_FLYFRMFMT: bFound = pDoc->GetSpzFrameFormats()->Contains( m_pFormat ); @@ -378,7 +378,7 @@ void SwUndoFormatAttr::SaveFlyAnchor( bool bSvDrwPt ) case FLY_AS_CHAR: case FLY_AT_CHAR: nContent = rAnchor.GetContentAnchor()->nContent.GetIndex(); - // fallthrough + SAL_FALLTHROUGH; case FLY_AT_PARA: case FLY_AT_FLY: m_nNodeIndex = rAnchor.GetContentAnchor()->nNode.GetIndex(); diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index b45a5b309082..5197045dc862 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -645,7 +645,7 @@ void SwUndoSetFlyFormat::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem ) case FLY_AS_CHAR: case FLY_AT_CHAR: nOldContent = pAnchor->GetContentAnchor()->nContent.GetIndex(); - //fall-through + SAL_FALLTHROUGH; case FLY_AT_PARA: case FLY_AT_FLY: nOldNode = pAnchor->GetContentAnchor()->nNode.GetIndex(); @@ -661,7 +661,7 @@ void SwUndoSetFlyFormat::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem ) case FLY_AS_CHAR: case FLY_AT_CHAR: nNewContent = pAnchor->GetContentAnchor()->nContent.GetIndex(); - //fall-through + SAL_FALLTHROUGH; case FLY_AT_PARA: case FLY_AT_FLY: nNewNode = pAnchor->GetContentAnchor()->nNode.GetIndex(); diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index ba2f3268d17a..f6d17a1688c9 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -2880,7 +2880,7 @@ SwUndoSplitTable::SwUndoSplitTable( const SwTableNode& rTableNd, { case HEADLINE_BOXATRCOLLCOPY: pHistory = new SwHistory; - // no break + SAL_FALLTHROUGH; case HEADLINE_BORDERCOPY: case HEADLINE_BOXATTRCOPY: pSavTable = new SaveTable( rTableNd.GetTable(), 1, false ); @@ -2931,7 +2931,7 @@ void SwUndoSplitTable::UndoImpl(::sw::UndoRedoContext & rContext) case HEADLINE_BOXATRCOLLCOPY: if( pHistory ) pHistory->TmpRollback( pDoc, nFormulaEnd ); - // no break + SAL_FALLTHROUGH; case HEADLINE_BOXATTRCOPY: case HEADLINE_BORDERCOPY: { diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index e16bb4d642c9..6f5ade66ee98 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -348,7 +348,7 @@ static void AddUnitPropertyValue(OStringBuffer &rOut, long nVal, { case FUNIT_100TH_MM: OSL_ENSURE( FUNIT_MM == eUnit, "Measuring unit not supported" ); - //fall-through + SAL_FALLTHROUGH; case FUNIT_MM: // 0.01mm = 0.57twip nMul = 25400; // 25.4 * 1000 @@ -360,7 +360,7 @@ static void AddUnitPropertyValue(OStringBuffer &rOut, long nVal, case FUNIT_M: case FUNIT_KM: OSL_ENSURE( FUNIT_CM == eUnit, "Measuring unit not supported" ); - //fall-through + SAL_FALLTHROUGH; case FUNIT_CM: // 0.01cm = 5.7twip (not exact, but the UI is also not exact) nMul = 2540; // 2.54 * 1000 @@ -371,7 +371,7 @@ static void AddUnitPropertyValue(OStringBuffer &rOut, long nVal, case FUNIT_TWIP: OSL_ENSURE( FUNIT_POINT == eUnit, "Measuring unit not supported" ); - //fall-through + SAL_FALLTHROUGH; case FUNIT_POINT: // 0.1pt = 2.0twip (not exact, but the UI is also not exact) nMul = 100; diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 13fb7a76cd94..008c5163eb47 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -1284,7 +1284,7 @@ void SwHTMLParser::NewForm( bool bAppend ) case HTML_O_SDONSUBMIT: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONSUBMIT: nEvent = HTML_ET_ONSUBMITFORM; bSetEvent = true; @@ -1292,7 +1292,7 @@ void SwHTMLParser::NewForm( bool bAppend ) case HTML_O_SDONRESET: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONRESET: nEvent = HTML_ET_ONRESETFORM; bSetEvent = true; @@ -1490,7 +1490,7 @@ void SwHTMLParser::InsertInput() case HTML_O_SDONFOCUS: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONFOCUS: nEvent = HTML_ET_ONGETFOCUS; bSetEvent = true; @@ -1498,7 +1498,7 @@ void SwHTMLParser::InsertInput() case HTML_O_SDONBLUR: // eigtl. nur EDIT eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONBLUR: nEvent = HTML_ET_ONLOSEFOCUS; bSetEvent = true; @@ -1506,7 +1506,7 @@ void SwHTMLParser::InsertInput() case HTML_O_SDONCLICK: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONCLICK: nEvent = HTML_ET_ONCLICK; bSetEvent = true; @@ -1514,7 +1514,7 @@ void SwHTMLParser::InsertInput() case HTML_O_SDONCHANGE: // eigtl. nur EDIT eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONCHANGE: nEvent = HTML_ET_ONCHANGE; bSetEvent = true; @@ -1522,7 +1522,7 @@ void SwHTMLParser::InsertInput() case HTML_O_SDONSELECT: // eigtl. nur EDIT eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONSELECT: nEvent = HTML_ET_ONSELECT; bSetEvent = true; @@ -1947,7 +1947,7 @@ void SwHTMLParser::NewTextArea() case HTML_O_SDONFOCUS: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONFOCUS: nEvent = HTML_ET_ONGETFOCUS; bSetEvent = true; @@ -1955,7 +1955,7 @@ void SwHTMLParser::NewTextArea() case HTML_O_SDONBLUR: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONBLUR: nEvent = HTML_ET_ONLOSEFOCUS; bSetEvent = true; @@ -1963,7 +1963,7 @@ void SwHTMLParser::NewTextArea() case HTML_O_SDONCLICK: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONCLICK: nEvent = HTML_ET_ONCLICK; bSetEvent = true; @@ -1971,7 +1971,7 @@ void SwHTMLParser::NewTextArea() case HTML_O_SDONCHANGE: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONCHANGE: nEvent = HTML_ET_ONCHANGE; bSetEvent = true; @@ -1979,7 +1979,7 @@ void SwHTMLParser::NewTextArea() case HTML_O_SDONSELECT: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONSELECT: nEvent = HTML_ET_ONSELECT; bSetEvent = true; @@ -2223,7 +2223,7 @@ void SwHTMLParser::NewSelect() case HTML_O_SDONFOCUS: eScriptType2 = STARBASIC; - //fall-through + SAL_FALLTHROUGH; case HTML_O_ONFOCUS: nEvent = HTML_ET_ONGETFOCUS; bSetEvent = true; @@ -2231,7 +2231,7 @@ void SwHTMLParser::NewSelect() case HTML_O_SDONBLUR: eScriptType2 = STARBASIC; - //fall-through + SAL_FALLTHROUGH; case HTML_O_ONBLUR: nEvent = HTML_ET_ONLOSEFOCUS; bSetEvent = true; @@ -2239,7 +2239,7 @@ void SwHTMLParser::NewSelect() case HTML_O_SDONCLICK: eScriptType2 = STARBASIC; - //fall-through + SAL_FALLTHROUGH; case HTML_O_ONCLICK: nEvent = HTML_ET_ONCLICK; bSetEvent = true; @@ -2247,7 +2247,7 @@ void SwHTMLParser::NewSelect() case HTML_O_SDONCHANGE: eScriptType2 = STARBASIC; - //fall-through + SAL_FALLTHROUGH; case HTML_O_ONCHANGE: nEvent = HTML_ET_ONCHANGE; bSetEvent = true; diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 7a1607974ec9..c7c600e3e5a5 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -390,21 +390,21 @@ void SwHTMLParser::InsertImage() case HTML_O_SDONLOAD: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONLOAD: nEvent = SVX_EVENT_IMAGE_LOAD; goto IMAGE_SETEVENT; case HTML_O_SDONABORT: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONABORT: nEvent = SVX_EVENT_IMAGE_ABORT; goto IMAGE_SETEVENT; case HTML_O_SDONERROR: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONERROR: nEvent = SVX_EVENT_IMAGE_ERROR; goto IMAGE_SETEVENT; @@ -874,7 +874,7 @@ void SwHTMLParser::InsertBodyOptions() case HTML_O_SDONLOAD: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONLOAD: aEvent = GlobalEventConfig::GetEventName( GlobalEventId::OPENDOC ); bSetEvent = true; @@ -882,7 +882,7 @@ void SwHTMLParser::InsertBodyOptions() case HTML_O_SDONUNLOAD: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONUNLOAD: aEvent = GlobalEventConfig::GetEventName( GlobalEventId::PREPARECLOSEDOC ); bSetEvent = true; @@ -890,7 +890,7 @@ void SwHTMLParser::InsertBodyOptions() case HTML_O_SDONFOCUS: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONFOCUS: aEvent = GlobalEventConfig::GetEventName( GlobalEventId::ACTIVATEDOC ); bSetEvent = true; @@ -898,7 +898,7 @@ void SwHTMLParser::InsertBodyOptions() case HTML_O_SDONBLUR: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONBLUR: aEvent = GlobalEventConfig::GetEventName( GlobalEventId::DEACTIVATEDOC ); bSetEvent = true; @@ -1118,21 +1118,21 @@ void SwHTMLParser::NewAnchor() case HTML_O_SDONCLICK: eScriptType2 = STARBASIC; - //fall-through + SAL_FALLTHROUGH; case HTML_O_ONCLICK: nEvent = SFX_EVENT_MOUSECLICK_OBJECT; goto ANCHOR_SETEVENT; case HTML_O_SDONMOUSEOVER: eScriptType2 = STARBASIC; - //fall-through + SAL_FALLTHROUGH; case HTML_O_ONMOUSEOVER: nEvent = SFX_EVENT_MOUSEOVER_OBJECT; goto ANCHOR_SETEVENT; case HTML_O_SDONMOUSEOUT: eScriptType2 = STARBASIC; - //fall-through + SAL_FALLTHROUGH; case HTML_O_ONMOUSEOUT: nEvent = SFX_EVENT_MOUSEOUT_OBJECT; goto ANCHOR_SETEVENT; diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 0d64d8b68bc0..cf7e7899cbc3 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -3639,7 +3639,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, break; case SVX_ADJUST_LEFT: eSurround = SURROUND_RIGHT; - //fall-through + SAL_FALLTHROUGH; default: eHori = text::HoriOrientation::LEFT; break; @@ -3829,7 +3829,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, case HTML_TBODY_OFF: case HTML_TABLE_OFF: SkipToken(); - //fall-through + SAL_FALLTHROUGH; case HTML_TABLEHEADER_OFF: case HTML_TABLEDATA_OFF: bDone = true; @@ -4232,7 +4232,7 @@ void SwHTMLParser::BuildTableRow( HTMLTable *pCurTable, bool bReadOptions, case HTML_TFOOT_OFF: case HTML_TABLE_OFF: SkipToken(); - //fall-through + SAL_FALLTHROUGH; case HTML_TABLEROW_OFF: bDone = true; break; @@ -4405,7 +4405,7 @@ void SwHTMLParser::BuildTableSection( HTMLTable *pCurTable, case HTML_TBODY_ON: case HTML_TABLE_OFF: SkipToken(); - //fall-through + SAL_FALLTHROUGH; case HTML_THEAD_OFF: case HTML_TBODY_OFF: case HTML_TFOOT_OFF: @@ -4601,7 +4601,7 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable, case HTML_TABLEROW_ON: case HTML_TABLE_OFF: SkipToken(); - //fall-through + SAL_FALLTHROUGH; case HTML_COLGROUP_OFF: bDone = true; break; diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 9be83bfda4b0..9582d1fbc83e 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -976,7 +976,7 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, case text::HoriOrientation::LEFT_AND_WIDTH: eTabHoriOri = text::HoriOrientation::LEFT; bCheckDefList = true; - // no break + SAL_FALLTHROUGH; default: // In allen anderen Faellen kann eine absolute oder relative // Breite direkt uebernommen werden. diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx index cdb1c78c2b29..8af621102e6f 100644 --- a/sw/source/filter/html/parcss1.cxx +++ b/sw/source/filter/html/parcss1.cxx @@ -578,7 +578,7 @@ CSS1Token CSS1Parser::GetNextToken() bNextCh = false; break; } - // no break + SAL_FALLTHROUGH; default: // IDENT | syntax error if (rtl::isAsciiAlpha(cNextCh)) @@ -1043,7 +1043,7 @@ CSS1Expression *CSS1Parser::ParseDeclaration( OUString& rProperty ) case CSS1_EMX: if( '-'==cSign ) nValue = -nValue; - //fall-through + SAL_FALLTHROUGH; case CSS1_STRING: case CSS1_PERCENTAGE: case CSS1_IDENT: @@ -1312,7 +1312,7 @@ bool CSS1Expression::GetColor( Color &rColor ) const if( bRet || CSS1_STRING != eType || aValue.isEmpty() || aValue[0] != '#' ) break; - + SAL_FALLTHROUGH; case CSS1_HEXCOLOR: { // HACK fuer MS-IE: DIe Farbe kann auch in einem String stehen 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: diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index a755528e341f..b2fa8387d549 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3402,7 +3402,7 @@ void RtfAttributeOutput::WriteExpand(const SwField* pField) //#i119803# Export user field and DB field for RTF filter case RES_DBFLD: sCmd = FieldString(ww::eMERGEFIELD); - // no break !! + SAL_FALLTHROUGH; case RES_USERFLD: sCmd += pField->GetTyp()->GetName(); m_rExport.OutputField(pField, ww::eNONE, sCmd); diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 1b0086291e6f..4def1d155e85 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -3013,7 +3013,7 @@ sal_Int32 SwEscherEx::WriteTextFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId { default: OSL_ENSURE(false, "unknown direction type"); - //fall-through + SAL_FALLTHROUGH; case FRMDIR_HORI_LEFT_TOP: nFlow=mso_txflHorzN; break; diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 6b3ef7c15c94..718a1470a4db 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1205,7 +1205,7 @@ void AttributeOutputBase::TOXMark( const SwTextNode& rNode, const SwTOXMark& rAt case TOX_USER: sText += "\" \\f \"" + OUString((sal_Char)( 'A' + GetExport( ).GetId( *rAttr.GetTOXType() ) )); - // fall through - no break; + SAL_FALLTHROUGH; case TOX_CONTENT: { eType = ww::eTC; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 43d7ee9b2e89..980434e7d09b 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2337,7 +2337,7 @@ void AttributeOutputBase::GetNumberPara( OUString& rStr, const SwField& rField ) default: OSL_ENSURE(rField.GetFormat() == SVX_NUM_ARABIC, "Unknown numbering type exported as default of Arabic\n"); - //fallthrough + SAL_FALLTHROUGH; case SVX_NUM_ARABIC: rStr += "\\* ARABIC "; break; @@ -3469,7 +3469,7 @@ void AttributeOutputBase::FormatBreak( const SvxFormatBreakItem& rBreak ) case SVX_BREAK_COLUMN_BEFORE: // ColumnBreak bBefore = true; - // no break; + SAL_FALLTHROUGH; case SVX_BREAK_COLUMN_AFTER: case SVX_BREAK_COLUMN_BOTH: if ( GetExport().Sections().CurrentNumberOfColumns( *GetExport().m_pDoc ) > 1 || GetExport().SupportsOneColumnBreak() ) @@ -3569,7 +3569,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid ) { default: OSL_FAIL("Unknown grid type"); - //fall-through + SAL_FALLTHROUGH; case GRID_NONE: nGridType = 0; break; @@ -4446,7 +4446,7 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir default: //Can't get an unknown type here OSL_FAIL("Unknown frame direction"); - //fall-through + SAL_FALLTHROUGH; case FRMDIR_HORI_LEFT_TOP: nTextFlow = 0; break; diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index ac170336ca73..5364347f8c9c 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3042,7 +3042,7 @@ SvxFrameDirection MakeDirection(sal_uInt16 nCode, bool bIsBiDi) { default: OSL_ENSURE(eDir == 4, "unknown direction code, maybe it's a bitfield"); - //fall-through + SAL_FALLTHROUGH; case 3: eDir = bIsBiDi ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP; // #i38158# - Consider RTL tables break; diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 0995cad6e356..ef9f474d1613 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -983,7 +983,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes) case FLD_TAGTXT: if ((m_nFieldTagBad[nI] & nMask)) // Flag: Tag bad return Read_F_Tag(&aF); // Taggen - //fall through... + SAL_FALLTHROUGH; case FLD_TEXT: // so viele ueberlesen, das Resultfeld wird wie Haupttext // eingelesen @@ -3478,7 +3478,7 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, OUString& rStr case 'h': case 'm': OSL_ENSURE( false, "Auswertung fehlt noch - Daten unbekannt" ); - //fall-through + SAL_FALLTHROUGH; case 's': //worthless fake anchor option bOptions = true; break; diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 399d8109c55b..6b20a4fa593f 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -165,7 +165,7 @@ void wwSection::SetDirection() { default: OSL_ENSURE(false, "Unknown layout type"); - //fall-through + SAL_FALLTHROUGH; case 0: meDir=FRMDIR_HORI_LEFT_TOP; break; @@ -240,7 +240,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrameFormat &rFormat, const wwSection &r break; default: OSL_ENSURE(false, "Unknown grid type"); - //fall-through + SAL_FALLTHROUGH; case 3: eType = GRID_LINES_CHARS; aGrid.SetSnapToChars(true); @@ -3274,7 +3274,8 @@ void SwWW8ImplReader::Read_Underline( sal_uInt16, const sal_uInt8* pData, short // 9 = dotdash 10 = dotdotdash 11 = wave switch( *pData ) { - case 2: bWordLine = true; // no break; + case 2: bWordLine = true; + SAL_FALLTHROUGH; case 1: eUnderline = (FontLineStyle)LINESTYLE_SINGLE; break; case 3: eUnderline = (FontLineStyle)LINESTYLE_DOUBLE; break; case 4: eUnderline = (FontLineStyle)LINESTYLE_DOTTED; break; diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index dfe1b5df6234..efe00fa0ba0f 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -5358,19 +5358,19 @@ bool WW8Fib::GetBaseCp(ManTypes nType, WW8_CP * cp) const default: case MAN_TXBX_HDFT: nOffset = ccpTxbx; - // fall through + SAL_FALLTHROUGH; case MAN_TXBX: if (ccpEdn > std::numeric_limits<WW8_CP>::max() - nOffset) { return false; } nOffset += ccpEdn; - // fall through + SAL_FALLTHROUGH; case MAN_EDN: if (ccpAtn > std::numeric_limits<WW8_CP>::max() - nOffset) { return false; } nOffset += ccpAtn; - // fall through + SAL_FALLTHROUGH; case MAN_AND: if (ccpMcr > std::numeric_limits<WW8_CP>::max() - nOffset) { return false; @@ -5389,19 +5389,19 @@ bool WW8Fib::GetBaseCp(ManTypes nType, WW8_CP * cp) const return false; } nOffset += ccpHdr; - // fall through + SAL_FALLTHROUGH; case MAN_HDFT: if (ccpFootnote > std::numeric_limits<WW8_CP>::max() - nOffset) { return false; } nOffset += ccpFootnote; - // fall through + SAL_FALLTHROUGH; case MAN_FTN: if (ccpText > std::numeric_limits<WW8_CP>::max() - nOffset) { return false; } nOffset += ccpText; - // fall through + SAL_FALLTHROUGH; case MAN_MAINTEXT: break; } diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 59631382f96c..8b0cf830db5d 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1472,7 +1472,7 @@ SvXMLImportContext *SwXMLTableContext::CreateChildContext( sal_uInt16 nPrefix, break; case XML_TOK_TABLE_HEADER_ROWS: bHeader = true; - //fall-through + SAL_FALLTHROUGH; case XML_TOK_TABLE_ROWS: pContext = new SwXMLTableRowsContext_Impl( GetSwImport(), nPrefix, rLocalName, xAttrList, diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 5dcfedb3a21c..823397e628b6 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -467,7 +467,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( } if( '\'' == c || '\\' == c ) aBuffer.append( '\\' ); - // no break! + SAL_FALLTHROUGH; default: if( !aBuffer.isEmpty() ) aBuffer.append( c ); diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 39c0a35f6d0b..3fc1146a9183 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -65,7 +65,7 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) aItem.AddEvent( OUString( SW_RES(STR_EVENT_IMAGE_LOAD) ), OUString(), SVX_EVENT_IMAGE_LOAD); } - // no break; + SAL_FALLTHROUGH; case MACASSGN_FRMURL: // Frame - URL-Attributes { if( !bHtmlMode && @@ -81,14 +81,14 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) SW_EVENT_FRM_MOVE ); } } - // no break; + SAL_FALLTHROUGH; case MACASSGN_OLE: // OLE { if( !bHtmlMode ) aItem.AddEvent( OUString( SW_RES(STR_EVENT_OBJECT_SELECT) ), OUString(), SW_EVENT_OBJECT_SELECT ); } - // no break; + SAL_FALLTHROUGH; case MACASSGN_INETFMT: // INetFormat-Attributes { aItem.AddEvent( OUString( SW_RES(STR_EVENT_MOUSEOVER_OBJECT) ), OUString(), diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 44b1119449ee..8525ff22896e 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1898,7 +1898,7 @@ bool SwSectionFootnoteEndTabPage::FillItemSet( SfxItemSet* rSet ) aFootnote.SetNumType( m_pFootnoteNumViewBox->GetSelectedNumberingType() ); aFootnote.SetPrefix( m_pFootnotePrefixED->GetText().replaceAll("\\t", "\t") ); // fdo#65666 aFootnote.SetSuffix( m_pFootnoteSuffixED->GetText().replaceAll("\\t", "\t") ); - // no break; + SAL_FALLTHROUGH; case FTNEND_ATTXTEND_OWNNUMSEQ: aFootnote.SetOffset( static_cast< sal_uInt16 >( m_pFootnoteOffsetField->GetValue()-1 ) ); @@ -1919,7 +1919,7 @@ bool SwSectionFootnoteEndTabPage::FillItemSet( SfxItemSet* rSet ) aEnd.SetNumType( m_pEndNumViewBox->GetSelectedNumberingType() ); aEnd.SetPrefix( m_pEndPrefixED->GetText().replaceAll("\\t", "\t") ); aEnd.SetSuffix( m_pEndSuffixED->GetText().replaceAll("\\t", "\t") ); - // no break; + SAL_FALLTHROUGH; case FTNEND_ATTXTEND_OWNNUMSEQ: aEnd.SetOffset( static_cast< sal_uInt16 >( m_pEndOffsetField->GetValue()-1 ) ); @@ -1974,11 +1974,11 @@ void SwSectionFootnoteEndTabPage::ResetState( bool bFootnote, { case FTNEND_ATTXTEND_OWNNUMANDFMT: pNtNumFormatCB->SetState( TRISTATE_TRUE ); - // no break; + SAL_FALLTHROUGH; case FTNEND_ATTXTEND_OWNNUMSEQ: pNtNumCB->SetState( TRISTATE_TRUE ); - // no break; + SAL_FALLTHROUGH; case FTNEND_ATTXTEND: pNtAtTextEndCB->SetState( TRISTATE_TRUE ); @@ -1994,13 +1994,13 @@ void SwSectionFootnoteEndTabPage::ResetState( bool bFootnote, { case FTNEND_ATPGORDOCEND: pNtNumCB->Enable( false ); - // no break; + SAL_FALLTHROUGH; case FTNEND_ATTXTEND: pNtNumFormatCB->Enable( false ); pOffsetField->Enable( false ); pOffsetText->Enable( false ); - // no break; + SAL_FALLTHROUGH; case FTNEND_ATTXTEND_OWNNUMSEQ: pNumViewBox->Enable( false ); diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index d296333d4353..bd2f636e6b67 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -345,7 +345,7 @@ void SwFieldDBPage::TypeHdl( ListBox* pBox ) case TYP_DBNUMSETFLD: bSetNo = true; - // no break! + SAL_FALLTHROUGH; case TYP_DBNEXTSETFLD: bCond = true; if (IsFieldEdit()) diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 294e01c86cd7..b63c6b21f096 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -590,7 +590,7 @@ bool SwFieldDokPage::FillItemSet(SfxItemSet* ) case TYP_AUTHORFLD: nFormat = nSubType; nSubType = 0; - // no break! + SAL_FALLTHROUGH; case TYP_EXTUSERFLD: nFormat |= m_pFixedCB->IsChecked() ? AF_FIXED : 0; break; diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index ae872e69dce7..c9df9c01070f 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -412,7 +412,7 @@ IMPL_LINK_NOARG_TYPED(SwFieldRefPage, TypeHdl, ListBox&, void) case REFFLDFLAG_BOOKMARK: bName = true; - // no break!!! + SAL_FALLTHROUGH; default: if( REFFLDFLAG & nTypeId ) { @@ -763,7 +763,7 @@ sal_Int32 SwFieldRefPage::FillFormatLB(sal_uInt16 nTypeId) case REFFLDFLAG_HEADING: case REFFLDFLAG_NUMITEM: bAddCrossRefFormats = true; - // intentional no break here + SAL_FALLTHROUGH; case TYP_GETREFFLD: case REFFLDFLAG_BOOKMARK: diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index c8524558f875..40d5233821d1 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -330,7 +330,7 @@ bool SwDocShell::Save() case SfxObjectCreateMode::EMBEDDED: // Suppress SfxProgress, if we are Embedded SW_MOD()->SetEmbeddedLoadSave( true ); - // no break; + SAL_FALLTHROUGH; case SfxObjectCreateMode::STANDARD: case SfxObjectCreateMode::PREVIEW: @@ -1007,7 +1007,7 @@ void SwDocShell::GetState(SfxItemSet& rSet) if ( !aMOpt.IsImpress() ) rSet.DisableItem( nWhich ); } - /* no break here */ + SAL_FALLTHROUGH; case FN_ABSTRACT_NEWDOC: case FN_OUTLINE_TO_CLIPBOARD: { diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index 4a7d0049ac5e..92b239467b04 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -531,7 +531,7 @@ bool SwDocShell::Load( SfxMedium& rMedium ) } // suppress SfxProgress, when we are Embedded SW_MOD()->SetEmbeddedLoadSave( true ); - // no break; + SAL_FALLTHROUGH; case SfxObjectCreateMode::STANDARD: case SfxObjectCreateMode::PREVIEW: diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index c9ec1e470ceb..49feaa8da271 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -335,7 +335,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) } } - // intentionally no break + SAL_FALLTHROUGH; case SID_STYLE_EDIT: case SID_STYLE_DELETE: diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index b1795c156462..a4a0a557621c 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -901,7 +901,7 @@ OUString SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) aItemPresentation = SW_RESSTR(STR_WESTERN_FONT) + aItemPresentation; bHasWesternFontPrefix = true; } - // no break; + SAL_FALLTHROUGH; default: bIsDefault = true; } @@ -2701,7 +2701,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() case SWSTYLEBIT_HTML | SFXSTYLEBIT_USERDEF: if(IsPoolUserFormat(nId)) break; - // otherwise move on + SAL_FALLTHROUGH; case SWSTYLEBIT_HTML: if( (nId & COLL_GET_RANGE_BITS) != COLL_HTML_BITS) { diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index a5a851f37e32..e19412807cba 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -446,7 +446,7 @@ bool SwDBManager::Merge( const SwMergeDescriptor& rMergeDesc, vcl::Window* pPare WorkingDocType::SOURCE, rMergeDesc.rSh, nullptr, &pWorkDocOrigDBManager, nullptr, &pWorkShell, &pWorkDoc ); } - // fall through + SAL_FALLTHROUGH; } default: diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index 38bfe02560ef..bde5c24684bd 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -685,7 +685,7 @@ bool SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellM rView.AttrChangedNotify(&rShell); break; } - // otherwise no break to deselect the object + SAL_FALLTHROUGH; // to deselect the object case SHELL_MODE_GRAPHIC: case SHELL_MODE_OBJECT: { diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 8242f70d956a..e39c5765c319 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1646,7 +1646,7 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, break; } } - // no break - because then test if we get a stream + SAL_FALLTHROUGH; // because then test if we get a stream default: if( rData.GetSotStorageStream( nFormat, xStrm ) ) diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index adcb440ff0c5..8f1ac20a5d00 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -1093,7 +1093,8 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb ) case MOVE_RIGHT_SMALL: if( aTmp.Width() < aSnap.Width() + MINFLY ) break; - nRight = aSnap.Width(); // no break + nRight = aSnap.Width(); + SAL_FALLTHROUGH; case MOVE_RIGHT_HUGE: case MOVE_RIGHT_BIG: aTmp.Left( aTmp.Left() + nRight ); break; @@ -1101,7 +1102,8 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb ) case MOVE_DOWN_SMALL: if( aTmp.Height() < aSnap.Height() + MINFLY ) break; - nDown = aSnap.Height(); // no break + nDown = aSnap.Height(); + SAL_FALLTHROUGH; case MOVE_DOWN_HUGE: case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown ); break; @@ -2412,7 +2414,7 @@ KEYINPUT_CHECKTABLE_INSDEL: break; } aCh = '\t'; - // no break! + SAL_FALLTHROUGH; case KS_InsChar: if (rSh.GetChar(false)==CH_TXT_ATR_FORMELEMENT) { @@ -3480,8 +3482,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) default: return; } + + SAL_FALLTHROUGH; } - /* no break */ case MOUSE_LEFT + KEY_SHIFT: case MOUSE_LEFT + KEY_SHIFT + KEY_MOD1: { @@ -4214,8 +4217,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } else m_rView.GetPostItMgr()->SetShadowState(nullptr,false); + SAL_FALLTHROUGH; } - // no break; case KEY_SHIFT: case KEY_MOD2: case KEY_MOD1: @@ -4573,7 +4576,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) break; } bPopMode = true; - // no break + SAL_FALLTHROUGH; case MOUSE_LEFT + KEY_SHIFT: if (rSh.IsSelFrameMode()) { diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 5f97ff06a9f9..a480b73d47d9 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -306,7 +306,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) } case RES_INPUTFLD: // BubbleHelp, because the suggestion could be quite long bBalloon = true; - /* no break */ + SAL_FALLTHROUGH; case RES_JUMPEDITFLD: sText = pField->GetPar2(); break; diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 0b5ef6d1cdff..b8c04d8b5a2a 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -443,7 +443,7 @@ void SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) case TYP_INPUTFLD: { rToFill.push_back(SW_RES(aSwFields[nPos].nSubTypeStart)); - // move on at generic types + SAL_FALLTHROUGH; // move on at generic types } case TYP_DDEFLD: case TYP_SEQFLD: diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx index 0913d101cf68..8394299cf9f6 100644 --- a/sw/source/uibase/ribbar/conrect.cxx +++ b/sw/source/uibase/ribbar/conrect.cxx @@ -171,7 +171,7 @@ void ConstRectangle::Activate(const sal_uInt16 nSlotId) case SID_DRAW_CAPTION_VERTICAL: bCapVertical = true; - // no break + SAL_FALLTHROUGH; case SID_DRAW_CAPTION: m_pWin->SetSdrDrawMode(OBJ_CAPTION); break; diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index f4428173b7f9..680da5088447 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -229,7 +229,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq) break; } - // otherwise call DelLeft + SAL_FALLTHROUGH; // otherwise call DelLeft case FN_SHIFT_BACKSPACE: rSh.DelLeft(); break; @@ -1852,7 +1852,7 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot ) case FN_FRAME_WRAPTHRU_TRANSP: if (aWrap.IsContour()) aWrap.SetContour(false); - // No break!!! + SAL_FALLTHROUGH; case FN_FRAME_WRAPTHRU: nSurround = SURROUND_THROUGHT; break; @@ -1971,8 +1971,8 @@ void SwBaseShell::ExecTextCtrl( SfxRequest& rReq ) if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM) nScripts = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang ); } + SAL_FALLTHROUGH; } - // fall-through case SID_ATTR_CHAR_POSTURE: case SID_ATTR_CHAR_WEIGHT: { diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index add32b40a001..6c1fc4360ab9 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -273,7 +273,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) case SID_FLIP_VERTICAL: bMirror = false; - /* no break */ + SAL_FALLTHROUGH; case SID_FLIP_HORIZONTAL: rSh.MirrorSelection( bMirror ); break; diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 6ebd85b4f153..c06382ed289c 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -497,14 +497,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) case FN_FRAME_UP: bTopParam = false; - /* no break */ + SAL_FALLTHROUGH; case SID_FRAME_TO_TOP: pSh->SelectionToTop( bTopParam ); break; case FN_FRAME_DOWN: bBottomParam = false; - /* no break */ + SAL_FALLTHROUGH; case SID_FRAME_TO_BOTTOM: pSh->SelectionToBottom( bBottomParam ); break; diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 91199fc84878..ef4d98abd9a7 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -744,7 +744,7 @@ void SwTableShell::Execute(SfxRequest &rReq) { case TBLMERGE_OK: bCallDone = true; - //no break; + SAL_FALLTHROUGH; case TBLMERGE_NOSELECTION: break; case TBLMERGE_TOOCOMPLEX: @@ -925,8 +925,9 @@ void SwTableShell::Execute(SfxRequest &rReq) } nSlot = bColumn ? FN_TABLE_INSERT_COL_DLG : FN_TABLE_INSERT_ROW_DLG; + + SAL_FALLTHROUGH; // on Count = 0 appears the dialog } - // No break; on Count = 0 appears the dialog case FN_TABLE_INSERT_COL_DLG: case FN_TABLE_INSERT_ROW_DLG: { diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index e105efb0d442..c56621e65f8e 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -861,7 +861,7 @@ void SwTextShell::Execute(SfxRequest &rReq) const sal_uInt16 nWhich = GetPool().GetWhich( nSlot ); if ( pArgs && pArgs->GetItemState( nWhich ) == SfxItemState::SET ) bUseDialog = false; - // intentionally no break + SAL_FALLTHROUGH; } case SID_CHAR_DLG: case SID_CHAR_DLG_EFFECT: @@ -894,8 +894,7 @@ void SwTextShell::Execute(SfxRequest &rReq) const sal_uInt16 nWhich = GetPool().GetWhich( nSlot ); if ( pArgs && pArgs->GetItemState( nWhich ) == SfxItemState::SET ) bUseDialog = false; - // intentionally no break - + SAL_FALLTHROUGH; } case SID_PARA_DLG: { diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index f59e70ac8b43..f02a69116b3b 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1576,7 +1576,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) m_pVRuler->SetActive( !bModal ); } - /* no break here */ + SAL_FALLTHROUGH; case SFX_HINT_TITLECHANGED: if ( GetDocShell()->IsReadOnly() != GetWrtShell().GetViewOptions()->IsReadonly() ) diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index efb3bee30b5f..939d0f17ce0e 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -1158,8 +1158,8 @@ void SwView::Execute(SfxRequest &rReq) xDictionary->clear(); // put cursor to the start of the document m_pWrtShell->SttDoc(); + SAL_FALLTHROUGH; // call spell/grammar dialog } - // no break; - but call spell/grammar dialog case FN_SPELL_GRAMMAR_DIALOG: { SfxViewFrame* pViewFrame = GetViewFrame(); diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index c3b98384bc73..8a16929974a1 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -343,10 +343,9 @@ uno::Any SwXTextView::getSelection() aRef.set(xCursor, uno::UNO_QUERY); break; } - + SAL_FALLTHROUGH; + // without a table selection the text will be delivered } - //Without a table selection the text will be delivered. - //break; case SHELL_MODE_LIST_TEXT : case SHELL_MODE_TABLE_LIST_TEXT: case SHELL_MODE_TEXT : diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 072d82b3f1c0..b0324efc7d67 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1784,7 +1784,7 @@ bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer, break; case ContentTypeId::URLFIELD: sUrl = static_cast<SwURLFieldContent*>(pCnt)->GetURL(); - // no break; + SAL_FALLTHROUGH; case ContentTypeId::OLE: case ContentTypeId::GRAPHIC: if(GetParentWindow()->GetRegionDropMode() != RegionMode::NONE) @@ -2232,7 +2232,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, bool bModifier) case FN_ITEM_DOWN: case FN_ITEM_UP: bMove = true; - //fall-through + SAL_FALLTHROUGH; case FN_ITEM_LEFT: case FN_ITEM_RIGHT: if( !GetWrtShell()->GetView().GetDocShell()->IsReadOnly() && diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 79e18c0c72e0..aa61757607e1 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -366,7 +366,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName { aServerList.FillInsertObjects(); aServerList.Remove( SwDocShell::Factory().GetClassId() ); - // Intentionally no break! + SAL_FALLTHROUGH; } // TODO/LATER: recording! Convert properties to items |