diff options
Diffstat (limited to 'sw/source')
84 files changed, 205 insertions, 184 deletions
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index c9d4ab844835..c1903a1a88ab 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 ac338185363d..bbedcbbf097a 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 32f92d7bf444..50270341868b 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 7e57d314efed..df1d3eee2582 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 7180489ce1f3..df6c802eecb9 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 ) ) { @@ -553,7 +553,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 4974408b1a08..c8802930f371 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 91aa08a286a0..319a60800f0d 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 cd25942f9be4..7abc9ab99857 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -483,7 +483,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: @@ -663,7 +663,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 517933bfbed4..da9c84b618c4 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -470,7 +470,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; @@ -851,7 +851,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 30f3f8872c0a..183766375799 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 0bb6e4ad18b7..df67b94800ab 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -283,7 +283,7 @@ bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_uInt 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 1ddc0cad9558..3c36405bce1c 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -257,7 +257,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 && @@ -279,7 +279,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 3c4b25b77600..af3f3215f22a 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -608,7 +608,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 15ae0f2381ff..ee84093fffc2 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -4165,7 +4165,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 8fe1bc0c1d27..5267fbed8cbf 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -699,7 +699,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 74fd835a7fc0..3ed06a81398a 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -786,7 +786,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 f421748c0c22..7cf80a5f76c2 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 82b58222a81c..17ab994db4a4 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 491a1c1ce4ff..091475cd8425 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -177,7 +177,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 aa941c5956a2..5c629b9f4425 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -388,7 +388,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 e6c938f74be7..287b94bca4b1 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; @@ -738,7 +741,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; @@ -750,7 +753,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(); @@ -762,7 +765,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; @@ -775,7 +778,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 80182070235d..4204b8ca1978 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 248fab1fb22d..bef91bf29597 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -1057,7 +1057,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 9f2c94c51eca..b9babcb78718 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -586,8 +586,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 820bb000a883..174e6c4c883c 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -3172,7 +3172,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 2661d190a022..dcb314d0b71e 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; @@ -2003,7 +2003,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() ) @@ -2053,7 +2053,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: @@ -2124,7 +2124,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 9354af983d0e..34c0df1910f6 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -653,7 +653,7 @@ void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrame& _rHoriOr (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 f51d0612dad6..6a373825afd0 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 ed7d4163459f..46b51cd210ad 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1576,7 +1576,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 2649c1f2697a..9559d2ffa221 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1336,7 +1336,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 e905301f9f1f..645125b52d87 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 56e5df1240a9..14f12667cdfc 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -642,9 +642,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 e7813d939252..c43c30caed47 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1525,7 +1525,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() ) @@ -1536,7 +1536,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; @@ -1783,7 +1783,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 257c95ed6d3c..bf1711add806 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -185,7 +185,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 2124f077acea..9cf14e4c1a90 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1159,7 +1159,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 9807a5aee509..d7f2f9b5ffad 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1363,7 +1363,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 adb31b0ea3a2..4c07d71d79b2 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 7696d1a7971b..62d262b005cb 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 0b6d5f571091..5d8f28fbeeac 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -2888,7 +2888,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 ); @@ -2939,7 +2939,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 f039ef7ad183..80d9e688dd46 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 835c88bacdc3..bc6e71c2dd7d 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -1285,7 +1285,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; @@ -1293,7 +1293,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; @@ -1491,7 +1491,7 @@ void SwHTMLParser::InsertInput() case HTML_O_SDONFOCUS: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONFOCUS: nEvent = HTML_ET_ONGETFOCUS; bSetEvent = true; @@ -1499,7 +1499,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; @@ -1507,7 +1507,7 @@ void SwHTMLParser::InsertInput() case HTML_O_SDONCLICK: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONCLICK: nEvent = HTML_ET_ONCLICK; bSetEvent = true; @@ -1515,7 +1515,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; @@ -1523,7 +1523,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; @@ -1948,7 +1948,7 @@ void SwHTMLParser::NewTextArea() case HTML_O_SDONFOCUS: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONFOCUS: nEvent = HTML_ET_ONGETFOCUS; bSetEvent = true; @@ -1956,7 +1956,7 @@ void SwHTMLParser::NewTextArea() case HTML_O_SDONBLUR: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONBLUR: nEvent = HTML_ET_ONLOSEFOCUS; bSetEvent = true; @@ -1964,7 +1964,7 @@ void SwHTMLParser::NewTextArea() case HTML_O_SDONCLICK: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONCLICK: nEvent = HTML_ET_ONCLICK; bSetEvent = true; @@ -1972,7 +1972,7 @@ void SwHTMLParser::NewTextArea() case HTML_O_SDONCHANGE: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONCHANGE: nEvent = HTML_ET_ONCHANGE; bSetEvent = true; @@ -1980,7 +1980,7 @@ void SwHTMLParser::NewTextArea() case HTML_O_SDONSELECT: eScriptType2 = STARBASIC; - //fallthrough + SAL_FALLTHROUGH; case HTML_O_ONSELECT: nEvent = HTML_ET_ONSELECT; bSetEvent = true; @@ -2224,7 +2224,7 @@ void SwHTMLParser::NewSelect() case HTML_O_SDONFOCUS: eScriptType2 = STARBASIC; - //fall-through + SAL_FALLTHROUGH; case HTML_O_ONFOCUS: nEvent = HTML_ET_ONGETFOCUS; bSetEvent = true; @@ -2232,7 +2232,7 @@ void SwHTMLParser::NewSelect() case HTML_O_SDONBLUR: eScriptType2 = STARBASIC; - //fall-through + SAL_FALLTHROUGH; case HTML_O_ONBLUR: nEvent = HTML_ET_ONLOSEFOCUS; bSetEvent = true; @@ -2240,7 +2240,7 @@ void SwHTMLParser::NewSelect() case HTML_O_SDONCLICK: eScriptType2 = STARBASIC; - //fall-through + SAL_FALLTHROUGH; case HTML_O_ONCLICK: nEvent = HTML_ET_ONCLICK; bSetEvent = true; @@ -2248,7 +2248,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 00ec79fd3f97..48923939e689 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 02dfb42cd009..0c1132aa1b46 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -3692,7 +3692,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; @@ -3881,7 +3881,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; @@ -4284,7 +4284,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; @@ -4457,7 +4457,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: @@ -4653,7 +4653,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 1773f8d6b42a..c2551a1b4e7a 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -987,7 +987,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 2b14d4195a7b..6ac6d9d18a8d 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: @@ -1308,7 +1308,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 7a6def77a8a0..53411b8b0497 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -1237,7 +1237,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: @@ -2011,7 +2011,7 @@ void SwHTMLParser::NextToken( int nToken ) !sSaveToken.isEmpty() && '!' != sSaveToken[0] && '%' != sSaveToken[0] ) m_aUnknownToken = sSaveToken; - // no break + SAL_FALLTHROUGH; default: bInsertUnknown = m_bKeepUnknown; @@ -2050,7 +2050,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: @@ -2060,7 +2060,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: @@ -2070,7 +2070,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: @@ -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 42138325ce11..2a13bedef6a5 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3412,7 +3412,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 d4bac28e8bf9..28e53b319c8a 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -3018,7 +3018,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 172be21f527a..ad0552504e0b 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 ca7e8950a3bd..47b4e4db29f2 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2335,7 +2335,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; @@ -3467,7 +3467,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() ) @@ -3567,7 +3567,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid ) { default: OSL_FAIL("Unknown grid type"); - //fall-through + SAL_FALLTHROUGH; case GRID_NONE: nGridType = 0; break; @@ -4444,7 +4444,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 4a583b86bd44..8ef53ba13070 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3037,7 +3037,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 b6d70adcb925..6d10dc30768b 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 diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index e421bc08bd19..7e638214df8e 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); diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index d3481edc8f53..21232c0e9760 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -5364,19 +5364,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; @@ -5395,19 +5395,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 eda3db88f092..d098832d3b20 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 4dc0d55a5083..f45d40e07643 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -471,7 +471,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 7db602354c48..07e44f602583 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -67,7 +67,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 && @@ -83,14 +83,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 f3ddc962ecbf..3065e4152b00 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 d73b2570d1d0..cae7d207468e 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 b5d72b56e31e..52429205464e 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -387,7 +387,7 @@ IMPL_LINK_NOARG_TYPED(SwFieldRefPage, TypeHdl, ListBox&, void) case REFFLDFLAG_BOOKMARK: bName = true; - // no break!!! + SAL_FALLTHROUGH; default: if( REFFLDFLAG & nTypeId ) { @@ -692,7 +692,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 48f8b0500c85..ae41621efd33 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -329,7 +329,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: @@ -1006,7 +1006,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 448986570fb5..768025897d61 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 82cf42efa7ca..00b15616a4d5 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -336,7 +336,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 74cb5591f81a..cc3fadb5cd88 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -896,7 +896,7 @@ OUString SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) bHasWesternFontPrefix = true; bIsDefault = true; } - // no break; + SAL_FALLTHROUGH; default: bIsDefault = true; } @@ -2694,7 +2694,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/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index d78167a6d169..ffe7b8c580a3 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 f9d0569265cf..6e4548ec5743 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1665,7 +1665,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 513000842a0c..2eb7d8c7a916 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -1094,7 +1094,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; @@ -1102,7 +1103,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; @@ -2411,7 +2413,7 @@ KEYINPUT_CHECKTABLE_INSDEL: break; } aCh = '\t'; - // no break! + SAL_FALLTHROUGH; case KS_InsChar: if (rSh.GetChar(false)==CH_TXT_ATR_FORMELEMENT) { @@ -3479,8 +3481,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: { @@ -4205,8 +4208,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: @@ -4564,7 +4567,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 2c26252317a1..201ca5539624 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -445,7 +445,7 @@ bool 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 7761c7c0d775..4ffe11703bf0 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; @@ -1851,7 +1851,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; @@ -1970,8 +1970,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 e580ef5eeab7..72338fdc3846 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 6e76baf97afe..c81efb17e3f4 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 871a5aefd270..c8d0c1191c99 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -752,7 +752,7 @@ void SwTableShell::Execute(SfxRequest &rReq) { case TBLMERGE_OK: bCallDone = true; - //no break; + SAL_FALLTHROUGH; case TBLMERGE_NOSELECTION: break; case TBLMERGE_TOOCOMPLEX: @@ -933,8 +933,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 1961204eff06..92bc40b0212b 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -862,7 +862,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: @@ -895,8 +895,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 f31935cd4698..0f3ff772cbb4 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1604,7 +1604,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 13cade0ce0c5..207da4d1adb3 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 c83fd07b855f..9c517656d4db 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -344,10 +344,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 4cc3c0871713..7397e097015a 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1785,7 +1785,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) @@ -2236,7 +2236,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 90ce1e13e170..5b9b567004b4 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -367,7 +367,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 |