sd/source/core/drawdoc2.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 14fa7a0d5481624a8ee49bff055651686d191b52 Author: Mohit Marathe <[email protected]> AuthorDate: Wed Nov 19 11:31:19 2025 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Mon Jan 12 19:37:39 2026 +0100 sd: remove previous page's background from the canvas page Signed-off-by: Mohit Marathe <[email protected]> Change-Id: I1d4e97281953a5df0b3c3a78cf8292e040f7f509 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194183 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196703 diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index eac887aaa650..63f9634fc2a6 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -1558,7 +1558,7 @@ sal_uInt16 SdDrawDocument::GetOrInsertCanvasPage() sal_uInt16 nCanvasPageNum = CreatePage(pLastStandardPage, PageKind::Standard, u"Canvas Page"_ustr, u"Canvas notes page"_ustr, AutoLayout::AUTOLAYOUT_NONE, AutoLayout::AUTOLAYOUT_NONE, - false, true, pLastStandardPage->GetPageNum() + 2); + false, false, pLastStandardPage->GetPageNum() + 2); SdPage* pCanvasPage = GetSdPage(nCanvasPageNum, PageKind::Standard); if (!pCanvasPage) @@ -1573,6 +1573,12 @@ sal_uInt16 SdDrawDocument::GetOrInsertCanvasPage() SdPage* pMasterCanvas = static_cast<SdPage*>(&pCanvasPage->TRG_GetMasterPage()); pMasterCanvas->SetCanvasMasterPage(); + // Remove all objects inherited from previous page's master page + while (pMasterCanvas->GetObjCount() > 0) + { + pMasterCanvas->NbcRemoveObject(0); + } + populatePagePreviewsGrid(); return pCanvasPage->GetPageNum() / 2;
