sd/source/core/drawdoc2.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 2d31b3a094133009abbbd52257f258c448a35b5f Author: Mohit Marathe <[email protected]> AuthorDate: Thu Dec 4 18:07:11 2025 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Thu Dec 4 15:00:46 2025 +0100 sd: fix remove page logic for non-canvas page regression from b058526f16724d72f87810c438ac0cccb2ca16ff Signed-off-by: Mohit Marathe <[email protected]> Change-Id: I9dc939239ec9683680f5541ded77958d46a486b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194996 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 832315fb7abd..ee980fd7fa3e 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -505,7 +505,8 @@ void SdDrawDocument::DeletePage(sal_uInt16 nPgNum) rtl::Reference<SdrPage> SdDrawDocument::RemovePage(sal_uInt16 nPgNum) { // Do not remove the only non-canvas page - if (HasCanvasPage() && GetSdPageCount(PageKind::Standard) == 2) + if (HasCanvasPage() && GetSdPageCount(PageKind::Standard) == 2 + && nPgNum == 3) return nullptr; rtl::Reference<SdrPage> pPage = FmFormModel::RemovePage(nPgNum);
