sd/source/core/drawdoc2.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit af8a802bb0409e1e51c60f8883bec30a3adf8c60 Author: Mohit Marathe <[email protected]> AuthorDate: Thu Dec 4 18:07:11 2025 +0530 Commit: Mohit Marathe <[email protected]> CommitDate: Tue Jan 13 08:55:19 2026 +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]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196712 diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 96471dace0fa..a8706ea95b40 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);
