summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/access/accnotextframe.cxx2
-rw-r--r--sw/source/core/access/acctextframe.cxx2
-rw-r--r--sw/source/core/attr/calbck.cxx2
-rw-r--r--sw/source/core/attr/cellatr.cxx2
-rw-r--r--sw/source/core/attr/hints.cxx6
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
-rw-r--r--sw/source/core/doc/DocumentFieldsManager.cxx6
-rw-r--r--sw/source/core/doc/DocumentLayoutManager.cxx2
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx2
-rw-r--r--sw/source/core/doc/doccomp.cxx2
-rw-r--r--sw/source/core/doc/docfld.cxx4
-rw-r--r--sw/source/core/doc/docfly.cxx4
-rw-r--r--sw/source/core/doc/doclay.cxx2
-rw-r--r--sw/source/core/doc/docruby.cxx2
-rw-r--r--sw/source/core/doc/doctxm.cxx4
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/doc/tblrwcl.cxx2
-rw-r--r--sw/source/core/docnode/nodes.cxx2
-rw-r--r--sw/source/core/docnode/section.cxx2
-rw-r--r--sw/source/core/draw/dcontact.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx3
-rw-r--r--sw/source/core/frmedt/fews.cxx19
-rw-r--r--sw/source/core/layout/dbg_lay.cxx15
-rw-r--r--sw/source/core/layout/fly.cxx2
-rw-r--r--sw/source/core/layout/pagechg.cxx3
-rw-r--r--sw/source/core/layout/tabfrm.cxx2
-rw-r--r--sw/source/core/layout/wsfrm.cxx8
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx2
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx2
-rw-r--r--sw/source/core/text/inftxt.cxx2
-rw-r--r--sw/source/core/text/itrform2.cxx2
-rw-r--r--sw/source/core/text/porfld.cxx14
-rw-r--r--sw/source/core/text/pormulti.cxx6
-rw-r--r--sw/source/core/text/txtfrm.cxx6
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx2
-rw-r--r--sw/source/core/txtnode/thints.cxx2
-rw-r--r--sw/source/core/txtnode/txtedt.cxx3
-rw-r--r--sw/source/core/undo/unattr.cxx4
-rw-r--r--sw/source/core/undo/undobj1.cxx4
-rw-r--r--sw/source/core/undo/untbl.cxx4
42 files changed, 91 insertions, 72 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:
{