sw/source/core/doc/docglbl.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 2b4375fcfa5f1f852ab6c85ca82d55c2be324b70 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sun Sep 29 13:25:08 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Sep 29 20:29:02 2024 +0200 cid#1606690 Overflowed constant Change-Id: I7d3556cbaa43ba7605005059545c3d52685d33c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index 56f78b66cb9a..6066a230fb0f 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -369,7 +369,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, // If FlyFrames are still around, delete these too auto& rSpzs = *GetSpzFrameFormats(); - for(sw::FrameFormats<sw::SpzFrameFormat*>::size_type n = 0; n < GetSpzFrameFormats()->size(); ++n) + for(sw::FrameFormats<sw::SpzFrameFormat*>::size_type n = 0; n < GetSpzFrameFormats()->size(); ) { auto pFly = rSpzs[n]; const SwFormatAnchor* pAnchor = &pFly->GetAnchor(); @@ -382,8 +382,9 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, *pAnchorNode < aEIdx.GetNode() ) { getIDocumentLayoutAccess().DelLayoutFormat( pFly ); - --n; } + else + ++n; } GetNodes().Delete( aSIdx, nNodeDiff );