sd/inc/drawdoc.hxx | 3 +++ sd/inc/sdpage.hxx | 2 +- sd/source/core/drawdoc2.cxx | 6 ------ sd/source/core/sdpage.cxx | 7 +++++++ sd/source/ui/inc/ViewShell.hxx | 4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-)
New commits: commit bd7c8a15e97e28365676b1c83de67a6fb6788daf Author: Mohit Marathe <[email protected]> AuthorDate: Tue Dec 9 13:51:58 2025 +0530 Commit: Mohit Marathe <[email protected]> CommitDate: Tue Jan 13 08:55:48 2026 +0100 sd: refactor SdPage::SetCanvasPage Signed-off-by: Mohit Marathe <[email protected]> Change-Id: Iec7dd09162a9a51de3bcb9c3126a365b26c0507a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195286 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196714 diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index e267595d8c67..380c936f8c8d 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -36,6 +36,7 @@ #include "sddllapi.h" #include "pres.hxx" #include "stlpool.hxx" +#include "sdpage.hxx" namespace com::sun::star::xml::dom { class XNode; } namespace editeng { class SvxFieldItemUpdater; } @@ -1074,6 +1075,8 @@ public: bool bUndo = true, const OUString& sNewName = OUString()); + void StoreCanvasPage(SdPage* pPage) { mpCanvasPage = pPage; } + /** Re-order the pages based on the position of their previews on canvas page. */ void ReshufflePages(); diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 35d095513cac..b4f84812b0af 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -403,7 +403,7 @@ public: static sal_uInt16 mnLastPageId; bool IsCanvasPage() const { return mbIsCanvasPage; } - void SetCanvasPage() { mbIsCanvasPage = true; } + void SetCanvasPage(); bool IsCanvasMasterPage() const { return mbIsCanvasMasterPage; } void SetCanvasMasterPage() { mbIsCanvasMasterPage = true; } diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index a8706ea95b40..62da3e7da5ba 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -1515,8 +1515,6 @@ void SdDrawDocument::ImportCanvasPage() SdPage* pPage = GetSdPage(0, PageKind::Standard); bool bIsCanvasPageValid = ValidateCanvasPage(pPage); pPage->SetCanvasPage(); - pPage->SetExcluded(true); - mpCanvasPage = pPage; SdPage* pMPage = static_cast<SdPage*>(&pPage->TRG_GetMasterPage()); pMPage->SetCanvasMasterPage(); // re-populate the previews grid if not valid @@ -1625,9 +1623,6 @@ sal_uInt16 SdDrawDocument::GetOrInsertCanvasPage() if (!pCanvasPage) return 0xffff; - // exclude from slideshow - pCanvasPage->SetExcluded(true); - // move the canvas page to the top sal_uInt16 nCanvasPageNum = 2 * nCanvasPageIndex + 1; MovePage(nCanvasPageNum, 1); // Canvas page @@ -1637,7 +1632,6 @@ sal_uInt16 SdDrawDocument::GetOrInsertCanvasPage() ResizeCurrentPage(pCanvasPage, aCanvasSize, PageKind::Standard); pCanvasPage->SetCanvasPage(); - mpCanvasPage = pCanvasPage; SdPage* pMasterCanvas = static_cast<SdPage*>(&pCanvasPage->TRG_GetMasterPage()); pMasterCanvas->SetCanvasMasterPage(); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 73482c4d71df..c78bf1e21952 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1402,6 +1402,13 @@ OUString SdPage::autoLayoutToString(AutoLayout nLayoutId) return enumtoString(nLayoutId); } +void SdPage::SetCanvasPage() +{ + mbIsCanvasPage = true; + SetExcluded(true); + static_cast<SdDrawDocument&>(getSdrModelFromSdrPage()).StoreCanvasPage(this); +} + static void CalcAutoLayoutRectangles( SdPage const & rPage,::tools::Rectangle* rRectangle ,const OUString& sLayoutType ) { ::tools::Rectangle aTitleRect; commit 05f9617ef15d99a202e039f0c41691bde2b900e0 Author: Mohit Marathe <[email protected]> AuthorDate: Tue Dec 9 12:06:13 2025 +0530 Commit: Mohit Marathe <[email protected]> CommitDate: Tue Jan 13 08:55:35 2026 +0100 sd: better default zoom for canvas and non-canvas pages Signed-off-by: Mohit Marathe <[email protected]> Change-Id: Ia20643ec4a39730cbc2295d7818cfc80d0ece54a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195266 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196713 diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index aae2e4d17a15..7920e7434739 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -487,8 +487,8 @@ protected: sal_uInt16 mnPrintedHandoutPageNum; // Page number of the handout page that is to be printed. sal_uInt16 mnPrintedHandoutPageCount; // Page count of the handout pages that are to be printed. - sal_uInt16 mnCanvasPageZoom = 0; - sal_uInt16 mnNonCanvasPageZoom = 0; + sal_uInt16 mnCanvasPageZoom = 20; + sal_uInt16 mnNonCanvasPageZoom = 100; //af bool bPrintDirectSelected; // Print only selected objects in direct print //afString sPageRange; // pagerange if selected objects in direct print
